1
\$\begingroup\$

I have been developing code for this open source flight controller, and the one thing that I would like to improve with my workflow is to be able to flash the firmware wirelessly.

I am able to perform all debug and I/O interfacing with the device wirelessly via WiFi-networked Raspberry Pi's, however the one missing link is that I must plug the board in physically via USB in order to flash the firmware that I build.

Option 1: Push code from laptop to desktop computer through the network. This computer is plugged in to the controller and can do the flashing. Indeed I could probably use a third Raspberry Pi to perform this task as well, but the performance cost of running the firmware build toolchain on such a slow device is unappealing.

Option 2: Wireless USB hardware

I will be using Option 1 because there is clearly not enough support for Option 2, and it also happens to be the case that I need a reliable and robust data link.

However I would like to explore the possibilities of Option 2 because I think there is some potential in it. It seems to me that this should be possible to make USB wireless in a transparent way at the hardware level, by e.g. using RF. What would be some of the challenges in realizing this?

Terribly practical this will not be, and neither will USB 3 (or maybe even 2) rates be likely attainable practically, but considering just the sheer volume of USB devices out there, such a gadget would come in handy.

I'm not very familiar with USB protocol, but maybe some aspect of it will become difficult when the physical layer introduces latency. My hope is that this can be done transparently with hardware so that the wireless USB cable will appear to the host devices as nothing more than a somewhat long cable. Now it does appear that USB is limited in this regard as USB 2.0 has a limit of 5 meters of cable so the latency requirement alone may rule out the ability to do this. Surprisingly to me, USB 1.0, 1.1 and 3.0 also limit cable length at 5 meters or even shorter.

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

I don't think that you should write off your option 2 yet. There are a few good wireless USB hubs out there, if you can find a way to power them and if you can tolerate their size/weight. We have used the Silex hubs for our USB devices and we have been very pleased.

http://www.silexamerica.com/products/connectivity-solutions/device-networking/usb-parallel-connectivity/sx-ds-3000wn/

One thing that you need to be very careful of is that your target board is probably a USB DEVICE, not a host. So when you are looking for USB-over-wireless solutions, be sure that they are servers/hubs/bridges and not just dongles. If the device has a USB-A plug or a USB-B receptacle, it probably isn't what you want. You'll want a USB-A receptacle or a USB-B plug.

\$\endgroup\$
  • \$\begingroup\$ USB 2.0 over 802.11n. That's... interesting! I will accept this because you are indicating not only that this stuff already exists AND that it works but also some tips on which types of devices may be compatible! I wonder how this gets around the fact that WiFi will have milliseconds of latency but USB itself in cable form can't tolerate more than a few microseconds? Something cool has to be happening under the hood. \$\endgroup\$ – Steven Lu May 20 '14 at 20:38
  • \$\begingroup\$ I will tell you what I think/know. The magic is in the USB-over-IP sauce, not necessarily the wireless sauce if you will. There are two parts to the USB-over-IP system. On the hub side, the hub itself runs a USB host and an IP server. On the computer side, these vendors provide software that emulate a USB device. It's really very neat. I have actually talked with engineers at a few of these companies to try to get the details of their USB-over-IP protocols, but these companies are pretty tight lipped about it. \$\endgroup\$ – FL_Engineer May 23 '14 at 18:36
  • \$\begingroup\$ To answer your question more explictly, the way that USB-over-IP probably works is that the computer sends a packet via ethernet to the hub that tells the hub to read or write X number of bytes from or to endpoint Y. The hub then performs the USB transaction, so the tight timing of the USB transfers is just contained in the hub. The computer can take as much time as it wants. We have actually used these USB-over-IP hubs located hundreds of miles from the client PC. The transfers are quite slow, but they are pretty robust as long as your software doesn't have tight real time requirements. \$\endgroup\$ – FL_Engineer May 23 '14 at 18:52
  • \$\begingroup\$ That's really amazing to be able to take ordinary USB devices and to transparently Internet-enable them. In fact this kind of product is probably an open door into a few interesting hardware-emulation possibilities as well (if this isn't locked down on the hardware side). I think that one time that a problem could be insurmountable here is if there is some sort of latency dependent protocol happening over USB, maybe for example, a handshake that has a short timeout (also might fail with a USB cable that's too long). With a USB-over-IP system, we run into the brick wall of physics here. \$\endgroup\$ – Steven Lu May 23 '14 at 23:10
  • \$\begingroup\$ So I'd imagine that the more "unidirectional" a USB device is, the more likely it will function flawlessly over such an interface. Webcams, MS Kinect sensors maybe. But something like a mass storage device... or, say, the USB connection between a Mac and an iPhone (used to e.g. upgrade the OS on the phone), now that may be riskier! I think it comes down to how protocols are implemented. \$\endgroup\$ – Steven Lu May 23 '14 at 23:14
1
\$\begingroup\$

Wiki says this about USB: -

Universal Serial Bus (USB) is an industry standard developed in the mid-1990s that defines the cables, connectors and communications protocols used in a bus for connection, communication, and power supply between computers and electronic devices.

What should Wireless-USB mean? Well, it's a problematic definition because USB all about: -

  • Cables
  • Connectors
  • Comms Protocol
  • Power

Realistically to refer to "wireless USB" is to imply wireless-cables, wireless-connector and wireless-power and this sounds stupid so, my advise is, if you want to transmit wirelessly between points A and B via something plugged into a USB port (the A end) then don't call it "wireless USB" because it isn't.

At the far-end (point B) there could be another computer-like device with something plugged into its USB that is able to receive packets of data from the similar device at point A but the device plugged into B's USB port is not a wireless USB - it's a dongle that can send data to A or receive data from A.

There are plenty of radio sub-systems/modules around that could fit the bill but it all depends on what you want to do with it rather than what you want to call it.

Here is what Nordic have to offer (the red lines were drawn by me): -

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Well, so it is true that transmitting power with it is not going to be practical but I would bet that a majority of USB devices can function if you just "faked" the power transmission (if the "Wireless USB" transponder has a battery or is plugged in to mains, for example). I'm just proposing a two part gadget (one USB port attached to some kind of RF radio, and another USB port also with a radio which is paired with the first one, which also maybe has a battery or a DC-in) that takes the place of a one piece USB cable. \$\endgroup\$ – Steven Lu May 20 '14 at 18:17
  • \$\begingroup\$ The radio sub-systems/modules you speak of might be things like e.g. RF dongle for a wireless USB mouse. that's not the answer because that only works on a specific gadget (the mouse). \$\endgroup\$ – Steven Lu May 20 '14 at 18:20
  • \$\begingroup\$ Not really, radio data needs to be packetized and have fairly sophisticated error checking codes appended then, it needs to be helped along with packet preambles. That's just the transmission. The reception has to ignore a thousand other interfering elements that may be the real signal and only recognize data that is valid for it. \$\endgroup\$ – Andy aka May 20 '14 at 18:20
  • \$\begingroup\$ And no (again), I'm not targeting a specific piece of computer hardware such as a mouse so don't assume I am. That would be a mistake!! \$\endgroup\$ – Andy aka May 20 '14 at 18:22
  • \$\begingroup\$ So do you mean to say that such an item as I have described already exists? Yes turning this into a radio system will heap a hefty amount of complexity onto it. But it still appears very possible in theory. The inquisition is mostly fueled by that use case I had (data transmission over USB, likely via an underlying serial link), which essentially is dealing only with data: cables, connectors, and power be damned. Really, with just the data bit, such a product, if it could exist, can help you connect many many of the USB devices out there and give them wireless capability \$\endgroup\$ – Steven Lu May 20 '14 at 18:23

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.