..
David> The code assumes that there will be a modem status byte pair for
David> every 64 bytes returned by the ftdi chip. For the ft245BL, this
David> is true. For the ft2232H, it appears that the modem status bytes
David> are returned only once per usb_bulk_read call. Setting a break at
David> "if (ret > 2)", I examine the results of the bulk_read. There
David> are 106 bytes total. The first two bytes are the modem status
David> bytes as expected. The remaining 104 bytes are the data sent
David> from my device, with no additional modem status bytes embedded in
David> the stream. Thus, as the code stands now, it will delete bytes
David> 65 and 66, thinking that they are modem status bytes, when in
David> fact they are not.
Nice finding.
David> Could this be the issue? Is there anything else I can do on my
David> end to prove this out? What would be the suggested fix?
It seems to be the issue. The fixed "64" in the code above should probably
replaced by a variable set by the MaxPacketSize value of the appropriate
Endpoint descriptor.
David> </html>
Any need to repeat the mail message as HTML?
Bye
--
Uwe Bonnes bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|