geekhack Projects > Making Stuff Together!

Soarer's WYSE Converter firmware

(1/33) > >>


This firmware for Teensy 2.0 etc. aims to convert all WYSE terminal keyboards which have a 4P4C connector, to USB.

See Wyse keyboard protocol (4P4C) for more information about the protocol and the models that use it.

(There's also a thread for this project on DT).


All of the configuration features of my XT/AT/PS2/122 Converter and my Keyboard Controller firmwares are supported (remapping, layers, macros etc).

At start-up, the converter automatically determines which WYSE keyboard is attached by reading an ID byte. Also, a basic check is performed to try and prevent damage in case the connector or cable has been wired in reverse.

LEDs on the keyboard are supported. PCE and AT-style have all 3 lock LEDs, whereas the 285 just has Caps and Scroll.

Hot-swapping of the keyboard is not supported, but might be in a future version. Until then, always connect the keyboard to the converter before connecting the converter to the computer.

Use hid_listen to see what the converter is doing - for example to diagnose any problems at start-up, to check key codes for remapping, etc.

Models supported

ModelKeysPart Nos (old, new/white)ID (hex) Status3083840013-0101Should work60 ASCII101840338-01, 901867-0141Verified60 ANSI101840338-0941Verified60 3161106840338-0204 (or 05/06/07)Verified85105840105-01n/a (00)Verified85 Gate Array105840366-01, 901879-0160Should work285/520108(841038-01), 901028-0162Verified285/520 ANSI WPS108(841038-06), 901028-06??Might workAT Standard84840275-0402Should workPCE US, Grey102840358-01, (901865-01)82VerifiedPCE Int'l, Grey103840362-01, (901866-01)83VerifiedPCE US, White102840358-1382VerifiedPCE Int'l, White103840362-0483VerifiedPCE US102(841135-01), 901865-0182Should workPCE Int'l103(841135-02), 901866-0183Should work
Note: WY85 is not the same as WY85 Gate Array - they're the same outside, but very different inside! I think WY85 Gate Array is the more common, and later, version.

For WY50 see here, and use my Controller firmware.


Note: this is looking at the front of the socket that you might fit to your converter. The socket on the keyboard (for those with a removable cable) is a mirror image of this diagram; the cable is wired as a 'cross-over' type.

For both ATmega32U4 and AT90USB1286, connect as follows:
Data -> PD0
Clock -> PD1
+5V -> VCC

Lock LEDs can be wired to any Pxx pin, and defined in your config file. An example config is included which sets up lock LEDs which are active high on pins PD5 to PD7 (i.e. the same as my XT/AT/PS2/122 converter uses on ATmega32U4).

--- Quote from: wikipedia modular connector ---The 4P4C connector, is popularly, but incorrectly, called RJ22, RJ10, or RJ9. It is also commonly referred to as a handset connector because the most popular usage for the connector is to terminate both ends of a handset cord and it is the de facto standard for this application.
--- End quote ---

So, for the models with a removable cable, if you need a replacement cable, or want to hack a cable to make the converter, handset cables are easy to find and cheap.

There are also various handset adapters (for recording, etc.) that could be a good source of the correct socket already mounted on a PCB and boxed. Finding one with enough space to fit a Teensy or Pro Micro inside shouldn't be too hard. This method might well require some hacky wiring onto the connector's pins (but that would be hidden anyway), and of course removal of other components on the PCB or tracks cutting (probably trivial).

Beware that some handset adapters have an RJ11 (6P4C), which isn't what you want! I've no idea what they are for. It's difficult to tell 4P4C and 6P4C apart just by looking at the photo of an item.


Resistor is optional if you don't want to use a WY85 (non-gate array).

WY85 (non-gate array) requires a pull-up resistor between Data and +5V. The ideal value is 2.2k, but any value between 1k and 4k should work fine. The pull-up resistor does not interfere with any other WYSE keyboard models.


Use the tools from my Keyboard Controller, v1.20 to assemble and write your config files to the converter.


There are no new config commands or extensions to existing commands specific to the WYSE keyboards as yet, but there are some on the to-do list:

* extend the 'ifkeyboard' and the 'ifset' commands to cover the various models
* allow the pins used for Clock and Data to be specified
* add an option for the 285's Scroll lock LED to show Num lock status (or hard code it)

ATmega32U4 (Teensy 2.0 etc) and AT90USB1286 (Teensy++ 2.0) are currently supported.

Note: if you are re-using a Teensy or other board, load the .hex before connecting a WYSE keyboard.

More evidence of Soarer's superpowers.

I think one night he was bitten by a radioactive keyboard while working late in the lab.


Pure, unadulterated awesomeness. I need to make this. Now I just need a device to make more spare time for me.

Awesome, time for me to get myself a teensy so I can get my PCE going!

Thanks guys! Forget Christmas, find a 4P4C and get your geek on instead  :))

I'm still not sure if the basic check to detect reverse wiring is going to be 100% reliable. It might in some cases tell you it's reverse wired when it isn't. So far I've only seen this on a PCE that I had removed the power smoothing capacitor from, but it might mean that the state of the scanner chip at power-up is undefined.

Adding a 1k pull-down resistor to clock and revising the firmware might fix it, but that would be a shame since at the moment no resistors are required except for the early WY85. Also, it currently seems to work fine if pull-ups are fitted to both clock and data, meaning the same hardware setup (with or without pullups) can be used for this and the XT/AT/PS2/122 converter, as long as care is taken to swap the firmware before attaching the keyboard.

I've also had a couple of cases of bad solder joints on the keyboard connector. This can give odd symptoms, to say the least! Simply resoldering them solved the problems.


[0] Message Index

[#] Next page

Go to full version