Troubleshooting


Diagnostic Output


The converter outputs some cryptic diagnostic information when in use - it's especially useful to see what is happening when it starts up.

The hid_listen program (from PJRC) can display this output, which mostly just consists of bytes read from and written to the keyboard when things are working correctly.

Most of the output takes the form of a prefix code, followed by a hex value, followed by a space. For example, 'r4A '.

Prefixes used:

PrefixDescription
rbyte read from keyboard
wbyte written to keyboard
Rread error
Wwrite error
+HID code output from first translation stage (for key-press)
-HID code output from first translation stage (for key-release)
dHID code output (for key-press) v1.03+
uHID code output (for key-release) v1.03+

Error codes:

CodeErrorDescription
R03unknownsomething bad happened!
R04clockmissed one edge of the clock signal, usually because of a short spike
R05timeoutstarted receiving clock from the board, but didn't receive enough for a full code
R06start bitread a start bit, but it was incorrect
R07parity bitfailed to correctly read a parity bit
R08stop bitfailed to correctly read a stop bit
W005timeouttimeout while writing a command to the keyboard
W105timeouttimeout while writing the first byte of a 2-byte command
W205timeouttimeout while writing the second byte of a 2-byte command

Usually, if you get error codes right after building your converter, it's because the wiring is incorrect. One fairly common error is to read the socket pinout diagrams backwards - they are drawn looking at the front of the socket, not the back.

Simple Logic Analyzer


As a side-project, I've posted a Simple Logic Analyzer on Deskthority. This can help to diagnose wiring problems or incompatibilities quickly and simply, whereas before you might've had to resort to trial and error, risking damage to the Teensy in the process.

Keyboard IDs


This section is mostly only relevant to terminal keyboards. The converter uses the ID to decide between using scan code set 3 for terminal keyboards, or extended scan code set 2 for 'regular' keyboards.

By using hid_listen, you can see what ID your keyboard has by looking at the two bytes read back after the get ID command (wF2 rFA).

The ID and scan code set selected are also printed in a more readable way: v0.996+

Keyboard ID: BFBF
Code Set: 3

Terminal keyboards often have DIP switches on the back panel, or alternatively a pin header on the PCB that you can fit jumpers to, which configure the keyboard's ID code. The ID is a 16-bit number, but commonly fewer than 16 switches/jumpers are fitted meaning it's not possible to select all of the bits. The default value with no jumpers fitted, or with all the DIP switches in the 'open' position, is BFBF.

If your terminal keyboard is not operating correctly, it might be because the wrong ID is set on the switches/jumpers. The first byte should not be AB.

Known Issues