I'm trying to get two slave devices (ie no host controller) to communicate.

  • Slave 1: USB with FT232RQ chip
  • Slave 2: DB9

Using standard USB to RS232 converter cables, I cannot get the two devices to communicate with each other. I believe this is due to not having a "host controller"?

So to get communication I think I need to introduce a "host" controller between the two slaves:

TTL <-> Host <-> RS232

Am I along the right lines with this idea/solution?

  • 5
    \$\begingroup\$ Why not just bypass the USB requirement entirely? \$\endgroup\$ – Ignacio Vazquez-Abrams May 30 '18 at 18:56
  • 1
    \$\begingroup\$ Although you're not entirely wrong, it would be orders of magnitude easier to do as Ignacio suggests. \$\endgroup\$ – brhans May 30 '18 at 18:57
  • \$\begingroup\$ both slave devices are production units so am unable to make changes at this stage. Can only make firmware changes on the USB device. @brhans \$\endgroup\$ – user3424480 May 30 '18 at 19:02
  • 6
    \$\begingroup\$ There is a device that could do that, vinculum, google it. But it's better not to use usb at all, guys before me are right. \$\endgroup\$ – Gregory Kornblum May 30 '18 at 19:18

I think there is a confusion somewhere here. You cannot say "slave DB9 device" because even though DB9 is used for countless protocols (CAN, USART etc.) none of them has anything to do with the meaning of USB slave device.

Unless, of course, this DB9 is connected internally to another Serial-to-USB converter inside that leads to actual USB slave further down the line. But since hiding USB slave in a box separated from the world by serial interface has very little sense I would assume it is not the case here.

So, you basically have some unknown (to me) device with some TTL based serial protocol on the DB9 side. By connecting RS232-to-USB cable to it you do NOT magically make it a slave device. Or, more precisely, you make it into "vendor class" USB slave with FTDI (or whatever chip is inside that cable) interface descriptor.

On the other side you have device with USB connector internally attached to FT232R chip and further to MCU with serial interface. This tells me that Slave 1 is not a true USB slave either. FT232R chips are used as a transport layer between serial interface of the device and virtual serial port on the host computer.

Which basically means you have another serial device (neither host nor slave) on this side as well. And if you have an access to its firmware you can program whatever serial protocol the DB9 device supports. This is a good thing.

The bad thing, is that FT232R chip requires host in the middle, no workaround here. So, you basically have four options:

  1. Hardware + Software option: Make your own adapter with USB host based on USB-capable MCU. Your software will have to work as FTDI driver too. This is most complex approach but it should make it possible to not make any changes in Slave 1 firmware.

  2. Hardware + Firmware option: Make your own adapter using Vinculum chip from FTDI. Load it with pre-programmed UART-to-FT232 host bridge software image. It is possible that someone already making these adapters or cables commercially, so surf the web for it. Modify firmware on Slave 1 to communicate to Slave 2 as if they are connected directly by UART. This is most portable approach, basically your own RS232-to-USB cable.
    UPDATE: actually, FTDI makes development board practically ready for this application.

  3. Software option: Connect both devices to PC, Slave 1 directly, Slave 2 via regular RS232-to-USB cable. You will get two COM ports on the computer. From here you can write "controller" program to communicate with both devices via those COM ports.

  4. Software + Firmware option: Connect both devices to PC as above. Bridge two COM ports using any available software, like virtual serial port driver by Eltima. Modify firmware on Slave 1 (exactly like in option 2 above).

  • \$\begingroup\$ option to with option 2, however I have since discovered that the only 2.5v is been supplied by the USB B port on slave 1. So I'll need to add another board/module beforehand to step up to 3.3/5v first. @Maple \$\endgroup\$ – user3424480 Jun 2 '18 at 12:42
  • 1
    \$\begingroup\$ There not supposed to be ANY power supplied from device at all. It is host job to supply power, so both hardware solutions require external power or battery. #2 is good choice. If it was me, I'd go with #3 if PC use is allowed or #2 if not. \$\endgroup\$ – Maple Jun 2 '18 at 17:46

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.