USB

BalenaFin

On certain USB hubs, one can control the power per port. This is usually referred to as per port power switching or PPPS. BalenaFin 1.x uses the LAN9514 USB 2.0 hub + ethernet controller which supports PPPS. The recommended way to implement this is to make use of the uhubctlarrow-up-right tool.

  1. You can add uhubctl to your container

ENV UDEV=on
RUN install_packages uhubctl
  1. Once you have it installed, you can see the list of USB devices by simply running uhubctl

root@01d925a:/usr/src/app# uhubctl
Current status for hub 1-1 [0424:9514, USB 2.00, 5 ports]
  Port 1: 0503 power highspeed enable connect [0424:ec00]
  Port 2: 0100 power
  Port 3: 0100 power
  Port 4: 0103 power enable connect [0a12:0001]
  Port 5: 0503 power highspeed enable connect [0781:5567]
  1. You can then turn off a particular port, in this case port 1 as follows -

root@01d925a:/usr/src/app# uhubctl -p 1 -a 0
Current status for hub 1-1 [0424:9514, USB 2.00, 5 ports]
  Port 1: 0503 power highspeed enable connect [0424:ec00]
Sent power off request
New status for hub 1-1 [0424:9514, USB 2.00, 5 ports]
  Port 1: 0000 off
  1. If you run the uhubctl command again, you should see that port 1 is now off

Raspberry Pi Family

uhubctl is also supportedarrow-up-right on Raspberry Pi boards. Check the balenaFin section above for instructions on getting started with uhubctl

Last updated

Was this helpful?