USB disconnect with FTDI FT2232H : urb->status -104

Hello,

I'm using an OpenWRT system (MIPSEL) as an USB server and a Debian 10 VM (QEMU) as a client.

I've installed the latest VirtualHere version for the server and the GUI client.

I would like to share an evaluation board based on the USB chip FTDI FT2232H (dual serial link with JTAG capabilities: ttyUSB0 and ttyUSB1) between the server and the client.

The connection seems to be ok
....
[ 237.515481] usbcore: registered new interface driver usbserial_generic
[ 237.515781] usbserial: USB Serial support registered for generic
[ 237.518778] usbcore: registered new interface driver ftdi_sio
[ 237.519907] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 237.520387] ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
[ 237.520780] usb 2-1: Detected FT2232H
[ 237.523504] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
[ 237.523962] ftdi_sio 2-1:1.1: FTDI USB Serial Device converter detected
[ 237.524365] usb 2-1: Detected FT2232H
[ 237.527091] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB1

But when I would like to program the evaluation board, one on the USB port is disconnected and I get errors

[ 313.498090] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 313.498712] ftdi_sio 2-1:1.0: device disconnected
[ 313.883799] vhci_hcd: unlink->seqnum 326
[ 313.884087] vhci_hcd: urb->status -104
[ 313.884367] vhci_hcd: unlink->seqnum 327
[ 313.884630] vhci_hcd: urb->status -104
[ 313.884911] vhci_hcd: unlink->seqnum 328
[ 313.885134] vhci_hcd: urb->status -104

The link is at high speed 480 Mbit/s but the evaluation board is also compatible with full speed 12 Mbit/s

Any help would be much appreciated

Kind regards,

#2

Can you post /var/log/syslog from the server

#3

Hi Michael,

Here is the log file generated by the server daemon (just removed date & time)

LOG_INFO >>> Starting VirtualHere USB Server v4.3.7 (Built: Feb 22 2022, 15:35:10)<<<
LOG_INFO Using configuration /usr/bin/config.ini
LOG_INFO Server licensed to=unlicensed max_devices=1
LOG_INFO Using large URB's
LOG_INFO Listening on all network interfaces at TCP port 7575
LOG_INFO Found High speed device [0403:6010] "Digilent, Digilent Adept USB Device" at address 11
LOG_INFO 192.168.2.253 connected as connection 1
LOG_INFO Device 11 [0403:6010] BOUND to connection 1
LOG_WARNING Error 22 discarding urb 0x185d820 for device /sys/bus/usb/devices/1-1, Invalid argument
(abort endpoint)
LOG_WARNING Error 22 discarding urb 0x185d7b0 for device /sys/bus/usb/devices/1-1, Invalid argument
(abort endpoint)
LOG_WARNING Error 22 discarding urb 0x185d800 for device /sys/bus/usb/devices/1-1, Invalid argument
(abort endpoint)
LOG_WARNING Error 22 discarding urb 0x185da70 for device /sys/bus/usb/devices/1-1, Invalid argument
(abort endpoint)
LOG_WARNING Error 22 discarding urb 0x185d8f0 for device /sys/bus/usb/devices/1-1, Invalid argument
(abort endpoint)
LOG_WARNING Error 22 discarding urb 0x185d9b0 for device /sys/bus/usb/devices/1-1, Invalid argument
(abort endpoint)
LOG_WARNING Error 22 discarding urb 0x185d7b0 for device /sys/bus/usb/devices/1-1, Invalid argument
(abort endpoint)
LOG_WARNING Error 22 discarding urb 0x185df70 for device /sys/bus/usb/devices/1-1, Invalid argument
(abort endpoint)

#4

I think you should try a later debian, the kernel 4.19 is quite old

#5

Hi Michael,

Good point, I've upgraded the Debian 10 kernel from 4.19 to 5.10

Linux stellar 5.10.0-0.bpo.9-amd64 #1 SMP Debian 5.10.70-1~bpo10+1 (2021-10-10) x86_64 GNU/Linux

Unfortunately I get the same URB issues.

Do you have any other test ?

Regards,

#6

I have two other ideas.

1. Stop the virtualhere server on the mips device and then edit the config.ini file and add the line

ClaimPorts=1

save the config.ini file and start the server.

2. Right click on the FT device in the virtualhere client, select Custom Event Handler and paste in exactly this line:

onReset.$VENDOR_ID$.$PRODUCT_ID$=

then press OK and try to use it.

if that still doesnt work then i dont think it will work via VirtualHere unfortunately.

#7

Michael, thank you very much for your suggestions but unfortunately I still have issues.

It seems that the data transfer is in burst mode and I think there may be an overrun/overflow problem.

The FTDI works at 480 Mbit/s or at 12 Mbit/s, is there a possibility to force the communication link to 12 Mbit/s?

Regards,

#8

No its an electrical change which modifies the speed, software cant do it.

What is your latency like? In the virtualhere client right click USB Hubs-About->Statistics.