Tuesday, August 25, 2009

Broadband2Go and Ubuntu 8.04 -- 1st success

No luck with NetworkManager (Bugs: Ubuntu, Gnome Network Manager).

Anyhow, the important parts:
  1. edited /etc/udev/rules.d/70-persistent-cd.rules and added ,RUN+="/usr/bin/eject %k" to the Novatel-generated entries
  2. re-inserted the card and ran lsusb to verify that the Virgin Mobile card showed up in modem mode (1410:6002)
  3. ran sudo modprobe usbserial vendor=0x1410 product=0x6002 to establish the ttyUSBx devices (I had gotten this far previously)
  4. verified that said ttys were there via ls /dev/ttyU*
  5. 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...)
  6. NOTE: the wvdialconf and /etc/wvdial.conf items above are one-time steps...
  7. 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)
  8. 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
  9. NOTE: leave the terminal window open, and simply hit <Ctrl>+C to disconnect when you're ready.
It's a good step in the right direction. Would be nice to get it working with Network Manager, but this reminds me of the good old days (when we upgraded our University's dial-up from SLIP to PPP and I had to figure out how to make it work with a distro based on the 0.99pl10 Linux kernel).

Initial Script
# look for any Novatel Wireless device
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;
# 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;

No comments: