usbautoreset

Crates.iousbautoreset
lib.rsusbautoreset
version0.1.3
sourcesrc
created_at2024-04-02 17:55:53.58366
updated_at2024-04-02 18:41:13.925167
descriptionTool to automatically reset USB devices on error
homepage
repositoryhttps://github.com/SamiKalliomaki/usbautoreset
max_upload_size
id1193901
size6,381
Sami Kalliomäki (SamiKalliomaki)

documentation

README

# usbautoreset If you are like me, your USB devices sometimes stop working and even unplugging and plugging them back in doesn't help. This is a simple script that resets the USB devices by unbinding and binding them. It looks for errors like this: ``` xhci_hcd 0000:00:14.0: WARN: buffer overrun event for slot 10 ep 1 on endpoint xhci_hcd 0000:00:14.0: WARN: buffer overrun event for slot 10 ep 1 on endpoint ``` When it sees a message like this, it does the equivalent of: ```bash echo -n "0000:00:14.0" > /sys/bus/pci/drivers/xhci_hcd/unbind && echo -n "0000:00:14.0" > /sys/bus/pci/drivers/xhci_hcd/bind ``` ## Installation ```bash cargo install usbautoreset ``` ## Usage ```bash sudo ./usbautoreset ```
Commit count: 3

cargo fmt