Skip to content

Instantly share code, notes, and snippets.

@tuxdna
Created October 10, 2011 20:55

Revisions

  1. @invalid-email-address Anonymous created this gist Oct 10, 2011.
    18 changes: 18 additions & 0 deletions photon.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    D="201e:2009"
    echo "Searching for device: $D"
    lsusb | grep "$D"
    retval=$?

    if [ $retval != 0 ]
    then
    echo "Device not found in 'lsusb' listing"
    exit $retval
    else
    echo "Device found in 'lsusb'"
    fi

    echo "Switching USB Mode for device: "
    usb_modeswitch -c /etc/usb_modeswitch.d/"$D"

    echo "Connecting now: "
    wvdial