HOWTO : Bluetooth Tethering with Nokia N900
Tethering (using you’re mobile phone to get your laptop/notebook online) is a quite important feature for me, when I’m at a meeting I do not wish to rely on wireless connections from my customers or the hotel/cafe where I’m at. With my Nokia E90 I used JoikuSpot, which turns the E90 into a wireless accesspoint, worked like a charm but drains the batteries extremely fast. One very big advantage of creating a Wifi-accesspoint is speed; I have 7.2 mbit 3.5G subscription (the E90 only got to 3.2 mbit though), which is too fast for bluetooth, you usually get about 1 mbit from bluetooth.. With wifi I was able to use the full 3.2 mbit my E90 was able to provide.
With the new Nokia N900 I’ve been looking for a way to get my Ubuntu Karminc netbook & Ubuntu Jaunty laptop online, preferably with Wifi, but at least using Bluetooth. Wifi is unfortunately not yet supported because the some kernel-modules (iptables, iptables_nat) are not available for Maemo (they are working on it). Bluetooth is possible, and quite easy to archive with Ubuntu Karmic. I’ll explain how to get your Ubuntu Karmic laptop online with a N900 using the DUN-service (DailUpNetworking)
You need to be comfortable with the commandline/terminal and have rootsh installed on your N900 to do this! If you’re NOT comfortable with the Terminal : do not proceed, you will need to be root, and that enables you to brick your N900!
On the N900
You’ll need the following script (taken from Maemo Wiki):
sdptool add --channel 1 DUN
while true; do
rfcomm -S -- listen -1 1 /usr/bin/pnatd '{}'
sleep 1
done
I copied the script, pasted it into a new text-file on my laptop (called it dun.sh) and sent it to my N900 with bluetooth. Your N900 will ask where to store the script, I stored into Documents. Now fire up the terminal application on the N900 and become root:
~ $ sudo gainroot
Move the uploaded file to /usr/bin :
/home/user # mv /home/user/MyDocs/.documents/dun.sh /usr/bin/
Make the file dun.sh executable;
/home/user # chmod +x /usr/bin/dun.sh
Start the DUN-service:
/home/user # dun.sh
You should see something like this:
Dial-Up Networking Service Registered Waiting for connection on channel 1
Configuring the N900 is finished, next;
configuring Ubuntu (Karmic)
Be sure you have paired the N900 with your laptop
Configuring the network-connection
- Left click on the network-manager from the notification area of the gnome-panel, select “Edit connections”
- Select the “Mobile Broadband”-tab and press “Add”

- Click “forward” (leaving the selection to “any device”)
- Select the country, click “forward” and select your mobile operator.
- If you have the option to select a plan, do so (I needed to select Vodafone Business to get the correct APN), else click “forward”
- Click “Apply” to save the new Mobile Broadband-service
- A new window will appear to configure the Service, be sure to enable “Connect automatically” and click “apply”
- Close the window “Network connections”
Next: connecting to your N900 with DUN
First; be sure you have Blueman Installed, you’ll need this to configure the connections. If you do not have Blueman running install it following the instructions found here
In Ubuntu Karmic you can add blueman repositories by issuing this command:
sudo add-apt-repository ppa:blueman/ppaAnd to install it run:
sudo apt-get update
sudo apt-get install blueman
- Check if you have enabled the correct plugin;
- Right-click on the bluetooth-icon in the notification area in the panel and select “plugins”

- Enable “NMDUNSupport” (optionally you can enable the “NetUsage” plugin to monitor data-usage) and close the Plugins window.
- Open the bluetooth manager (by left-clicking on the bluetooth-icon in the notification area in the panel) and look for your N900.

- Right-click on the N900-icon and select “Refresh Services”
- Again; right-click on the N900 and click “Dail-Up Networking”.. your laptop will try to connect to your N900
- If the connection is OK you can establish the network-connection to your Mobile Broadband provider, left-click on the Network-manager in the notification area and select the network connection you created in the previous section (“Configuring the network-connection”).
- If all goes well you should be online now! (if you had a ‘normal’ wifi connection, disconnect it to be sure you’re using the Dail-Up with your N900).
Possible Issues
If you disconnect from dail-up networking and try to reconnect you could get an error : “Connection Failed: Port already in use”.. To fix this, restart bluetooth on your laptop:
sudo /etc/init.d/bluetooth restart
Loose ends
You could leave the DUN-script running in a terminal on your N900, I’m not yet sure if this could drain the battery. If it doesn’t it may be possible to add the script into the /etc/rc2.d directory, this way the script will be started at boot and you can connect to your N900 quickly without manually starting DUN. I’ll look into this when I’m sure the script doesn’t drain the battery (Update: It doesn’t; it’s save to autostart the script).
Ubuntu Jaunty doesn’t have the bluetooth manager which is used in Ubuntu Karmic; I’ll update this post with instructions for Jaunty later, and if anyone has a step by step howto for Windows, please let me know so I can add a link to your site or add the howto here
Update : If you’d like DUN started automatically, check out this and this helpful post
Update 12-30-09:
The DUN script is now available in the Maemo-repositories; still in testing though.
Also; I forgot to mention Blueman . I assumed it was part of Karmic and installed by default; but it’s not, i’ve added instructions (Thx to Alex & Alex in the comments).


Just thought I’d say that it might help if you mention you’re using Blueman (http://blueman-project.org) instead of the default ubuntu bluetooth manager.
Also there is now a package you can installed on the N900 called Bluetooth-DUN that will automatically turn on (and off) the Bluetooth DUN whenever Bluetooth is turned on (and off).
Thanks.
Has been a helpful little tutorial. However, on my N900 the DUN service appears to have been running already (strange).
Thanks for these instruction. I had to download Blueman on my N900 and then transfer the package to my Ubuntu computer, but besides that, it all went pretty smoothly.
@Riz
Did you by any chance install the Bluetooth DUN script from Maemo-Extra’s?