7 hours ago
You can power cycle USB port like this:
Make sure that serial port is not open in a script when doing the power cycle. Otherwise the port name might change and script won't work.
Code:
io.writefile('/dev/usbctrl', 'low')
os.sleep(1)
io.writefile('/dev/usbctrl', 'high')
os.sleep(1)
Make sure that serial port is not open in a script when doing the power cycle. Otherwise the port name might change and script won't work.