Hi,
I have followed this Disable USB for security reasons to be able to turn off the USB ports on the Balenafin but when I come to turn them back on again nothing happens.
sudo uhubctl -a on -l 1
Current status for hub 1 [1d6b:0002 Linux 4.19.66-v7+ dwc_otg_hcd DWC OTG Controller 3f980000.usb, USB 2.00, 1 ports, ppps]
Port 1: 0000 off
Sent power on request
New status for hub 1 [1d6b:0002 Linux 4.19.66-v7+ dwc_otg_hcd DWC OTG Controller 3f980000.usb, USB 2.00, 1 ports, ppps]
Port 1: 0000 off
I see the power on request is sent, but nothing happens.
I have to reboot to get the USB hub working again.
Any ideas?
Cheers,
Rick.
Hi
Can you tell us a bit about how you are using uhubctl? Is it from privileged container?
1 Like
Hey there,
Thanks for reporting this. If you followed the above instructions in the forum ticket you linked, there was a missing instruction in the Dockerfile- we should enable UDEV
and the forum post has been updated accordingly. So, can you please modify your Dockerfile to:
FROM balenalib/raspberrypi3-debian-python:3.8.2
ENV UDEV=on
WORKDIR /usr/src/app
RUN install_packages uhubctl
COPY *.sh ./
CMD ["./start.sh"]
Note the ENV UDEV=on
directive.
Hope this helps. Let us know.
Regards
Rahul
I cloned the uhubctl repo, compiled it and then ran the command as sudo. So iām not using docker.
Are you using balenaOS or RaspberryPi OS please?
Ok, just noticed on your other post you are using Raspbian
Let me confirm with my colleagues and get back to you
I have found a solution to this.
echo 1 | sudo tee /sys/devices/platform/soc/3f980000.usb/buspower >/dev/null
echo 0 | sudo tee /sys/devices/platform/soc/3f980000.usb/buspower >/dev/null
Turns the power on and off as needed
Cheers,
Rick.