Sample Header Ad - 728x90

Working around USB bandwidth error on Ubuntu 22.04 Server

0 votes
0 answers
142 views
I am looking for an approach to overcoming an error with some wireless modules on USB in Linux. I have three USB2 WiFi modules on a USB3 hub. I only care about using these modules in Monitor mode. If I only have one or two modules plugged in, everything looks ok. With the third module plugged in, I get dmesg logs: [63460.856556] usb 1-3.3.2: Not enough bandwidth for new device state. [63460.856574] usb 1-3.3.2: can't set config #1, error -28 As a result of this, the driver does not get loaded and I only end up with two wireless interfaces instead of three. After some research, I think I understand why this might be the case. Looking at the USB descriptors for each WiFi module, amongst other smaller bandwidth endpoints there are two high bandwidth endpoints like this: Endpoint Descriptor: 646- bLength 7 647- bDescriptorType 5 648- bEndpointAddress 0x01 EP 1 OUT 649- bmAttributes 3 650: Transfer Type Interrupt 651- Synch Type None 652- Usage Type Data 653- wMaxPacketSize 0x0400 1x 1024 bytes 654- bInterval 1 655- Endpoint Descriptor: 656- bLength 7 657- bDescriptorType 5 658- bEndpointAddress 0x81 EP 1 IN 659- bmAttributes 3 660: Transfer Type Interrupt 661- Synch Type None 662- Usage Type Data 663- wMaxPacketSize 0x0400 1x 1024 bytes 664- bInterval 1 If I'm doing my math correctly, each of those endpoints is effectively asking for 65 Mbps of bandwidth. Since there are two of these endpoints per WiFi module, then each is asking for 130 Mbps of bandwidth total. My guess here, based on the endpoint descriptions (EP 1 IN and EP 1 OUT) is that one is for transmit direction and one is for receive direction. I believe Linux and/or the host controller itself enforces a limit of 80% of the 480 Mbps available, or 384 Mbps. I suspect this is why two modules are happy (260 Mbps 384 Mbps). Since I only care to use these in Monitor mode and don't really need much/any transmit bandwidth, I am wondering if I could somehow manipulate things to my advantage. Possibly some udev rules that change these descriptors or something? Would those kick in before the bandwidth limits are evaluated? Or would I need to actually get down into the firmware/drivers for these modules to have a chance of changing these descriptors before the bandwidth limits are imposed?
Asked by Matt Nickels (1 rep)
Oct 9, 2024, 05:25 PM
Last activity: Mar 18, 2025, 01:22 PM