Wednesday, July 16, 2008

Mobile Warrior: using your cellphone to connect your laptop to the Internet

One of the integral parts of my "Perfect Phone" series is using your mobile phone and data plan for Internet access, saving about $45 per month in DSL or cable charges. That overview of consolidating all communications costs gave a general overview and relied on JoikuSpot or Walking Hotspot to create a local wi-fi connection through which your laptop could connect to the Internet.

This post, however, will address a very specific connection: using your Nokia Nseries phone as a modem to connect a computer running Ubuntu (or any Debian-derivative) Linux to the Internet. If you are running Windows, take a look at the Nokia PCSuite. You do not need to have wi-fi on your phone, however, as we are going to connect it directly to the computer with the USB cable.

  1. Make sure wvdial is installed. It was already on my 8.04 (upgraded from 7.10) laptop so I did not have to do anything. To check, run locate bin/wvdial to see if Ubuntu finds the program. If so, skip to step 3.
  2. Run sudo apt-get install wvdial
  3. Connect your phone to the computer using the USB cable that came with the phone.
  4. Choose "PC Suite" when the phone asks for the type of connection.
  5. Run sudo wvdialconf /etc/wvdial.conf
  6. You should see a line like
    ttyUSB0<*1>: Modem Identifier: ATI -- Nokia
    when running this command. This means wvdial found your phone and recognizes it as a usable modem.
  7. Edit the config file sudo emacs /etc/wvdial.conf replacing 'emacs' with your favourite editor. You should see that wvdial has configured some things but left others we need alone.
  8. Keeping the Init1, Init2, etc strings in there, add a new one with Init# where # is one more than the last one. Add
    Init# = AT+CGDCONT=1, "IP", "WAP.CINGULAR"
    ISDN = 0
    Stupid Mode = 1
    New PPPD = yes
    Phone = *99#
    Password = test
    Username = test
    to your file. The password and username can be anything, AT&T does not require them, however, they need to be something and test was creative enough for me. (I have provided my full wvdial.conf at the bottom for reference. If you are using a Nokia Nseries (probably, any Symbian s60 phone) you ought to be able to just drop this config in your setup and go. The one line you might have to change is the Modem one, and you can simply point that whatever wvdialconf found or set it to /dev/modem.)
  9. Save the file and exit.
  10. Run sudo wvdial on the command line and you should connect to the Internet.
Make sure you have an unlimited data plan to use this. With 3G you can chew through data pretty quickly.

References:

1 comments:

Ladi onetime said...

this surely save my day!!!!!!! good job.

lado

 
Add to Technorati Favorites