Reset USB device

Hello. I'm trying to use my Raspberry Pi 4 as a usb hub for my racing simulator setup and i'm having some troubles.

When I connect more than one device to Raspberry Pi, I keep having steering wheel freezing for a second and error messages in dmesg:

[  +3.203957] usb 1-1.2.4: reset full-speed USB device number 8 using xhci_hcd
[  +0.280048] usb 1-1.2.4: reset full-speed USB device number 8 using xhci_hcd
[  +3.859979] usb 1-1.2.4: reset full-speed USB device number 8 using xhci_hcd
[  +0.276016] usb 1-1.2.4: reset full-speed USB device number 8 using xhci_hcd
[  +1.452011] usb 1-1.2.4: reset full-speed USB device number 8 using xhci_hcd
[  +0.276011] usb 1-1.2.4: reset full-speed USB device number 8 using xhci_hcd
[  +1.064016] usb 1-1.2.4: reset full-speed USB device number 8 using xhci_hcd
[  +0.279990] usb 1-1.2.4: reset full-speed USB device number 8 using xhci_hcd

 

When I use steering wheel connected only, with no keyboard, it'” gets much better but still I have some resets once in a while (maybe one in 10-15 minutes). The same I had when I used Thrustmaster T300RS (with no other equipment), current setup - Simagic Alpha U + keyboard. And it starts freezing only when a game is launched. No errors while it’s connected and kept calm.

I have more frequent resets with Rii 8X plus (integrated touchpad + keyboard), maybe every 30 seconds, I tried logitech mouse + wired keyboard by HyperX instead of Rii and got even more frequent resets, once per 3-5 seconds. What's strange - only steering wheel gets this resets.

I tried externally powered USB hub and used it in different combinations: tried connecting mouse to the raspberry directly and to the hub, everything in hub and other options. Nothing changes. I bought second license for the same raspberry to use it with CloudHub firmware. The same result. Tried that options combined and separately: separately:

I checked latency graph, and it's very stable, less that 1ms, with no spikes at all. (I use ethernet connection)

ClaimPorts=1
CompressionLimit=5000000

No effect. 

Used equipment: 

Simagic Alpha U + Pedals P100 + Gearbox, peripherals are connected to wheel base and recognized by PC as one device.
Rii 8X+ keyboard + touchpad
HyperX FPS keyboard
Logitech wireless mouse

#2

I have seen this with single TT hubs. Could you tell me what USB hub you tried? Do you have a link to it.

#4

Can plug that hub into the pi then ssh to the pi and type

lsusb -v 

and post the output here

#5

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Couldn't open device, some information will be missing
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               3.00
 bDeviceClass            9 Hub
 bDeviceSubClass         0
 bDeviceProtocol         3
 bMaxPacketSize0         9
 idVendor           0x1d6b Linux Foundation
 idProduct          0x0003 3.0 root hub
 bcdDevice            6.06
 iManufacturer           3 Linux 6.6.31+rpt-rpi-v8 xhci-hcd
 iProduct                2 xHCI Host Controller
 iSerial                 1 0000:01:00.0
 bNumConfigurations      1
 Configuration Descriptor:
   bLength                 9
   bDescriptorType         2
   wTotalLength       0x001f
   bNumInterfaces          1
   bConfigurationValue     1
   iConfiguration          0
   bmAttributes         0xe0
     Self Powered
     Remote Wakeup
   MaxPower                0mA
   Interface Descriptor:
     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        0
     bAlternateSetting       0
     bNumEndpoints           1
     bInterfaceClass         9 Hub
     bInterfaceSubClass      0
     bInterfaceProtocol      0 Full speed (or root) hub
     iInterface              0
     Endpoint Descriptor:
       bLength                 7
       bDescriptorType         5
       bEndpointAddress     0x81  EP 1 IN
       bmAttributes            3
         Transfer Type            Interrupt
         Synch Type               None
         Usage Type               Data
       wMaxPacketSize     0x0004  1x 4 bytes
       bInterval              12
       bMaxBurst               0

Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. Hub
Couldn't open device, some information will be missing
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               2.10
 bDeviceClass            9 Hub
 bDeviceSubClass         0
 bDeviceProtocol         1 Single TT
 bMaxPacketSize0        64
 idVendor           0x05e3 Genesys Logic, Inc.
 idProduct          0x0610 Hub
 bcdDevice            6.56
 iManufacturer           1 GenesysLogic
 iProduct                2 USB2.1 Hub
 iSerial                 0
 bNumConfigurations      1
 Configuration Descriptor:
   bLength                 9
   bDescriptorType         2
   wTotalLength       0x0019
   bNumInterfaces          1
   bConfigurationValue     1
   iConfiguration          0
   bmAttributes         0xe0
     Self Powered
     Remote Wakeup
   MaxPower              100mA
   Interface Descriptor:
     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        0
     bAlternateSetting       0
     bNumEndpoints           1
     bInterfaceClass         9 Hub
     bInterfaceSubClass      0
     bInterfaceProtocol      0 Full speed (or root) hub
     iInterface              0
     Endpoint Descriptor:
       bLength                 7
       bDescriptorType         5
       bEndpointAddress     0x81  EP 1 IN
       bmAttributes            3
         Transfer Type            Interrupt
         Synch Type               None
         Usage Type               Data
       wMaxPacketSize     0x0001  1x 1 bytes
       bInterval              12

Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Couldn't open device, some information will be missing
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               2.10
 bDeviceClass            9 Hub
 bDeviceSubClass         0
 bDeviceProtocol         1 Single TT
 bMaxPacketSize0        64
 idVendor           0x2109 VIA Labs, Inc.
 idProduct          0x3431 Hub
 bcdDevice            4.21
 iManufacturer           0
 iProduct                1 USB2.0 Hub
 iSerial                 0
 bNumConfigurations      1
 Configuration Descriptor:
   bLength                 9
   bDescriptorType         2
   wTotalLength       0x0019
   bNumInterfaces          1
   bConfigurationValue     1
   iConfiguration          0
   bmAttributes         0xe0
     Self Powered
     Remote Wakeup
   MaxPower              100mA
   Interface Descriptor:
     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        0
     bAlternateSetting       0
     bNumEndpoints           1
     bInterfaceClass         9 Hub
     bInterfaceSubClass      0
     bInterfaceProtocol      0 Full speed (or root) hub
     iInterface              0
     Endpoint Descriptor:
       bLength                 7
       bDescriptorType         5
       bEndpointAddress     0x81  EP 1 IN
       bmAttributes            3
         Transfer Type            Interrupt
         Synch Type               None
         Usage Type               Data
       wMaxPacketSize     0x0001  1x 1 bytes
       bInterval              12

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Couldn't open device, some information will be missing
Device Descriptor:
 bLength                18
 bDescriptorType         1
 bcdUSB               2.00
 bDeviceClass            9 Hub
 bDeviceSubClass         0
 bDeviceProtocol         1 Single TT
 bMaxPacketSize0        64
 idVendor           0x1d6b Linux Foundation
 idProduct          0x0002 2.0 root hub
 bcdDevice            6.06
 iManufacturer           3 Linux 6.6.31+rpt-rpi-v8 xhci-hcd
 iProduct                2 xHCI Host Controller
 iSerial                 1 0000:01:00.0
 bNumConfigurations      1
 Configuration Descriptor:
   bLength                 9
   bDescriptorType         2
   wTotalLength       0x0019
   bNumInterfaces          1
   bConfigurationValue     1
   iConfiguration          0
   bmAttributes         0xe0
     Self Powered
     Remote Wakeup
   MaxPower                0mA
   Interface Descriptor:
     bLength                 9
     bDescriptorType         4
     bInterfaceNumber        0
     bAlternateSetting       0
     bNumEndpoints           1
     bInterfaceClass         9 Hub
     bInterfaceSubClass      0
     bInterfaceProtocol      0 Full speed (or root) hub
     iInterface              0
     Endpoint Descriptor:
       bLength                 7
       bDescriptorType         5
       bEndpointAddress     0x81  EP 1 IN
       bmAttributes            3
         Transfer Type            Interrupt
         Synch Type               None
         Usage Type               Data
       wMaxPacketSize     0x0004  1x 4 bytes
       bInterval              12
 

#6

Yep here is your problem

 bDeviceProtocol         1 Single TT

Get a decent hub not a crappy cheap one and i think it will be a lot better.

 

 

#7

But why does it work the same way (badly) when I don't use any hubs and connect that directly into Raspberry, with no hubs? Is the new hub supposed to fix that?

#8

It is because the raspberry 4b itself has a single TT! It has an in-built hub to create the 4 usb ports. And this hub is a cheapy VIA chip which is single TT. Just look at the log you posted.

They do this entirely to save money. That is the only reason. Most people don't notice because they don't do usb critical stuff but for gaming this becomes apparent.

I sell a lot of licenses for yawvr etc and we researched this and the Pi5 doesn't have this single TT limitation.  The pi4 stutters occasionally with wheels AND other lower speed devices plugged in whereas the pi5 has an entirely new architecture (the pi foundation created their own IO chip) and it is done right with multiple TT's.

You should be able to still use the pi4 if you use a good hub. The hub will package the different usb speed data without any delays because each device gets its own translator (mulitple TT)

I do sell a good hub but you don't have to buy mine, you can use any hub as long as its mulitple TT. Which hubs have mulitple TT? I dont know - thats why i created my own. But any quality hub should have it.

 


 

 

#9

Okay, thank you! I'll try with Pi5 tomorrow, and post results here, seems like a better solution than looking for other hubs. (correct me if my suggestion is wrong)new Pi5 device?

#10

Sure