Dear RPi Forum Team,
The Device Number is part of the C struct usb_device in the Linux kernel USB API.
struct usb_device, the kernel representation of a USB device.
The USB device number devnum is the first variable in the usb_device struct.
int devnum; device number; address on a USB bus
Please find a link here.
https://www.kernel.org/doc/html/v4.14/d ... usb_device
The limit of 127 USB devices may be attached to any one host at any one time. Which explains the modulo 127. The working assumption at the moment is 127 per USB bus on the host. But it might be 127 in total. Will have to look into that a bit more.
Have not yet found the architecture rationale of its increment but then not a decrement when the device is unplugged.
Yours,
York
The Device Number is part of the C struct usb_device in the Linux kernel USB API.
struct usb_device, the kernel representation of a USB device.
The USB device number devnum is the first variable in the usb_device struct.
int devnum; device number; address on a USB bus
Please find a link here.
https://www.kernel.org/doc/html/v4.14/d ... usb_device
The limit of 127 USB devices may be attached to any one host at any one time. Which explains the modulo 127. The working assumption at the moment is 127 per USB bus on the host. But it might be 127 in total. Will have to look into that a bit more.
Have not yet found the architecture rationale of its increment but then not a decrement when the device is unplugged.
Yours,
York
Statistics: Posted by York Earwaker — Sun Dec 28, 2025 2:28 pm