0
\$\begingroup\$

I want to make device what is similar to KVM switch.

I have mouse + keyboard connected to my table PC and I want to use it for my notebook as well.

I decided to make USB HUB with 2 USB input (for mouse and keyboard) and 2x 1 USB for output. Those two outputs will be switchable by switch.

My question is: Can I just connect two input USB in parallel to make HUB? Or it will not work and mouse+keyboard will not be recognized? If it will not work what do I need to make it work?enter image description here

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Welcome to EE.SE! Paralleling won't work, but your switch may. You will most likely break any impedance matching. Anyhow, it's not worth it compared to what a USB hub would cost you. \$\endgroup\$
    – winny
    Aug 28, 2019 at 13:50
  • \$\begingroup\$ @winny He needs a KVM switch without video, the word hub is misleading. \$\endgroup\$
    – Ariser
    Aug 28, 2019 at 13:53
  • \$\begingroup\$ @Ariser Oh! Slightly more expensive, but they too exists as COTS. \$\endgroup\$
    – winny
    Aug 28, 2019 at 14:02
  • 1
    \$\begingroup\$ There are commercial and free software products designed to do just what you're trying to do. You'd be happier using any one of them than hardware switching \$\endgroup\$ Aug 28, 2019 at 14:19
  • \$\begingroup\$ sharemouse.com \$\endgroup\$ Aug 28, 2019 at 14:19

3 Answers 3

3
\$\begingroup\$

A hub is an active device, wiring data lines in parallel will not work,

Your idea of a conventional switch is likely to struggle but may still work for you. if it does you may be able to switch a normal hub.

\$\endgroup\$
0
2
\$\begingroup\$

Short answer, NO ...you cannot connect USB data lines in parallel under any circumstances.

Your situation is however much more complex in trying to share devices between multiple Host ports. A KVM does much more than simply switch devices from one computer Host to another, it is NOT a Hub. It maintains the heartbeat so that the keyboard and mouse are not disconnected from the computer as the switch is activated from port to port.

You can see this for yourself if you plug and unplug a mouse from your computer system. If you plug it in, it takes several seconds for the computer OS (via the Host interface, and called enumeration) to detect the device and load the appropriate driver. If you unplug the device then the driver unloads. A KVM provides enough endpoint functionality to ensure the computer does not unload the driver.

\$\endgroup\$
0
\$\begingroup\$

Basically it should be possible to switch between host devices.

Nevertheless the setup you proposed won't work reliably.

What you are trying to emulate is just unplugging a cable and replugging it to a different host. But then you have to emulate the complete behaviour. For the USB Hub and attached devices to initialise correctly also power has to be cut and reconnected. This could be achieved by using a switch with four contacts.

Additionally, when you look at a USB plug you may notice the power contacts being longer than the data contacts. This is to make sure, that power lines are connected before data lines are joined and in reversed order when disconnecting.

This could be emulated using a switch with more positions. 4P5T should be optimal, when Power for host 1 connect at pos 1&2, Data for host 1 at pos 1, Power for host 2 al pos 4&5 and data 2 connect at pos 5. This should emulate the behaviour of a plugging operation.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.