USB protocol analyser and Soarer's Converter

for all subjects/topics not covered by the other forum categories
Post Reply
Coeus
Posts: 1855
Joined: Mon Jul 25, 2016 12:05 pm
Contact:

USB protocol analyser and Soarer's Converter

Post by Coeus » Sat Aug 15, 2020 1:27 pm

We had a thread about a cheap logical analyser - maybe that could be pressed into service as a capture device for a USB protocol analyser with the rest done in software? Any tips?

The background to this is that I acquired an IBM Model F keyboard, the kind used on the IBM PC/XT. This uses the PC/XT protocol and not the later AT/PS2 protocol and so needs an active converter for use on a modern PC and I have bought a Teensy and flashed it with Soarer's Converter which converts a number of legacy IBM keyboard protocols to USB.

I also have a KVM switch in my set-up. It is not convenient to have the KVM switch up on the desk and I have been using hotkeys to switch it. Essentially there are two ports for USB HID devices on this switch where, if the device is a keyboard, the switch listens in and spots the hot key sequence. There are also two further USB ports which seem to be just a regular USB hub.

There are two PCs connected to the KVM, a Windows laptop and a Linux machine. Now for the strange behaviour. With the converter plugged into one of the USB HID ports of the KVM, starting from cold with the KVM switch set to the Linux machine the keyboard works flawlessly. Switching to Windows it continues to work reliably but then switching back to Linux it starts to play up. The converter complains it is getting errors on the XT protocol link to the keyboard and is missing keystrokes. AFAIK, the keyboard has not been reprogrammed - I am not even sure the XT protocol has a return direction, other than reset. So maybe the converter is too busy attending to the USB protocol to respond to the keyboard. One further observation is that removing the USB A plug from the Windows PC while switched to Linux provokes continuous spurious keystrokes being received by the Linux machine.

By comparison, putting the converter in one of the regular USB ports of the KVM and using a different keyboard for hotkey switching works flawlessly. One obvious difference here, though, is that with these general USB ports the KVM disconnects the device from the PC being switched away from and connects it to the one being switched to. With the HID ports both PCs think they have a USB keyboard attached in either state and the KVM is doing something internally to make sure only one receives keystrokes.

So to work out exactly what is going on here I think I really need to know what is being exchanged between the converter and the KVM. As that is not the USB link to either of the PCs, I can't use software on either of the PCs to just grab what is the USB stack there is seeing. Soarer;s firmware a has some built-in debug for reporting on the protocol between itself and the keyboard but not the USB end.

Post Reply

Return to “off-topic”