Anyhow, the important parts:
- edited /etc/udev/rules.d/70-persistent-cd.rules and added ,RUN+="/usr/bin/eject %k" to the Novatel-generated entries
- re-inserted the card and ran lsusb to verify that the Virgin Mobile card showed up in modem mode (1410:6002)
- ran sudo modprobe usbserial vendor=0x1410 product=0x6002 to establish the ttyUSBx devices (I had gotten this far previously)
- verified that said ttys were there via ls /dev/ttyU*
- followed Sprint's instructions for wvdial, including sudo wvdialconf, sudo vi /etc/wvdial.conf (to set the parameters), and then sudo wvdial to establish the connection (when I tried wvdial w/o root, it couldn't modify /etc/ppp/chap-secrets or /etc/ppp/pap-secrets. I'll have to look into that, b/c root may not be strictly necessary here... I seem to recall a "dialout" group...)
- NOTE: the wvdialconf and /etc/wvdial.conf items above are one-time steps...
- NOTE: It's trivial to script the lsusb, modprobe, checking for tty, and launching wvdial tasks, and should be easy to add a launcher icon also. (UPDATE: it was pretty trivial -- see below)
- Killed my WiFi (via Airplane Mode), then wrote this post via the 3G goodness. Verified no ip on eth1 (my wifi), and active ip on ppp0 via ifconfig
- NOTE: leave the terminal window open, and simply hit
<Ctrl>+C to disconnect when you're ready.
Initial Script
#!/bin/bash
# look for any Novatel Wireless device
VENDOR=1410
DEVICE=`lsusb | grep $VENDOR | cut -d : -f 3`
# if a device exists, make sure it's the Virgin Mobile modem
# if it is the modem, make usbserial probe the device
if [ "${DEVICE:0:4}" != "6002" ];
then echo Virgin Mobile card not found; exit 1
else sudo modprobe usbserial vendor=0x$VENDOR product=0x$DEVICE;
fi
# make sure that usbserial created /dev/ttyUSBn device(s)
# if the USB tty is there, then initiate the ppp connection
TTYUSB=`ls /dev/ttyUSB*`
if [ -z "$TTYUSB" ];
then echo No TTY created; exit 1
else sudo wvdial;
fi
No comments:
Post a Comment