-
Notifications
You must be signed in to change notification settings - Fork 294
Increase supported USB port range to 0-255 #333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
The change looks ok, although for interop testing we would only claim to support a direct connection to a Pi or known good (doesn't back-power) powered USB hub on Linux (hubs are problematic in libusb on Windows) |
Wouldn't be the |
Using a fully qualified path obtained via udev is probably the more robust solution instead of specifying numbers, although the restriction of 0..6 for this old method seems a bit restrictive |
The port number is the port number on the USB hub it's connected to so additional levels of hub will most likely only have ports 0-6 for 7 port hubs, I don't remember seeing any hubs which actually have more than 7 ports without chaining. For example on a Raspberry Pi 3B+ port 3 could be the top right USB or bottom left USB port which is why I added the option to set a path like "1-1.3" or "1-1.1.3" which allows these to be differentiated. |
Good point. Please can the author describe their hardware setup ? |
I'm using the rpiboot from a full tower windows PC that has 9 physical usb ports, but for some reason one of them is seen as USB 10 in the device manager.
Yes, it'd be a good solution.
On windows I don't know how to obtain the usb path honestly. |
If this is to be merged it would need to be updated for the special case where targetPortNo is 99, maybe allow ports 0-254 and switch unconfigured to be 255? |
I simply limited the range from 0 to 98, to avoid issues with special 99 port. |
This pull request enhances the flexibility of the tool by expanding the supported range for the USB port parameter. The previous limit, which was hardcoded to a maximum of 6, has been updated to accept any value from 0 to 255.
Motivation
The original limitation of 0-6 ports can be restrictive for users with more complex hardware setups, such as those utilizing large or multiple USB hubs.
This modification provides a simple yet effective improvement, making the tool more versatile for a broader range of use cases.