Closed ygoe closed 2 years ago
I also get a 0x00 byte filled result. but when connecting my STM32 device. I have modified the example to show the result.
If you read the "Error writing/reading data #11 ", it becomes clear that the ENABLE_ASYNC_READS asynchronous mode does not work in all drivers. For Example in STM32driver need set ENABLE_ASYNC_READS =false. setting this flag to false will switch the driver to work on another "Branch".
numBytesRead = mConnection.BulkTransfer(mReadEndpoint, mReadBuffer, readAmt, timeoutMillis)
But I could be wrong and it's not that simple.
I can't say anything about STM32, I have no such hardware here. The FTDI driver issue was clearly a programming mistake which I could identify and fix. See my referenced merge request above.
I just tried to use this library with an FTDI adapter. It reports the correct (I assume) number of bytes received, but the buffer is full of 0x00 bytes. The correct data is received with a CP21xx adapter.
I'm trying to find out why that is.