Skip to content

Commit d251673

Browse files
committed
Add USB UPS example
1 parent 22c36d0 commit d251673

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,26 @@ bind hub /sys/bus/pci/drivers/xhci_hcd/0000:00:14.0
8282
```
8383

8484
Afterwards, all your USB devices should work as if they were just plugged in, since this reset also temporarily cuts power from given USB device, making it reboot.
85+
86+
## Usual suspect: Cypress Semiconductor USB to Serial UPS
87+
88+
These cheap USB UPS have always the same kind of unreliable USB to serial interface.
89+
Most of them use `blazer_usb` driver from NUT, and sometimes the driver can't start because it can't communicate with the UPS. Guess why ? No idea.
90+
91+
Unplugging and plugging the USB port usually fixes this, but that's not handy.
92+
93+
A simple USB device reset isn't sufficient for that one.
94+
95+
We'll need to reset the hub it's attached to.
96+
97+
The command for doing so is:
98+
```
99+
usb_reset.py --reset-hub --device 0665:5161
100+
```
101+
102+
While I have a couple of machines running NUT, I modified the nut-driver.service file to automatically reset the device before trying to load the driver:
103+
104+
In `/etc/systemd/system/nut-driver.service` I added line
105+
```
106+
ExecStartPre=/usr/local/bin/usb_reset.py --reset-hub --device 0665:5161
107+
```

0 commit comments

Comments
 (0)