Setup DUND Bluetooth Service

Please take a look at my setup to get an idea of the type of hardware and software used to write this how to. Make sure all of the BlueZ packages mentioned under “Laptop Software” are installed.

The DUND service allows ppp connections via bluetooth. This how to will describe how to set this service up under Sarge and how to pair a Pocket PC with Linux. It is assumed that working bluetooth hardware is installed and that the Pocket PC can scan and detect or “see” the Linux computer.

Create a Peer Config File

1. Create a file in the directory /etc/ppp/peers. The file may be called whatever you wish, mine is called ppc. So at the terminal as root I typed “gedit /etc/ppp/peers/ppc” and then added lines like this to the file:

57600
192.786.786.86:192.768.786.68
# My DNS server
ms-dns 65.199.196.7
noauth
debug

The most important line is the second one. 192.786.786.86 is the ip address the host computer (my laptop in this case) will have when a bluetooth device (a Pocket PC in this case) is connected and 192.768.7861.68 will be the ip of the Pocket PC. Any software that will require the ip address of the host computer will need the value entered here. See my Linux/Pocket Pc Sync How To for an example of such usage. The ip addresses used here are fake of course any valid ip addresses can be used in that line. Once this is done save the file.

Enable DUND

2. Next open the file called ”/etc/default/bluez-utils”. In that file there is a section called DUND. In that section find the line that reads

DUND_ENABLED=0

And change it to

DUND_ENABLED=1 

Then find the line that begins with “DUND_OPTIONS=” and edit it to read:

DUND_OPTIONS="--listen --persist --msdun call ppc"

Of course if you named the file you created in step 1 above something other than ppc then you should replace ppc in the DUND_OPTIONS line with whatever name you chose. Make sure that both lines are uncommented. Below is the DUND section of my ”/etc/default/bluez-utils” file:

  ############ DUND
#
# Run dund -- this allows ppp logins. 1 for enabled, 0 for disabled.
DUND_ENABLED=1
# Arguments to dund: defaults to acting as a server
DUND_OPTIONS="--listen --persist --msdun call ppc"
# Run dund --help to see the full array of options.
# Here are some examples:
#
# Connect to any nearby host offering access
# DUND_OPTIONS="--search"
#
# Connect to host 00:11:22:33:44:55
# DUND_OPTIONS="--connect 00:11:22:33:44:55"
#
# Listen on channel 3
# DUND_OPTIONS="--listen --channel 3"
# Special consideration is needed for certain devices. Microsoft
# users see the --msdun option.  Ericsson P800 users will need to
# listen on channel 3 and also run 'sdptool add --channel=3 SP'

Once those changes are made save the file.

Set PIN Number and ID

3. Next edit the file ”/etc/bluetooth/pin” and change it to a pin number that suits you which of course is more secure or leave at as it is. Also the file ”/etc/bluetooth/hcid.conf” may be edited to stipulate a name for the computer that will show up when it is detected by other bluetooth devices and also the class of device. I did not stipulate a name but I changed the “Local device class” from the default “class 0x3e0100;” which is a generic computer class to “class 0x10c;” which is the laptop class. FYI “class 0×104” is “Workstation” and “class 0×108” is “Server”. It annoys me when these things don't show up properly so I took the time some years back to get those classes. ;-)

Now the bluez-utils service should be restarted by typing as root:

/etc/init.d/bluez-utils restart

Now we are ready for pairing.

Pair and Configure PC and PDA

4. On the Pocket PC click the little bluetooth icon to the lower right of the screen and turn the bluetooth on. Then click it again and select “Bluetooth Manager”. Then click “Tools” > “Paired devices” > “Add”. Now click the little page with the magnifying glass next to the blank “Device” field. The PDA will then search for devices. You should see your computer appear there. Click on it and enter the pin number you stipulated in step 4 above or type 1234 if you did not change the pin number. If all went well your Pocket PC is now paired with you computer.

At this point you may also want to test the connection. Click “ok” to exit the paired devices screen and return to the main Bluetooth Manager screen. Click “New” > “Connect!”. Then click “Explore a Bluetooth device” then click “Next” to the lower right. Then click “Tap here to choose a device”. You should see your newly paired device show up. Click on it. It should display the “LAN Access Point” service, click that then click “Next” in the lower right corner. Then click “Finish”. To test the connection double click the “LAN Access Point” shortcut. It should connect without problems. Once you're satisfied it has connected click and hold the “LAN Access Point” shortcut till the “Disconnect” option appears then select it to disconnect.

Things to Do with DUND

I suppose there are many reasons why people would want the DUND service. For me the reason was to syncronize my Pocket PC with Mozilla Thunderbird and Sunbird. Yes it can be done and as a matter of fact the method is outlined here.

~~DISCUSSION~~

debian/btdund.txt · Last modified: 2009/08/13 20:11 (external edit)
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0