How to extend the usb keyboard/mouse by 15m or troubleshoot the existing attempt

cablingusb

USB max length is apparently 5m. At the moment, I have a 5m usb cable, and on the end of it my keyboard. My keyboard has an internal 1 port usb hub, which I have plugged my mouse into.

This setup works fine, 99% of the time – very occasionally they will stop functioning, but for the most part, it's absolutely fine. I previously had no 5m cable and it worked fine for a year. I have a slightly pricy intel motherboard.

I want to extend it to about 15m. So I bought some more 5m usb cables, and two powered hubs. I set my pc up as:

PC > 5m > USB hub > 5m > USB hub > Keyboard
                                 > Mouse

This worked, but every 3-4 minutes, the usb hub in the device manager would disappear, my pc would lag, and my keyboard/mouse would turn off. After about 10 seconds, my PC would lag again, and the devices would start working again.

The bandwidth usage in device manager for the USB devices showed as 1%, 2%, 4% presumably for the hub, keyboard, mouse.

I have tried switching out the cables for other cables, and I have tried these combinations too:

PC > USB hub > 5m > USB hub > 5m > Keboard
                                 > Mouse

and

PC > 5m > USB hub > 5m > Keyboard
                    5m > Mouse

I have tried using different ports in my PC and the USB hubs.

I am looking for either troubleshooting advice to narrow down the problem, or an alternative more reliable solution that won't cost a fortune. All help appreciated!

Wireless keyboard & mouse is a last resort 😛

Best Answer

This information comes from the Wikipedia article for USB, but it would appear the reason is that the roundtrip communication time has a strict limit and that cable length can greatly affect that. Based on the following exerpt it would seem the roundtrip time for your setup is just too long and that the commands are getting dropped.

The primary reason for this limit is the maximum allowed round-trip delay of about 1.5 μs. If USB host commands are unanswered by the USB device within the allowed time, the host considers the command lost. When adding USB device response time, delays from the maximum number of hubs added to the delays from connecting cables, the maximum acceptable delay per cable amounts to 26 ns.[38] The USB 2.0 specification requires cable delay to be less than 5.2 ns per meter (192,000 km/s, which is close to the maximum achievable transmission speed for standard copper wire).

It would appear that if you purchased a longer cable, instead of going with the hub setup, that it may function better (since the hubs will increase the overall delay per meter). I see that monoprice.com has cables going all the way up to 25m, so there may be a shop you can purchase a similar cable from locally.

Related Question