Dear development team,
i'm having issue with ftdi stream function ...
i upgraded my linux to debian 11 bullseye , might be old at this moment but
there is issue with recent version of libftdi1 ,
my kernel is
5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64 GNU/Linux
in debian i have:
libftdi1-2:amd64 .... 1.5-5+b1
libusb-1.0-0:amd64 .... 2:1.0.24-3
first i tried stream_test.c from examples, i got error -2 ... not usable
anymore ...
then i used source code ftdi_stream.c,
i found that call of libusb_handle_events_timeout(ftdi->usb_ctx, &timeout);
is too short to be timeouted , i found that
struct timeval timeout = { 0, ftdi->usb_read_timeout * 1000};
is evaluated to value: { 0, 5000 * 1000}; .... the question is : is it
acceptable to set timeout { 0 sec, 5M usec } and not { 5 sec, 0 usec } ?
possibly it could be ignored to zero timeout ...
then i found that bInterval is zero ( during open device and try to stream
read ):
# lsusb -v -d 0403:6010 | grep -E '(iInterface|bInterval)'
iInterface 2 USB <-> Serial Converter XX FPGA
bInterval 0
bInterval 0
iInterface 2 USB <-> Serial Converter XX FPGA
bInterval 0
bInterval 0
in my code i call ftdi_set_latency_timer(ftdi_handle, 2) as it is in
example ...
this means that bInterval ( latency_timer ) is reset afterwards during read
stream for some reason,
i found that reset is possibly after each timeout of
libusb_handle_events_timeout();
so i tried call ftdi_set_latency_timer(ftdi_handle, 2) before each
libusb_handle_events_timeout() and i got some streaming ...
i hope my information helps to improve libftdi1 ...
Kind regards ...
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [email protected]