Skip to content

Instantly share code, notes, and snippets.

@dmitriysafronov
Created December 9, 2016 10:06
Show Gist options
  • Save dmitriysafronov/57c1ef6d563a4d0c87d62b395ef89301 to your computer and use it in GitHub Desktop.
Save dmitriysafronov/57c1ef6d563a4d0c87d62b395ef89301 to your computer and use it in GitHub Desktop.
F*cking usb-modeswitch doesnt work properly
#!/bin/bash
USB_VENDOR=12d1
USB_PRODUCT=14fe
USB_OPTIONS=-J
while [[ -n "$(lsusb | grep ${USB_VENDOR} | grep ${USB_PRODUCT})" ]]; do
usb_modeswitch -v ${USB_VENDOR} -p ${USB_PRODUCT} -R ${USB_OPTIONS}
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment