I have the following setup:
FTDI USB->Serial chip hooked up to a CAN signaling transceiver.
Due to the nature of CAN, I automatically get local echo back through
the FTDI chip.
I'm not using the CAN protocol, but just its signaling properties.
The problem I am having is everytime I write something I must read
back what I've written in order to read back correct data from the
device it is hooked up to.

I am finding that if the string that I send is long enough (usually
greater than 22 bytes in most cases), the FTDI chip splits the
response into at least two IN data packets.
Unfortunately there is a large delay between these two packets (for a
write of 64 bytes its usually around 19ms @ 115200 baud).

I'm wondering if this delay can be shortened or if it is the result of
USB hardware on either end (either the FTDI chip or the USB
hardware/stack on the computer side).

A sample transaction with lots of debugging looks like the following:

FTDI FT232BM Compatible ttyUSB0: ftdi_write - length = 64, data = 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
drivers/usb/serial/ftdi_sio.c: sent write urb, count 64, at 0us
drivers/usb/serial/ftdi_sio.c: ftdi_write write returning: 64
drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 0
drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 0
drivers/usb/serial/ftdi_sio.c: ftdi_write_bulk_callback - port 0
drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 0
drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 0
drivers/usb/serial/ftdi_sio.c: 89: ftdi_read_bulk_callback at 2895us
data_count 25
drivers/usb/serial/ftdi_sio.c: ftdi_read_bulk_callback - port 0
drivers/usb/serial/ftdi_sio.c: ftdi_process_read - port 0
FTDI FT232BM Compatible ttyUSB0: ftdi_process_read - length = 25, data
= 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
drivers/usb/serial/ftdi_sio.c: 90: ftdi_process send urb at 2925us
drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 0
drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 0
drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 0
drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 0
drivers/usb/serial/ftdi_sio.c: 90: ftdi_read_bulk_callback at 18893us
data_count 43
drivers/usb/serial/ftdi_sio.c: ftdi_read_bulk_callback - port 0
drivers/usb/serial/ftdi_sio.c: ftdi_process_read - port 0
FTDI FT232BM Compatible ttyUSB0: ftdi_process_read - length = 43, data
= 01 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
drivers/usb/serial/ftdi_sio.c: 91: ftdi_process send urb at 18938us
drivers/usb/serial/ftdi_sio.c: ftdi_chars_in_buffer - port 0
drivers/usb/serial/ftdi_sio.c: ftdi_write_room - port 0
drivers/usb/serial/ftdi_sio.c: ftdi_close
drivers/usb/serial/ftdi_sio.c: 91: ftdi_read_bulk_callback at 22891us
data_count 0
drivers/usb/serial/ftdi_sio.c: ftdi_read_bulk_callback - port 0

Thanks in advance,
-- James Lamanna


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to