Hello,
describe your setup better, e.g. what board you are talking to. Can
you read out the board in some other programm ?
The code in src/ftdi_stream.c
struct timeval timeout = { ftdi->usb_read_timeout / 1000,
(ftdi->usb_read_timeout % 1000) * 1000 };
should do the right thing when you increase usb_read_timeout.
But does your device stream out data without any trigger at all?
Bye
>>>>> "Michal" == Michal B <developer.m3@xxxxxxxxx> writes:
Michal> Dear development team, i'm having issue with ftdi
Michal> stream function ... i upgraded my linux to debian 11
Michal> bullseye , might be old at this moment but there is issue
Michal> with recent version of libftdi1 , my kernel is
Michal> 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10)
Michal> x86_64 GNU/Linux in debian i have: libftdi1-2:amd64
Michal> .... 1.5-5+b1 libusb-1.0-0:amd64 .... 2:1.0.24-3 first i
Michal> tried stream_test.c from examples, i got error -2 ... not
Michal> usable anymore ... then i used source code ftdi_stream.c,
Michal> i found that call of
Michal> libusb_handle_events_timeout(ftdi->usb_ctx, &timeout); is
Michal> too short to be timeouted , i found that struct timeval
Michal> timeout = { 0, ftdi->usb_read_timeout * 1000}; is
Michal> evaluated to value: { 0, 5000 * 1000}; .... the question
Michal> is : is it acceptable to set timeout { 0 sec, 5M usec }
Michal> and not { 5 sec, 0 usec } ? possibly it could be ignored
Michal> to zero timeout ... then i found that bInterval is zero (
Michal> during open device and try to stream read ): # lsusb -v -d
Michal> 0403:6010 | grep -E '(iInterface|bInterval)' iInterface 2
Michal> USB <-> Serial Converter XX FPGA bInterval 0 bInterval 0
Michal> iInterface 2 USB <-> Serial Converter XX FPGA bInterval 0
Michal> bInterval 0 in my code i call
Michal> ftdi_set_latency_timer(ftdi_handle, 2) as it is in example
Michal> ... this means that bInterval ( latency_timer ) is reset
Michal> afterwards during read stream for some reason, i found
Michal> that reset is possibly after each timeout of
Michal> libusb_handle_events_timeout(); so i tried call
Michal> ftdi_set_latency_timer(ftdi_handle, 2) before each
Michal> libusb_handle_events_timeout() and i got some streaming
Michal> ... i hope my information helps to improve libftdi1 ...
Michal> Kind regards ...
Michal> __________________________________________________________________
Michal> libftdi - see
Michal> [1]http://www.intra2net.com/en/developer/libftdi for
Michal> details. To unsubscribe send a mail to
Michal> [2]libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
Michal> Verweise
Michal> 1. http://www.intra2net.com/en/developer/libftdi
Michal> 2. mailto:libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
--
Uwe Bonnes bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|