Setting up a bluetooth PAN (Z <-> WinXP)


If you want to connect to your bluetooth-phone got to: http://tumnus.zaurii.net/.

If you are a proud owner of a bluetooth dongle for your desktop (in my case WinXP Home) and one of the supported Bluetooth CF Cards (for me the Anycom CF) you are able to set up a PAN (Personal Area Network) which will let you use the internet-connection from your desktop, access your shared folders and do everything that normally needs an ethernet-connection.

To get your CF-Card to work you will need a Bluetooth-Stack. I recommend to use BlueZ where the PAN-Profile is well integratd. If you use the tkcROM (look at "Useful Software") this Stack is already built in and ready to go. On the server side you have to activate the LAN-Access-Profile. When using widcomm-software this should be already working. Also the IP of your "Bluetooth-Network" in your "Network-Connections" should be 192.168.129.1. Another important thing is to share your internet-connection with the Bluetooth-Network, therefore go to the options of your connection and activate "Share this connection with.." and pick the Bluetooth-Network from the List. The text might differ for i've got a german version of WinXP.
On the zaurus you now open the shell and type

hciconfig

This should give you the mac of your card and the actual status (UP RUNNING...), if not make sure your card is really supported and Bluez is correctly installed. Next you type

hcitool scan

which will show you the macs of all devices in range. Notice the mac of your desktop for you'll need it later. Now you can use pand to connect as a PAN-Client (PANU), therefore type:

pand --role PANU --service NAP --connect xx:xx:xx:xx:xx:xx --nodetach

(where xx:xx:xx:xx:xx:xx is the mac of your desktop)
This will give you "connecting to xx:xx:xx:xx:xx:xx" followed by "bnep0 connected". After this you give an IP to your new network-device bnep0:

ifconfig bnep0 192.168.129.201

To check the connection ping your desktop:

ping 192.168.129.1

Now we can set up a new default gateway:

route add default gw 192.168.129.1

Voila, you might now ping whereever you want. For testing try:

ping 216.239.35.100

Thats the IP from google.com. If you get an answer everything is fine. Otherwise check all steps and make sure all IPs are entered correct.

To make use of DNS just enter a (or two) valid nameserver(s) in the file /etc/resolv.conf.

FINISHED. You can now surf with Opera at the full speed of your desktop's internet-connection!

To terminate the connection just type:

pand -K

If you don't like to use the shell all the time you might put all these commands in a batch-file like /home/QtPalmtop/bin/startpan.sh and /home/QtPalmtop/bin/killpan.sh.

You also can download mine:
startpan.sh      killpan.sh

Make sure these files are executable (chmod 755 startpan.sh etc.). After this you can go to your tab-setting and create yourself two new icons for your PAN:



If you have trouble after a suspend (the light at the CF-Card turns on and the Z freezes) you can edit the file /etc/apm.d/bluetooth. Just enter a new line after hcitool... :

hciconfig hci0 down

This will turn off bluetooth before suspending and then it should be no problem to resume.

If you've got questions or found a mistake drop me a line under "Kontakt" in the menu.

BTW: If you use Widcomm Software on computer-side make sure it's Version 1.3.2.7 or higher, otherwise it won't work.