Tethering on the N900

As FOSDEM (woohoo \o/) draws closer and the likelihood of spending a lot of time in the airport doesn't change, I thought it was time to find out how to use my N900 as a modem or for "tethering" as I'm told the proper word is.

Some background:

  • my laptop runs Debian Squeeze (unstable) -- the stable release is coming out this week-end by the way!
  • my phone carrier is Meteor (Ireland) and I use their 3G/GPRS connection for data.

Tethering via the USB cable

The official Maemo webpage makes it all sound real simple but it didn't quite work this way for me. The wizard did not appear either on Debian or when I tried on Ubuntu 10.10. Although the phone did show up in Network Manager -> Wired networks, it only displayed as Disconnected and I couldn't find any option to set up a new 3G network.

After many failed attempts, this is the approach that worked for me. It requires wvdial. One annoyance: it works once, then I need to unplug and re-plug the phone.

Here's the wvdial information for Meteor Ireland:

APN: data.mymeteor.ie
Username: my
Password: meteor

Tethering via Bluetooth

Emboldened by my success I decided to follow the link to the Debian wiki on how to set up the same using Bluetooth. I was very disappointed to see they recommend using a KDE app even under Gnome, and when I looked at the number of dependencies it would bring I thought I'd take my chance the Gnome way.

...I'll skip on the embarrassing moments where I was thinking Gnome 3 wasn't set up yet to handle Bluetooth then found out the Bluetooth service was actually turned off... *cough* I used the Bluetooth applet to pair with the phone and followed the rest of the instructions on the wiki page, until the rfcomm command brought up the following error.

Can't connect RFCOMM socket: Connection refused

Using "sdptool browse <N900_MAC_ADDRESS>" revealed that I did not have the "Dial up networking service" running on the phone. You actually need to install an extra app, available in the repos first (application name is: Bluetooth Dial-Up Networking). I then followed these instructions on the Maemo wiki to set up rfcomm.conf, until "Restart the bluetooth stack" in the first section, and ta-dah! With "wvdial bluetooth" I can now start the connection via Bluetooth.

To be honest I'm sure this is a battery drain nightmare and I can't imagine tethering without the cable but heh! I learnt about several new tools and if I ever need it, it's there :-)

Final wvdial.conf, in all its mighty glory

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Baud = 460800
New PPPD = yes
ISDN = 0
New PPPD = yes
Phone = *99***1#
Username = "my"
Password = "meteor"
Init6= AT+CGDCONT=1,"IP","data.mymeteor.ie"

[Dialer usb]
Modem Type = USB Modem
Modem = /dev/ttyACM0

[Dialer bluetooth]
Modem = /dev/rfcomm0

links

social