FTDI USB Communication fails after a undefinde time because of an overlapped timeout error

  c++, ftdi, overlapped-io, windows

I am building a software which on the one side connects to a device with a FT601 using FTD3XX library and on the other side to another software via TCP/socket communication.
I am using multiple threads – 1. TCP incoming data + USB outgoing data / 2. TCP outgoing data / 3. USB incoming data. Number 2 and 3 share a ring buffer.
For the USB incoming (asynchron read from USB) I used the FTDI data streamer demo app 1.3.0.4 as a template:

  • SetStreamPipe
  • InitializeOverlapped
  • ReadPipeEx
  • Rerun:
    • GetOverlappedResult
    • ReadPipeEx

After a undefined time the GetOverlappedResult always throws an Timeout Error (FT_STATUS: 19 / GetLastError(): 121). Once the failure occures, it will always be there even after restart of both Computer and Device.

Can anyone explain to me, what is going on and what am I missing / doing wrong? Or how can I fix this?

Thank you and best regards

Source: Windows Questions

LEAVE A COMMENT