I am developing a Linux driver for a sonar sensor that uses a 2232C chip in its top box to communicate over serial with the sonar head. The basic workflow is that upon startup, the driver writes a series of messages to the TX buffer to set up some parameters, and then a message that tells the sonar to start pinging, at which point the driver starts pulling the returned data off of the RX buffer periodically. I'm using the C++ bindings to libftdi.
My problem is that the first time I run the driver program, it works just fine, but every subsequent time that I run it, the initial writes to the TX buffer timeout once they hit 128 bytes. However, if I power cycle the top box or unplug/replug the USB, the driver works again, but only the first time. Regardless of whether the writes succeed or timeout, a call to Context::close() return successfully. Having to power cycle the device each time is undesirable because this sensor is connected to an embedded system on an autonomous vehicle. I haven't been able to find references to similar problems on this forum, or elsewhere on the web, but perhaps I've overlooked something. Any assistance would be much appreciated, and I'll be happy to provide more info on request. Thanks, Jeff -- View this message in context: http://libftdi.141977.n3.nabble.com/I-O-stops-working-on-program-restart-tp4025522.html Sent from the libFTDI mailing list archive at Nabble.com. -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
