libftdi Archives

Subject: libftdi only works if /dev/ttyUSBx is accessed by other method first

From: Pelle Windestam <pelle@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 24 Oct 2012 08:26:54 +0200
Hello,

I am using libftdi to access a FTDI 2232D chip. I have two configurations of the 2232D, in one case it is completely unmodified, and in the other case it is configured to be used as a JTAG debug board (http://wiki.openmoko.org/wiki/Debug_Board_v2). In both of these cases one of the FTDI UARTs is connected to a RS-485 transceiver.

I am experiencing problems with the second case, the debug board. If I connect the FTDI-device and try to communicate using libftdi, it does not work. I can successfully open the device, but I cannot communicate with my external device (over RS-485). If I print out what I read back from the serial port I am flooded with data containing only zeroes (nothing from the external device). After my application is finished, the ttyUSBx device has been removed from /dev.

While troubleshooting this I discovered that if I communicate using /dev/ttyUSBx (open(), write(), close()) it works perfectly. I also discovered that if I use this method first, I can use the libftdi afterwards. Upon reconnection it fails again if I try to use libftdi first.

I have tried this using libftdi-0.2 and libftdi from the git repo. Any ideas?

//Pelle

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
Current Thread