USB keyboard problems - low speed vs full speed

The intent of this forum is to discuss my DOS TSR programs (available at http://bretjohnson.us), how they work and don't work, new/missing features, status of updates, and anything else related to them that may need to be discussed.

USB keyboard problems - low speed vs full speed

Postby Porsche » Mon Aug 17, 2020 8:55 am

I'm having problems using a USB keyboard that is a USB full speed device with my DOS PC. Is there a limitation with the USB driver, that a keyboard must be a low speed device? I'm actually using a KVM switch. The keyboard works fine when plugged directly into my DOS PC, but through the KVM switch, the keyboard doesn't work. The keyboard ends up being converted to a full speed device when passed through the KVM switch. I also have another keyboard that is actually a full speed device, and it doesn't work with the driver either. Thanks for any insight anyone can provide.
Porsche
 
Posts: 2
Joined: Mon Aug 17, 2020 8:47 am

Re: USB keyboard problems - low speed vs full speed

Postby Bret » Tue Aug 18, 2020 4:14 am

Porsche wrote: Is there a limitation with the USB driver, that a keyboard must be a low speed device?


No, there is no limitation. I've never used a USB KVM switch myself, but here's how it works.

The speed of the device is detected at the hardware level. That is, when you are going through the KVM switch, the USB host detects the speed of the device attached to it (the KVM switch). It sounds like in your case, this may be full-speed (12 Mbps). In turn, the KVM switch will need to determine the speed of the attached keyboard/mouse at the hardware level. If the two directions are different speeds, the KVM switch must somehow "buffer" things so both directions see what they need to see. In addition, the KVM switch must "simulate" the keyboard back towards the computer when the KVM is switched towards the second computer so the first computer thinks the keyboard is still attached but nobody is pressing any keys. The KVM switch also needs to correctly handle situations like one computer having the CapsLock or NumLock enabled (and the LEDs turned on) when the other computer has them off. The complication of this "juggling" is multiplied if you are mixing different speeds of devices (like a low-speed mouse and a full-speed keyboard or vice versa).

It sure seems like the problem is in the KVM switch -- it seems to be assuming something about the timing or protocol parameters or whatever that isn't quite correct. The fact that things work OK if you bypass the KVM switch seems to be pretty conclusive proof of that.

Regarding the second keyboard, it sounds like you're saying that even if you plug it directly into the computer (no KVM switch) it doesn't work? If so, we can do some more extensive troubleshooting on that. It's possible that there's something "funny" in the keyboard descriptors that USBKEYB doesn't like for some reason.

In any case, the drivers don't actually "care" what speed the keyboard is.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM


Return to Programs

Who is online

Users browsing this forum: No registered users and 2 guests

cron