USB Reset way #1 - bind/unbind

The following unbind command will kill complete USB chip for session if you type only "1-1". It will cut through SSH so you need to reboot manually. You only want to kill certain parts. So at first list all usb devices and then do some echo "1-1.2" to kill port 2 only. Unbinding will power off the devices like uhubctl does!

#list USB
cd /sys/bus/usb/drivers/usb
ls -alF

#turn OFF USB chip
echo '1-1.2' |sudo tee /sys/bus/usb/drivers/usb/unbind

#turn ON USB chip
echo '1-1.2' |sudo tee /sys/bus/usb/drivers/usb/bind

USB Reset way #2 - uhubctl

This tool can power on / power off / cycle USB devices. This was successfully tested on Raspberry Pi 3B

(info) Very useful and important information:

apt install libusb-1.0-0-dev
cd /opt
git clone
cd uhubctl/
/opt/uhubctl/uhubctl -r 500 -l 1-1 -p 2 -a off #works to make devices completely dead (power off). 

/opt/uhubctl/uhubctl -l 1-1 -p 2 -a on #revive (power on)

(warning) Warnings

  • Using the wrong number for -p switch might kill Ethernet device. This will destroy SSH availability. Then you will need to power off Raspberry Pi. This has to be done be climbing up to the top of the printer because USV is running!
  • Use the -r switch due to the fact that otherwise it will revive itself after some seconds. See github documentation! vaule 500 works in this case
  • Use the -l switch to get the correct device path. You can have a better look with "lsusb" and "lsusb -t"
  • hard reboot: Smart Stepper can be reset using unbind/bind commands or uhubctl (this will only work if the PSU is off so the only supplied power comes from USB. If USB  + PSU connected nothing will happen! So power off PSU controlling the power relay with Duet)
  • soft reboot: Smart Stepper can be reboot by bash script (/opt/ A "reboot")

  • No labels
Write a comment…