0
\$\begingroup\$

Now that Bluetooth modules are dirt cheap, I'm wondering if I could make a pair of wirelessly connected objects that would act as a "virtual USB cable". One would have a pig tail with a USB Male plug (USB-host side), and the other would have a USB-device end on its pig tail. The goal would be for them to be able to wirelessly act like a wired USB cable, but wireless.

Requirements are simple: 1) Commodity hardware. If the cheap Bluetooth modules, plus a cheap MCU or two can do it, it's fair game. I can code and design circuits, but this project doesn't warrant me designing PCBs from scratch and coding protocols from scratch. 2) Does NOT need to support high speeds or charging port or anything fancy. If it can do USB 1.0 reliably, great. Primary usage would be for either USB printers or programming MCUs (Arduino, Launchpad, etc.) Neither of which need huge bandwidth.

If this is doable, what would the basic data chain look like? (Example: Host-side would be a generic PC USB dongle (just needs to support _____ protocol), and it would communicate via Bluetooth Serial (or other protocol) to the client that would be a generic Bluetooth module hooked to a ATMega32u4 board configured to use _______ protocol on it's USB out.)

I could swear I've seen online projects of guys doing this, but now that I'm interested in attempting it, I can't seem to find a similar project online to get a basic idea of how it would be done. If anyone knew of one, and had a link, I'd appreciate it.

Just as valid of an answer would be to point out why something like this won't work. (Obviously, such devices aren't being sold on E-bay en-masse, so their could be a real answer why USB signals can't be bridged across a wireless link due to latency or some-such.)

\$\endgroup\$
  • 1
    \$\begingroup\$ This would be impractical to do in a general sense, but it might be possible to hack something together for specific peripherals that don't mind a lot of delay. The best way to do a proof-of-concept would probably be two linux PCs/embedded boards with USB and bluetooth, and try to have one proxy for the other for your peripheral of interest in software. If you really want to appear as a USB device to the client system, then you will need something with device-side USB as well. \$\endgroup\$ – Chris Stratton May 11 '15 at 1:23
  • \$\begingroup\$ amazon.co.uk/Nulaxy-Adapter-Convert-Keyboard-Bluetooth/dp/… Already exist if its just keyboard and mouse you wish to use. \$\endgroup\$ – Stuart Naylor Oct 2 '16 at 3:19
1
\$\begingroup\$

Yes, this is possible.

As you pointed out, you could implement the interface to the USB host using a USB to TTL UART interface. You would still need a microcontroller in-between to set up the pairing etc. with the other Bluetooth device. So you can't just connect the UART directly to the TX/RX leads of the Bluetooth module. Because of the serial interface, you may be limited to as low as 115,200 bps, certainly no higher than 1 Mbps, which is not even as fast as the slower USB 1.1 rate of 1.5 Mbps.

However on the slave side, you will need to implement a USB host to talk to the slave USB interface. This is not trivial. There are quite a few chips that implement a hardware USB slave interface, but far fewer that implement a hardware USB host interface. On top of that, you will have to implement a USB stack. If you want to be able to handle connections to USB hubs, its even more difficult. Depending on the microcontroller you pick, you might be able to get a library to help with this, but plan on spending a lot of time getting it working.

\$\endgroup\$
  • \$\begingroup\$ You can't even use a generic USB/UART interface on the PC side, unless you can change the driver to expect something like that, rather than the original USB device - it's not only a question of different VID/PID but interface details that are often drastically different. \$\endgroup\$ – Chris Stratton Nov 16 '16 at 21:20
0
\$\begingroup\$

Yes you can trivially do this, but I can't imagine it'd be very useful or fun.

There are lots of software mechanisms for serializing a USB bus over a bidirectional communication channel (like a TCP connection). They're used for doing USB remoting - you can remote desktop to a server in the cloud, but that server can see the usb devices plugged into your computer).

There are a couple of implementations but the simplest would be to use linux on something like a Pi using usbip to forward a usb device over an ip connexion running over bluetooth (either pan, or ppp over serial (dun)).

\$\endgroup\$
-4
\$\begingroup\$

In my thought that it might work simple buying an external wireless hardware from the store which connect the two usb wireless together same as receiving video signal and audio signal with no cable the one plugged in pc hub does not need electric but the other one need to have electric like the mouse and keyboard and similar devices it is all about sending some data

\$\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.