Created
April 17, 2014 17:57
-
-
Save hongquan/11001424 to your computer and use it in GitHub Desktop.
Script to switch USB 3G to modem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if ! $(lsusb | grep E173 > /dev/null); then | |
echo 'Device not plugged' | |
exit | |
fi | |
if $(usb-devices | grep 'Driver=option' > /dev/null); then | |
echo 'Modem mode has been on' | |
exit | |
fi | |
echo 'mypassword' | sudo -S usb_modeswitch -v 0x12d1 -p 0x1c0b -M "55534243123456780000000000000011062000000100000000000000000000" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment