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 GH).
Features
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
Code: Select all
Model Keys Part Nos (old, new/white) ID (hex) Status
---------------------------------------------------------------------------------
30 83 840013-01 01 Should work
60 ASCII 101 840338-01, 901867-01 41 Verified
60 ANSI 101 840338-09 41 Verified
60 3161 106 840338-02 04 (or 05/06/07) Verified
85 105 840105-01 n/a (00) Verified
85 Gate Array 105 840366-01, 901879-01 60 Should work
285/520 108 (841038-01), 901028-01 62 Verified
285/520 ANSI WPS 108 (841038-06), 901028-06 ?? Might work
AT Standard 84 840275-04 02 Should work
PCE US, Grey 102 840358-01, (901865-01) 82 Verified
PCE Int'l, Grey 103 840362-01, (901866-01) 83 Verified
PCE US, White 102 840358-13 82 Verified
PCE Int'l, White 103 840362-04 83 Verified
PCE US 102 (841135-01), 901865-01 82 Should work
PCE Int'l 103 (841135-02), 901866-01 83 Should work
For WY50 see here, and use my Controller firmware.
Connections
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
GND -> GND
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).
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.wikipedia modular connector wrote: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.
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
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.
Tools
Use the tools from my Keyboard Controller, v1.20 to assemble and write your config files to the converter.
Config
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.