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
Improve USB2/3 duality matching #288
Conversation
I don't have the hub in easy access right now, hoping @sre does (and in some ways, since you now have the same hub, that test will be more interesting) |
@jfberry, this works for me on MacOS with Rosonway 16 port hub. |
@Roeeklinger60, can you try this too? |
Hey, @mvp I have about 40 of these hubs connected to a few servers in the office, I tested this but as you predicted it is not working correctly if you have 2 of the same exact hubs connected at the same time (Linux). I have been using a wrapper script that takes the USB2 hub number + 1 and it is working just fine for a few months now, however, if you find a way to do it properly this would be super helpful to me. Let me know if you need me to do any more tests, I have a lot of these here, I can even give you remote access if you like, |
Approach taken in this PR can be extended to give even higher matching priority when USB2 bus + 1 == USB3 bus. This should solve your issue. I will try to code it in... |
@Roeeklinger60, I have added bumping matching priority when usb2bus+1==usb3bus. |
@Roeeklinger60, can you please try this on your setup? It works for me, but I wanted to make sure we have broader testing done. Thanks! |
Hey, sorry for the late reply, this is still not working right for me, it seems to be selecting the wrong hubs (last ones?)
|
This is really weird, it should work @Roeeklinger60. Can you please paste output for running this:
(you probably want to use https://gist.github.com if your output is too long). |
Some test results in #282 on my Mac Mini M1 posted. |
@Roeeklinger60, @mcuee, @jfberry: I have just pushed better handling for USB3 duality. It works for me on Mac with Rosonway 16 port hub. Also, I expect that it will work properly on M1 Mac.
Please test and report if this works better. Thank you! |
Here are the test result under my Mac Mini M1, native M1 ARM64 build, with a TP-Link UH700 USB 3.0 hub.
|
Thank you @mcuee , that looks perfect. I will commit this change to master branch :-) |
Use priority based duality matching. * Support Raspberry Pi 4B better (as it has USB2 hub one level deeper than its USB3 counterpart). * Support M1 Macs (as they seem to place all USB devices to bus 2). * Support Apple mini-dock (it advertises 2 USB2 ports but only 1 USB3 port). * Should support multiple identical hubs (with the same container id) on Linux.
@sre, @jfberry: this PR should fix (or at least considerably improve) device correlation problem #248.
Can you please try it?
It should do matching almost always correctly.
However, it may still fail if you connect 2+ completely identical hubs (with the same container IDs), but even this should work correctly if you daisy-chain them.
If you confirm that it works for you, I will merge it to master branch.