What does HackerNews think of uhubctl?

uhubctl - USB hub per-port power control

Language: C

#20 in C
Also listed elsewhere, this repo has a much more up to date list. Maybe I should make an edit to the repo after all these years!

I also had trouble finding the original author online when I created the GitHub repo, but the other repo links him. I’m sure this didn’t exist back in the day. I did reach out to Niibe Yutaka way back and get his permission to post on GitHub.

https://github.com/mvp/uhubctl

In my experience this support was rare. I had an issue a few years ago with multiple USB 3 cameras (Intel Realsense) on a mobile robot that would periodically freeze up and need to be hard-reset, and a power-controllable hub seemed like the least-bad way to hack around it. I found my way to this tool, with its convenient list of compatible hardware:

https://github.com/mvp/uhubctl

Of the USB 3 options on the list, several were EOL or impossible to find, and when I ordered one each of the remainder, there was only one I could get working, and it wasn't reliable about being able to reset a device that had frozen to the point where Linux no longer had sysfs entries for it.

We ended up instead using a hub with an internal jumper to disable bus power, and then putting the self power line through a separately-controllable relay.

I've tried a few Amazon Basics ones, and on all of them power switching per-port worked. Uhubctl's compatibility list. seems to confirm my experience. The only problem is that the 7 port ones are in fact two 4-port hubs in a trenchcoat, which makes port numbering a bit weird. Nothing a couple of stickers can't fix, though.

https://github.com/mvp/uhubctl

There are already off the shelf hubs that support power control: https://github.com/mvp/uhubctl
In the opensource space, https://github.com/mvp/uhubctl/. Commercially($++), Acroname or Cambrionix hubs have a lot of features.
HI’m doing exactly the same now using the M50, and (no surprise) it has the same problems!

I’ve found that libusb has some useful tools for working around this kind of problem. There is a useful CLI tool for resetting individual ports on some hubs (https://github.com/mvp/uhubctl) which makes good use of this feature. May not fix everything but works for most use cases.