mvp / uhubctl

uhubctl - USB hub per-port power control
Other
2.21k stars 230 forks source link

Hub path is not correct on Mac #33

Closed mvp closed 6 years ago

mvp commented 7 years ago

On MacOS Sierra 10.12.4 (16E195), uhubctl prints identical hub id 64-1 for 2 different hubs:

Current status for hub 64-1, vendor 05ac:1006, 3 ports
   Port 1: 0100 power
   Port 2: 0303 lowspeed power enable connect
   Port 3: 0100 power
Current status for hub 64-1, vendor 05ac:9127, 7 ports
   Port 1: 0503 highspeed power enable connect
   Port 2: 0303 lowspeed power enable connect
   Port 3: 0103 power enable connect
   Port 4: 0103 power enable connect
   Port 5: 0503 highspeed power enable connect
   Port 6: 0000 off
   Port 7: 0107 power suspend enable connect

This must be an issue with libusb, need to investigate.

mvp commented 7 years ago

This is definitely a libusb issue. Filed a bug against libusb https://github.com/libusb/libusb/issues/303

mvp commented 7 years ago

This is fixed in libusb tree https://github.com/libusb/libusb/commit/871eb299b989bc0714391804a9d2fdb145a32ff5, but it is not yet released as official libusb version. Until it is released, workaround to get uhubctl properly working is to install libusb from head revision:

brew uninstall libusb
brew install libusb --HEAD
cd uhubctl
make
mvp commented 6 years ago

libusb-1.0.22-rc1 is out, which means that final release for libusb-1.0.22 is imminent, and it contains a fix for this problem.

Once libusb-1.0.22 is released and finds its way into Homebrew updates, this issue can be closed - hopefully very soon.

mvp commented 6 years ago

Finally, libusb-1.0.22 is in homebrew, so this can be closed. It only took 10 months...