0
\$\begingroup\$

I have a product (or concept of) based on a microcontroller acting as a USB host to control a given device. The device also needs to be controlled by another device (host). Assume that my device has say on which host is connected to the device. It knows when the other host is finished with the device and can relinquish control.

Given that...

  • Any potential issues with multiplexing the Vusb, D+ and D- signals to the device and switching between the two hosts?
  • Assuming the answer to the above is 'no', any recommendations or considerations on the actual IC that performs the switching? This would be a full speed implementation (12 Mbps).

EDIT:

Basically I have two existing devices (other host and other device). These things talk together quite well but other host doesn't make use of some of other device's features. Without modifying other host, I'd like to create my device. Both other host and other device plug into my host. My host will control other device until notified by the user that it would like to make use of the features provided by other host. When this happens, my host will throw a switch (multiplexer) which physically connects other host to other device. So, I am simply simulating the user removing the USB cable from my host and plugging it into the other host.

I know it would be ideal if my host could just implement everything that other host does and eliminate other host but there are reasons for doing it this way.

High Level Connections

\$\endgroup\$
  • 1
    \$\begingroup\$ If you will have 2 usb ports, any reason you can't just have 2 usb controllers? \$\endgroup\$ – Kellenjb Mar 19 '12 at 10:21
  • 1
    \$\begingroup\$ To avoid reinventing the wheel, you might be interested in exploring the use of an I2C bus instead: en.wikipedia.org/wiki/I%C2%B2C \$\endgroup\$ – shimofuri Mar 19 '12 at 15:50
  • \$\begingroup\$ @shimofuri That would be fine but you see the device that I am interfacing to as well as the other host have defined interfaces... USB. These are existing products. I can not change this. \$\endgroup\$ – Jason Mar 19 '12 at 23:28
  • \$\begingroup\$ Check out Cypress USB products, they had something like this for serial port. What you ask cannot be easily done, unless you implement several class drivers or severely limit the use cases. \$\endgroup\$ – Ktc Mar 20 '12 at 0:27
1
\$\begingroup\$

Not sure if this is the proper thing to do but I have found the answer I am looking for in another question. It was answered to my satisfaction by @tcrosley here Designing A Simple Automatic USB Switch

This is precisely the part I need.

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

I think USB over Ethernet is the closest you're going to get. You attach the device to one system and from the command prompt you can route it to another IP-address. http://usbip.sourceforge.net/ Both host and concept must be attached to the network.

\$\endgroup\$
  • \$\begingroup\$ That project is very interesting! I am going to have to look into that a bit more. However, that is not the solution for the problem above (or rather not a desirable solution). It would mean adding ethernet... \$\endgroup\$ – Jason Mar 19 '12 at 23:56
0
\$\begingroup\$

There are specific chips for this, for example the TS3USB30, and a couple of actual products, e.g. the Lindy USB 2.0 AutoSwitch (not automatic despite the name), and the UGreen USB Switches (they have 2-host and 4-host versions).

The IOGear GUB211 also claims to be able to be switched from the host machine, rather than using a button. It's designed for printers and they have custom software to detect print jobs and switch based on that, but it should be fairly easy to sniff the USB connection and write your own software to do it.

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

In addition the USB switch chip possibility, if you fully understand the way the USB channel is being used by the particular target product, a possibility could be to use a dual-USB MCU (for example certain members of the STM32F4 series) and build a protocol-aware passthrough/proxy device.

Essentially this would impersonate the ultimate device to the ultimate host, and vice versus. This is hard to do for arbitrary USB usage, but may not be particularly complex for a particular device, especially one which is only USB full speed.

A potential advantage of this over the mode switch, is that with enough insight into the functionality of the ultimate device, it may be possible to in a few limited ways actually share the device, with both the upstream host and your man-in-the-middle MCU able to issue some non-conflicting requests. But such non-modeswitched sharing will be tricky, limited, and require full understanding.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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