Electronic – Is the following USB connection possible: Host USB to converted to serial (FTDI) and then converted back to USB (FTDI)

ftdiserialusb

I am trying to connect a host USB device on one board to an endpoint USB device on another board, but I am required to send the link between the two devices as a serial (UART) connection between the two boards. The USB to Serial and Serial to USB converters would be housed on the individual boards that house the respective host and endpoint devices.

I need the host USB device to recognize the endpoint device as a USB endpoint just the same as if it were a direct USB connection.

Is it possible to get this work in the way I need? I understand the communication speed would be much slower than conventional USB. I have seen FTDI conversion chips that claim to work up to 3Mbaud, (like this one: https://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT234XD.pdf) and I would think ~2Mbaud would be sufficient for what I am doing. The chip I linked seems to be exclusively for USB host devices to convert to serial out, I have not been as successful at finding a device expected to work in the opposite direction (serial to USB endpoint).

Has anyone done something like this successfully before, or perhaps can identify to me that this is impossible for reasons X, Y, Z?

Best Answer

No, as described this will not work. Traditional FTDI USB-Serial converters can only fill the USB device role. They cannot host your far-end USB device. So while you might be able to use one on the near end, you'll require something else on the far end.

There are however embedded USB hosts you might be able to use. These are all ultimately Microcontrollers - some such as FTDI's Viniculum / Viniculum II are sold specifically for this type of purpose (but may or may not fit your exact need) and others are more general-purpose devices definitely able to be customized for this task, perhaps something like a Kinetis KLZ25/KLZ26 (aka Teensy-LC), an STM32 with USB host capability, etc. Or even a small embedded Linux system, though that raises complexity and power consumption, introduces delicate filesystem state, etc.

Regardless of the hardware the first task will be to figure out the exact USB operations expected by the far end device. You'll effectively need to come up with a custom USB driver for that for an embedded host, or decide that there is already one in Linux which you can use by building the far end of your bridge around an embedded Linux system. Or you'll invent some sort of USB-proxying scheme and come up with a custom driver or driver interceptor on the near end operating system that proxies through serial.

Note that things like USB-over-fiber extenders exist. That won't strictly fit your stated requirement of proxying over serial, but it might well fit your actual need and would save you a lot of development time. For that matter you could perhaps move the entire computer to the remote location and interact with it remotely over a network.