FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: USB communication fails after a undefinde time because of an overlapped timeout  (Read 8765 times)

j.pflaum

  • Newbie
  • *
  • Posts: 2
    • View Profile

I am building a software (in c) 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 I am missing / doing wrong? Or how I can fix this?

Thank you and best regards
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 896
    • View Profile

Hello,

We have a recovery procedure in this application note below (see section 3.2). Could you advise if this procedure helps to recover from the error?
AN_412_FT600_FT601 USB Bridge chips Integration
https://ftdichip.com/wp-content/uploads/2020/08/AN_412_FT600_FT601-USB-Bridge-chips-Integration.pdf

Best Regards, FTDI Community

Logged