How can I disable the USB voltage on the Raspberry PI 3B+?


#1

I can't disable the voltage on my raspberry pi3b+
it only saves it to the current use, after i make a reboot to the raspberry pi it enables the usb voltage back.
my printer is cr10s' on marlin 1.1.18
this is the command i'm using: echo '1-1' |sudo tee /sys/bus/usb/drivers/usb/unbind
pls help....
Rami


#2

I note that uhubctl seems slightly more intuitive, once installed.

You could add it to the Raspbian's rc.local which should then run on bootup. You'd need to edit the existing file, being careful to put it before the exit command.

sudo nano /etc/rc.local

# ...
sleep 10
echo '1-1' | sudo tee /sys/bus/usb/drivers/usb/unbind
# leave this at the end of the file
exit 0

#3

Hi,

thank you for your help!

i went to the website you gave me in the email and i tried to install the uhubctl

after the installation you need to give the command make , i receive this err after the make command:

make: *** No targets specified and no makefile found. Stop.

what do i need to do for this to work...

Rami

Capture.JPG

‫בתאריך יום ה׳, 9 באוג׳ 2018 ב-1:48 מאת ‪Outsourced Guru‬‏ <‪octoprint@discoursemail.com‬‏>:‬


#4

Looks like the author assumed that you'd know to also do the following:

cd ~
git clone https://github.com/mvp/uhubctl.git
cd uhubctl
make

#5

Thank you again...
my last question is why it doesnt let me configure the usb...
sorry for all of the stupid questions :roll_eyes::roll_eyes:image

Rami


#6

Did the make succeed? If so, then there's now a uhubctl file in the same directory. Next, the author may or may not have included chmod a+x uhubctl to mark the file so that it's executable. Do an ls -l in that folder and see if your uhubctl has an "x" at the end of that section that looks like -rwxr-xr-x.

Finally, it's probably best to call it with a full path as in /home/pi/scripts/uhubctrl whatever.


#7

Or to do a make install or sudo make install to actually move the binary where it expects to go and set permissions as it expects. And then call it with a full path when in scripts, though if it's in your path, you can call it directly from the commandline once you've installed it as well.


#8

For anyone following along, the author of uhubctl has indicated that USB Port 1 on the Raspberry Pi 3B controls networking power and USB Port 2 controls power on ALL the USB ports in a ganged mode. You can't presumably toggle the ports individually on this.