Up to: Mika Raento's Symbian Programming pages

Symbian Programming - Bluetooth WAP/Sync/Internet

Update!

More user-friendly instructions and software is now available from http://gnubox.dnsalias.org/gnubox/. They even include support for the 6630 and 6680 via a ppp module copied from a 6682... Nokia: could you get out of bed with the operators, they'll die in a couple of years anyway.

Note

This page is intended for people reasonably familiar with TCP/IP routing (including concepts like PPP, proxy-arp, NAT, IP addresses, subnets). If you don't think that you understand these concepts, please refer to a good TCP/IP text first.

Update: Angad Singh noticed that if you use Internet Sharing on Windows XP instead of NAT you can share a dialup connection with the phone.

Updated for 6600! These instructions work on my phone with software version 3.42.1. Reported working on 4.09.1 as well.

It seems that you'll need a permanent Internet connection (LAN) to make this work for the 6600. Windows XP/2000 Pro doesn't allow you to NAT to a dialup :-(. Only 'demand-dial' interfaces are available in netsh, not normal dialups, and those seem to be only available on Server. If anyone knows how to get around this, please contact me. You could probably use a proxy instead of NAT if you are satisfied with proxyable protocols (HTTP), like the one from Analog.

Intro

You've probably noticed that although you can use third-party software over the MRouter-Bluetooth connection, you can't use Nokia's own software like the WAP browser or Syncml. These require a functional Access point that is WAP-enabled. Nokia has (purposefully?) made this impossible to set up via the phone UI, but it is quite possible to do programmatically.

There is a piece of software called gnubox that is supposed to be able to this. It probably is on some software versions, but not all. I have modified the software to work on the newer software versions. You can download the source or just the phone installation file (7650), 6600.

All that the gnubox does is modify the communications database settings. You need it because the user interface (Settings|Connection|Access points) doesn't allow you to specify the right settings. No software is needed to run in the background for this to work.

On the 6600 it's been made even harder. The phone still has all the components needed for using the Internet (and WAP) over Bluetooth, but it's been purposefully made so that it won't use the mRouter connection for this. It all hangs on the IP it gets: if it's from the range mRouter hands out (169.254.x.x) it won't route any traffic through the interface; if it's something else everything works.

Instructions

7650: On your PC (Windows)

First make sure that your PC Suite works with Bluetooth. TDK has a nice set of instructions for this.

Install Nokia Gateway Simulator (part of the Nokia Mobile Internet Toolkit). When you are ready to test WAP, run the WAP gateway console (Start|Programs|Nokia|Nokia WAP Gateway Simulator|WAP Gateway Simulator 4.0 - Console). You can use some other WAP gateway as well, e.g. Kannel.

6600: On your PC (Windows XP)

Check that your firewall isn't blocking the connection we want to use. Probably best to disable it first, get these things running and then enable it again, possibly changing some settings for it.

Set up an Incoming Connection for Bluetooth as described by Troy Fontaine. Make sure PC-Suite/mRouter isn't enabled for the Bluetooth serial port.

If you are able to hand out real addresses on your local area network, this is enough. If not, read further.

Set the Incoming Connection to hand out addresses from a private range, e.g. 10.0.0.1-10.0.0.254. Remove Internet Connection Sharing from all interfaces. Enable NAT on your Windows XP box by typing in a CMD window:

netsh routing ip nat install
netsh routing ip nat add interface "YOUR LAN INTERFACE NAME" full
netsh routing ip nat add interface Internal private
Look up the interface name in the control panel network connections. A dialup connection won't work, use a proxy instead. Note that the 'Internal' name will depend on the language of your Windows XP (e.g. in Finnish it's 'Sisäinen' instead). The first line enables network address translation (NAT), the second adds your LAN connection as something to send NATted traffic to and the third your incoming connections (they all get attached to the 'Internal' interface) as sources for NATted traffic.

I don't know about WAP on the 6600, since it's WAP 2.0 now. The Nokia gateway might support it, or might not. I don't know how to tell the phone who to connect.

On the phone

This will modify your communications settings. Back up your phone first! If you are actually using GSM-data for something, this will break it. You should be able to get the settings back by selecting Options|1Box phone in Gnubox.

You can also use Nokia PC Suite to set up the access point. You'll have to set the password manually on the phone, though.

Linux

Leonard Penzer wrote more step-by-step instructions for 6600, Bluetooth and Linux.

It's quite easy to use Linux as the Bluetooth access point instead of Windows and mrouter. Basically you have to (these are written from memory, so caveat emptor):

Use the output from sdptool browse to figure out your phone's address and the channel number for the serial port. By connecting to the phone you trigger mrouter on it, which will try to connect back and store the PC's Bluetooth address (and channel) as the preferred serial connection

6600: change the addresses above to something else than 169.254.x.x. Don't set up a login script on the phone, since this is RAS specific.

If you are using Linux you don't have to set up the username and password. It should work with them set as well, though. Do not try to use authentication with pppd. It's very easy to crash the phone with it. It seems the ppp stack is not very good at handling authentication options it doesn't understand :-/.

You can read a description of setting up a P800 with linux for a more in-depth description of the issues involved. Note that we are not using the mrouter stuff here, so we don't need any DNS records, and the phone initiates the connectionw without having to send stuff to it's serial port.

Mac OS X

Marcus has written simple instructions for Mac OS X and a 6600.

I have zero experience of Max OS X, but from what I understand from reading posts it should support the necessary components.

http://www.macosxhints.com/article.php?story=20031117142051675&mode=print seems to have instructions for something like this. The site can be down sometimes, use Google's cache instead.

Basically what you need on the Mac is:

and you'll need to make the phone connect to the Mac's Bt serial. This can be done normally on a PC by:

That uses the fact that the phone's mRouter software will connect back to a device that tries to connect to the phone's serial port and will store that device's address in the phone as the preferred bluetooth serial connection. How this is done is undocumented, so I haven't been able to add it to the gnubox software (well actually it's not too complicated, but I'm too lazy to do it since it works anyway).

Typical problems

Error messagecause/solution/notes
Invalid phone number The gnubox software hasn't been run or didn't work correctly. Rerun it, select 1 box, select 2 box direct|bluetooth and make sure it prints the correct settings on a blue background
NAT must be installed first Either you didn't run 'netsh routing ip nat install' or it didn't work. It won't work if you still have Internet Connection Sharing active, so disable that: Make sure none of your interfaces is set as 'shared' and on XP SP2 stop the Windows Firewall/Internet Connection Sharing service (you'll need a third-party firewall in that case).
An interface with this name is not registered with the router You gave the wrong interface name in 'netsh add interface' or you are trying to use a dial-up interface.

Technical notes

About the commdb

The before and after dumps of the commdb (just the relevant bits) show the changes made. The important bits are:

You can read the code for seeing how the changes are made. The changes in the code compared to the stock gnubox are:

The main differences for the 6600 are that the records are named a bit differently and the MODEM table has become MODEMBEARER.

Debugging the connection

If something goes wrong with the commdb modifications in gnubox, create the directory c:\logs\gnubox on the phone. Debug information will appear there.

Make sure the phone is using your PC for a Bt serial connection by getting the mrouter connection up (enable mrouter on the bluetooth port, get PC-Suite working, disable mrouter afterwards).

It's actually possible to get quite a bit of logging out of Windows for the RAS. The first thing to look at is c:\windows\ModemLog_CONNECTIONNAME.txt for the Bluetooth serial connection.

If the serial connection works, but RAS doesn't, enable tracing with netsh ras set tracing * enable and look in c:\windows\tracing

If RAS seems to be working but the connection still doesn't work, you can have a look at the traffic on both the RAS interface and the LAN interface with WinDump.

Other technical notes


Mika Raento, mikie(at)iki.fi