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!
USB Reset way #2 - uhubctl
This tool can power on / power off / cycle USB devices. This was successfully tested on Raspberry Pi 3B
Very useful and important information: https://github.com/mvp/uhubctl
- 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/serialsend.sh A "reboot")