* Simplified code that powers on/off.
* Fixed minor bug for repeat counter (always once to power off, and opt_repeat times to power on).
* Only warn about USB permissions if no compatible hubs are detected.
Old behavior would always warn, even if permissions were missing for any hub (even unsupported ones).
Now that libusb-1.0.24 is released https://github.com/libusb/libusb/issues/618,
workaround is no longer needed.
Also, replace MacOS X references to just MacOS (since it works on MacOS 11 Big Sur too).
This finally fixes issue #227.
Add switch --search (-s) to limit hubs by attached device description.
It is recommended to specify search string that is as unique as possible, e.g. device serial number.
It should work for "off" and "cycle" actions, but not for "on" because device would not be visible on USB.
Closes#209.
Homebrew is forcing `--no-tags` for cloned repos.
Because we used `git describe --always` brew was choosing raw commit id as version, which is quite bad.
By removing `--always` we will use contents of VERSION file as a backup.
Show power switching type supported by a hub:
* ppps - per-port power switching
* ganged - ganged power switching
* nops - no power switching
Add --force (-f) switch to allow operation on non-ppps hubs.
Use `-f` at your own risk, this most likely will not work to actually switch power.
For ganged hubs, you may need to turn power off for all hub ports to get any effect.
For nops hubs, it is not likely to work at all, but might be useful for informational purposes.
Also, instead of printing recipe on how to fix USB permissions on Linux,
forward user to web page with detailed explanations.
Closes#260, #280.
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.
Remove custom handling for different platforms for CFLAGS and LDFLAGS
and prefer using pkg-config when available.
However, this is tested to still build ok on Linux on Mac howebrew
even if pkg-config is not available.
Closes#292, should also simplify issues raised by #142, #147, #289 and 5db248771e.
Previous workaround of getting working `libusb` on MacOS is no longer supported by Homebrew,
so now recommended fix is to install `libusb` from HEAD.
This workaround will be removed once libusb 1.0.24 is released and is provided by Homebrew by default.
This hub is built from 5 * 4-port USB chips in daisy chain. Unfortunately, it advertises
identical bos container IDs for all 5 hubs of them, which will cause issues controlling power in USB3 mode -
one would have to call uhubctl twice with `-e` to turn off both USB2 and USB3 hub pair ports properly.
Rosonway also sells this hub under RSHTECH brand in some markets.
Closes#276.
Firmware VL805 00137ac was an alpha verson that was never released.
Change firmware requirement to stable version VL805 00137ad,
and provide easy way to check if it is compliant.
Apparently all following hubs: HU9002V1SBL, HU9002V1ESL, HUC9002V1SBL, HUC9002V1EBL
are almost the same, with C models including USB-C cable.
Update device table to reflect this.
Closes#246.