Gentoo Wiki


This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc



What is Reverse DUN?

Devices tested on

Please add to this list

What you need

What you don't need

Emerge the required packages.

echo -e 'net-wireless/bluez-libs \nnet-wireless/bluez-utils \nnet-dialup/ppp' >> /etc/portage/package.keywords
emerge -av bluez-libs bluez-utils ppp

Configure your kernel to support bluetooth.

You need to have the following options configured. (It doesn't matter whether the options are compiled in or modularized, just as long as they are there.)

Device Drivers->Networking Support:
<M>     PPP (point-to-point protocol) support
[ ]       PPP multilink support (EXPERIMENTAL)
[ ]       PPP filtering
<M>       PPP support for async serial ports
<M>       PPP support for sync tty ports
< >       PPP Deflate compression
< >       PPP BSD-Compress compression
< >       PPP over Ethernet (EXPERIMENTAL)

Device Drivers->Networking Support->Bluetooth Support:
<M> Bluetooth subsystem support
<M>   L2CAP protocol support
<M>   SCO links support
<M>   RFCOMM protocol support
[*]     RFCOMM TTY support
<M>   BNEP protocol support
[*]     Multicast filter support
[*]     Protocol filter support

Device Drivers->Networking Support->Bluetooth Support->Bluetooth Device Drivers:
<M> HCI USB driver
[ ]   SCO over HCI USB support
[ ]   USB zero packet support
<M> HCI UART driver
[*]   UART (H4) protocol support (NEW)
[*]   BCSP protocol support (NEW)
<M> HCI BCM203x USB driver 

NOTE: This last option may not exist in your kernel. If it's not, don't worry about it (although you might want to patch to the latest version of the kernel, see this page for details).

Recompile the kernel, and reboot if necessary. Don't forget to add the options you compiled as modules to /etc/modules.autoload.d/kernel-2.6.

Configuration files


You can leave this file as it is, however, you may want to personalize some of the settings.


This file doesn't exist, so you'll need to create it. Here's mine (you should change yours to match your settings):

noauth      # Don't require authentication
local         # This is needed because it's not a real serial line
noipdefault   # Don't use the local hostname to determine the local IP used
proxyarp      # Proxy ARP connections
nodefaultroute   # Don't use the default route
noipx      # Don't use the IPX protocol
idle 0      # Set an unlimited disconnect timeout

# Change the next three lines for your setup

# <Host IP Address>:<Client IP Address>
#The first ip needs to be your computer, the second ip needs to be a non-used ip in your network 

# ms-dns <DNS Server>
# this needs to be a real dns server, look in /etc/resolv.conf

# netmask <Netmask for your network>


Change the values of these fields to match:

DUND_OPTIONS="--listen --persist --msdun call palm"
PAND_OPTIONS="--listen --role NAP"


Warning: Enabling packet forwarding without a properly configured firewall can compromise your machine and your network. You should have a firewall-enabled router/modem and/or have a firewall on your own machine, or have a firewall-enabled modem/router.

At the very least (very very very very very very least) you should set up a basic firewall. But to be on the safe side we strongly recommend you to study the networking and firewalling concepts.

Linux advanced Routing & Traffic Control HOWTO

Run the Command:

echo 1 > /proc/sys/net/ipv4/ip_forward

You can add this line to /etc/conf.d/local.start execute it automatically on startup.

start the scripts

The last step in the configuration section. Run, as root, the following commands:

rc-update add hotplug default
rc-update add bluetooth default

Start the Scripts

/etc/init.d/hotplug start
/etc/init.d/bluetooth start

Testing the host configuration

Testing hardware

Ensure the bluetooth adapter is properly configured and initialized by typing the "hciconfig" command. It is similar in many ways to the traditional "ifconfig". (Output shown is for my system; yours may be the same or similar.)


hci0:   Type: USB
       BD Address: 00:03:C9:2E:5F:61 ACL MTU: 377:10  SCO MTU: 16:0
       RX bytes:240530 acl:8730 sco:0 events:2653 errors:0
       TX bytes:1199359 acl:7417 sco:0 commands:35 errors:0

If, instead of being in the UP RUNNING state, your output says DOWN, enable your HCI interface like so.

hciconfig hci0 up

Test Bluetooth connectivity

Next we'll test that the PDA and the host computer can communicate using Bluetooth. Ensure Bluetooth is activated on the PDA, and that the PDA is on. (On a Palm Tungsten T, you can do this through Preferences->Communications->Bluetooth.)

Run the following command on the host computer. Again, output shown is specific to my setup, and will be similar but not identical to yours.


hcitool scan
Scanning ...
       00:07:E0:0E:E9:EE       Steven Robertson

The 12-digit hexadecimal sequence listed is the Bluetooth address of your device, and the string next to it is the name of the device. Next, ensure that the PDA responds to pings from the Bluetooth adapter.

l2ping -c3 00:07:E0:0E:E9:EE
Ping: 00:07:E0:0E:E9:EE from 00:03:C9:2E:5F:61 (data size 20) ...
20 bytes from 00:07:E0:0E:E9:EE id 200 time 81.82ms
20 bytes from 00:07:E0:0E:E9:EE id 201 time 44.97ms
20 bytes from 00:07:E0:0E:E9:EE id 202 time 52.82ms
3 sent, 3 received, 0% loss

If your output looks similar, your bluetooth setup and PDA are both working great.

Palm configuration

The following instructions are for Palm-compatible devices only. Similar steps should be followed on the PocketPC.

Bluetooth configuration

Go to Prefs->Communication->Bluetooth. Set like so:

Bluetooth: On.
Device Name: <Desired Device Name>
Discoverable: Yes
Allow Wakeup: No

After setting that, tap the Trusted Devices button, then tap the Add Device button. The system will search for Bluetooth devices, then present a list of devices detected. Choose the one corresponding to the name you gave your adapter in step 3, then tap OK. The Palm will then ask you for a Pin. Once it is enteredm your computer should prompt you for a pin. enter the same pin number.

Connection configuration

Go to Prefs->Communications->Connection. Tap New..., and fill in as follows.

Name: <Whatever you like>
Connect to: PC
Via: Bluetooth
Device: Tap to Find

Then, of course, tap "Tap to Find". It will go through the discovery process again, then present you with a list of Bluetooth nodes in range. Select your host's node (now with a key next to it indicating that it is a trusted device), and tap OK. Tap Details... and fill in:

Speed: 115,200 bps
Flow Ctl: Automatic

Tap OK, then OK a second time, then Done.

Network Configuration

Go to Prefs->Communications->Network. Tap New, and fill in the following.

Service: <Whatever you like>
User Name: <Leave Blank>
Password: -Prompt-PD
Connection: <What you named the connection in 5.2.>

Tap Details..., and set as following:

Connection Type: PPP
Idle timeout: 3 minutes
Query DNS: <Checked>
IP Address: <Checked> Automatic

Tap Script..., and ensure that it merely says "End:". Tap OK, OK.

Finally, tap Connect, and watch as your Palm inserts itself into your network! When an application needs to access the network, it should automatically connect to your network.

Test out the connectipn by going to the Options->View Log menu. This log functions as a mini-terminal, as well as giving important diagnostic information. Use Graffiti to enter the text "ping", and watch the packets fly. If it works, everything is set up perfectly, and you're ready to start using the network.

PocketPC Setup (WM 2003SE)

Bluetooth Config

Go into the Bluetooth Manager and select 'new'. Choose 'Connect to a Network'. Select the computer you want to connect to and press next. It should now connect.


Retrieved from ""

Last modified: Fri, 15 Aug 2008 00:30:00 +0000 Hits: 8,851