libftdi Archives

Subject: Re: I/O stops working on program restart

From: jeffdelmerico <jad4@xxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Thu, 24 Oct 2013 14:04:07 -0700 (PDT)
Hi Thomas,

Thanks for your response.  I tried a few combinations of your suggestions,
but to no avail:
     - Attempting to read any data upon opening the device is successful,
but returns 0 bytes read. Program still hangs when trying to write on second
run.
     - Flushing both the write and read buffers on startup or before closing
does not resolve the hanging issue.
     - Resetting the context on startup or before closing also does not
resolve it.

I should mention that the first few messages that are written during the
setup process do not elicit any responses from the device. It is only when
the command to start pinging is sent that data starts being returned to the
Rx buffer.  However, the timeouts occur when writing those first few
messages, before any data is actually returned. 

It's curious to me that unplugging and replugging the USB is effective in
addition to power cycling the device.  I don't know how libftdi interacts
with usbfs, and whether closing the context unmounts the device, but perhaps
it needs to be remounted before it can be used again.  Does this seem
plausible?  If so, any ideas on how to automatically do that?

Thanks for your help.

Best Regards,
Jeff



--
View this message in context: 
http://libftdi.141977.n3.nabble.com/I-O-stops-working-on-program-restart-tp4025522p4025545.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 libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread