1

I'm helping out with a project for an embedded device that only has USB and no serial. This device is running Linux.

These days, when we need to connect to a serial port on a device we typically use a USB to serial adapter (on something like a phone system or a load balancing device, etc). I would like to know if it is possible to have the host device behave as though it were a serial adapter, thus removing the need for one. Given the nature of USB, is this approach even necessary?

To recap, I would like to be able to connect a single A-to-A USB cable from my workstation (be it windows or linux) to this device, for the purpose of administration (especially initial setup), using minicom, putty or hyperterminal.

Thanks

Edit

Okay, I'm admitting defeat on this idea. That said, I'm thinking that it would be possible to accomplish this goal using two usb-serial adapters and one serial cable?

The problems with this approach would be:

  1. Getting linux to wait for and recognize a serial adapter being hotplugged, and then invoking getty to listen on that port (this should be easy enough to solve)
  2. Balancing the cost and quality when selecting these parts, or possibly having a single product manufactured. Maybe there already is something like this available for purchase?

1 Answer 1

2

are you referring to connecting two host devices directly? If so, I believe this is impossible. USB A-A cables are not standards compliant for this reason. When you use a serial-type device over USB, either you use a USB cable and there's a USB-serial converter chip (usually made by FTDDI) inside the client device, or you use a DB9 cable with an adapter on the end that has the same chip.

This chip converts the voltage levels and handles the USB protocol. In the end, it just adds an extra virtual serial port to the host and connects the device to it.

So in answer to your question, hardware that works like this was usually designed to support a serial interface with a converter chip tacked on and included in the package. As this embedded system seems to operate as a host, it won't have such a chip.

2
  • Could it theoretically be done with a host-to-host cable, such as the one for sale at datapro.net/products/usb-2-0-host-to-host-cable.html ? Jan 13, 2011 at 17:52
  • 1
    @andyortlieb having never used one I can't say for sure, but I imagine these cables have custom hardware specifically for file transfer and unrelated to the USB serial mode. Either there are custom drivers, or a chip that pretends to be a mass storage device to both computers. Either way, this isn't two USB hosts talking to each other: it's two usb hosts talking to a third party. Jan 13, 2011 at 19:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .