View Full Version : Sharing a Network Connection over Bluetooth with a Palm Tungsten T3

2nd June 2004, 02:11 AM
This is a mini-HOWTO which aims to assist Fedora Core -2- users to set up Bluetooth network connection sharing with a Palm (Tungsten T3 initially) as a "service" for casual / home use. There are many similar HOWTO's on the net, however, I will endeavour to provide a set of files that can be downloaded, including an init script that allows the service to appear in the Fedora Core Services (System Settings -> Server Settings -> Services in the Gnome Menu).

* This mini-HOWTO does NOT cover the initial bluetooth setup, only network connection sharing. I will post links to pages for the initial setup later.
* This is a work in progress and details will be updated as they become available and when I have time.
* Also, this setup is NOT guaranteed to be secure and should only be used in a relatively secure physical environment where others aren't likely to have physical access to the bluetooth connection (e.g. in a house).

Please be aware that bluetooth configuration seems to be highly dependent on the Linux distribution / you are using. If you are not using Fedora Core 2, these instructions / files may not work, but please let me know if they do.

Finally, I would not only welcome feedback, but also actively encourage others to contribute to this mini-HOWTO.

Below are my first attempt at a list of requirements. I will update this list with more precise requirements when I have more time.
Fedora Core 2
Fedora-compatible bluetooth adaptor
Palm Tungsten T3 (and possibly other Palms - let me know if this works for other models)
bluez (Linux bluetooth related packages)
dund (to listen for incoming bluetooth connections)
pppd (to act as a server for PPP connections)
iptables (for network connection sharing)
bluetooth-netshare init script (attached - to automate network connection sharing and allow control through the Gnome Desktop)
Gnome (optional (I believe), this is if you wish to manipulate the service through a GUI. You may be able to do so via KDE, but I have not tried)

The versions of each of the above is the most up to date for Fedora Core 2 as at 1st June 2004. I will post exact versions when I have time.

Below is a basic list of steps with more details to follow:
Check Palm<->PC bluetooth connectivity
Create device /dev/rfcomm0 (courtesy of Original_Homes!!)
Set up /etc/bluetooth/rfcomm.conf (example attached)
Set up /etc/init.d/bluetooth-netshare (example attached)
Set up your Palm and test the connection

Most, if not all of these steps need to be performed as root.

1) Check Palm<->PC bluetooth connectivity
Here we are concerned with whether or not your Palm can create any kind of bluetooth connection with your PC.

Adjust Palm bluetooth settings (System -> Prefs -> Bluetooth). Bluetooth: On, Discoverable: Yes, Connectable: Yes
Ensure that your PC's bluetooth adaptor is functioning (adaptor plugged in, bluetooth is configure, bluetooth service is running - I will post links to various HOWTO's when I have time)
Type: "hcitool scan" at a terminal (ensure your Palm is on). If you can see the name of your Palm device listed then you've successfully created a bluetooth connection between your Palm and PC!

2) Create device /dev/rfcomm0 (courtesy of Original_Homes!!)
The following step creates the device Fedora Core needs to connect to the bluetooth device on your PC. At a terminal, enter:
mknod /dev/rfcomm0 c 216 0

3) Setup /etc/bluetooth/rfcomm.conf (example attached)
Here we are configuring a bluetooth serial connection, which will allow you to create a TCP / IP connection later on.

Make a backup of your existing /etc/bluetooth/rfcomm.conf (e.g. rename it to rfcomm.conf with "mv /etc/bluetooth/rfcomm.conf rfcomm.conf.bak")
Copy the rfcomm.conf from the attached archive to /etc/bluetooth
Edit the "device" line by substituting 11:22:33:44:55:66 with the MAC address of your Palm (if you're unsure, try "hcitool scan" at a terminal)
If you're using a Palm Tungsten T3, you're done, however, other models may need to adjust the "channel". Please post if you know the correct channels for other Palms.

4) Setup /etc/init.d/bluetooth-netshare

Copy bluetooth-netshare from the attached archive to /etc/init.d/
Edit any paths if they are different on your system (the default should be fine for Fedora Core 2)
In the "Start()" function, adjust the IP address assigned by dund if necessary (the first IP address will be for your PC, the 2nd for your Palm).
If you adjusted the IP address above, then adjust the IP address which is masqueraded by /sbin/iptables (also in the Start() function). For those that already have a firewall set up by another program, you may wish to move this line to the other program. For beginners, look for the IP address after "-s" and only change the part and make sure it is the same as the IP address assigned to the Palm by dund (the second IP address in the dund line).
Set the network interface to be shared by /sbin/iptables (after the "-o" - replace "eth0" with the name of the network to be shared (e.g. "eth1", "ppp1")). You should be able to add another line to share other network interfaces.
Make /etc/init.d/bluetooth-netshare executable ("chmod 755 /etc/init.d/bluetooth-netshare")
Check whether the service is displayed in Gnome Service Configuration (in the Gnome menu, select "System Settings" -> "Server Settings" -> "Services", select "Edit Runlevel" -> "Runlevel 5").
Start the service (click on bluetooth-netshare and click on the "Start" icon)
Later, when you have determined that your service setup is correct, set the service to start whenever your computer goes into Runlevel 5 (e.g. when it boots up) by checking the box next to "bluetooth-netshare").

5) Set up your Palm and test the connection
Here we concentrate on settings on the Palm itself and making the final step to establish the connection

If you have set up the bluetooth device as a Trusted Device, remove it as a Trusted Device (also perform these steps if you're not sure).
- System -> Prefs -> Bluetooth (under the heading "Communication")
- Click "Trusted Devices"
- Select the device name of your Bluetooth Adaptor
- Click "Details"
- Click "Delete Device" and click "OK"
- NOTE: If you set up your bluetooth adaptor as a Trusted device when it was connected under Windows, the bluetooth connection with Fedora Core 2 probably will NOT work.

Set up a new Connection:
- System -> Prefs -> Connection (under the heading "Communication")
- Click "New"
- Set a name (e.g. "BT to FC2")
- Connect to: "PC"
- Via: "Bluetooth"
- Device: click on "Tap to add"
- Click on OK

Set up a new Network
- System -> Prefs -> Network (under the heading "Communication")
- Service: Set a name (e.g. "FC2 Network Connection")
- User Name: *leave blank*
- Password: *leave blank*
- Connection: Select the Connection you created above (e.g. "BT to FC2")
- Click on "Details"
- Connection Type: "PPP"
- Idle timeout: Choose a setting (I select "never")
- Query DNS: "tick"
- IP Address: "tick" automatic
- You shouldn't need anything under "Script"

Test the connection
Whilst still in "Network", click on Connect (the Palm should say "Initialising", then "Signing On" then the "Connect" button should change to "Disconnect").

If the connection WAS NOT successful, open terminals and enter the following commands at each:
- "hcidump"
- "tail -f /var/log/messages"
Reattempt the connection and watch the content of each window - you may get some clues as to what is wrong. If you still cannot get the connection working, add a post below.

If the connection WAS succesful, try out some Internet applications like WebPro (browser - ensure proxy settings are correct) or VersaMail. You could also try out PalmVNC (that's right - control your desktop from your Palm!). ICQ for Palm has widespread problems, possibly because ICQ runs as a service. If you manage to get ICQ for Palm working, please add a post below.

In this mini-HOWTO, we explored network connection sharing with a Palm Tungsten over Bluetooth. As mentioned, this howto is only a basic one and still requires some work. If you have any feedback or require assistance OR you would like to help improve this howto, please add a post below.

Happy networking!

29th July 2004, 11:59 AM
I followed the Howto and it almost works for me. I get this error in the /var/log/messages

dund[5947]: RFCOMM TTY creation failed. No such file or directory(2)

on my T2 it says Initializing -> Signing on -> Error: PPP timeout

Any ideas what might be going wrong?

Original Homes
1st August 2004, 09:34 PM
I had the same problem. Try:

mknod /dev/rfcomm0 c 216 0

And then test the network connection again.

5th August 2004, 09:11 PM
Thats awesome! :)

It works.

Thanks a lot!

Now its just DNS problems....

1st September 2004, 01:02 PM
Thanks Original_Homes - I've noted your contribution in the original post.

dnanders, querying DNS should work but if it is a problem, try hard-coding the DNS servers. If that also fails, try hard-coding an IP address as well (make sure it's the same as the address specified for the client in /etc/init.d/bluetooth-netshare).

Remember to rate the thread! :)



10th October 2004, 05:06 PM
I try to do the same with the Nokia 6600 and get also

dund[5947]: RFCOMM TTY creation failed. No such file or directory(2).

Can you explain to me what i have to do that your solution fits to me?
If i execute
linux:~ # mknod /dev/rfcomm3 c 216 0

the following message occours.
mknod: `/dev/rfcomm3': File exists

Before that a have done this

linux:~ # sdptool add --channel=3 SP
Serial Port service registered

linux:~ # dund -n --listen --channel 3 --msdun noauth crtscts 115200 ms-dns lock


3rd November 2004, 05:11 AM
thanks for the "howto" , but i can't use my usb-bluetooth in Fedora
the linux can't such the divice.


23rd May 2005, 02:52 PM

first... sorry, my english is bad

I have the fedora 1 and a USB bluetooth adapter (from motorola V600 mobile) and i need to create a gateway to provide access to various palm zire 72.

i have follow this howto but i can't make connection.

the palm can find my PC with trusted devices but when i try to make a connection it return me this:

"Error: Serial: time out"

what can i do now?

please i need help faster!!


and sorry again about my english :p

23rd May 2005, 07:46 PM
it works, thanks :)

22nd June 2005, 11:02 AM
thanks for the great tutorial. just to let you know that i have tried with under SuSE and iPaq hx4700, and its working beautifully, :)

just have to make the device every time i need the connection.


7th September 2005, 04:05 AM
It works "almost" fine for me.
My Palm Zire 72 can now ping a public IP address. :)
However, I have a DNS problem. :(
I specified a primary DNS in my Palm Network Config, I put which is my Router.
I also tried to put which is the server IP address I gave to dund (I enabled named for that purpose).
I also tried to use directly the DNS of my ISP.
I tried dynamic and static IP assignation in the Palm config.
In all cases, I have the same result:
In the Network log window, I enter "ping google.com" and I get the following:
Pinging google.com []
And the ping fail obviously because the IP of google.com is (alt not
It's always the same address I get, where does it comes from?
By the way, I also get if I try yahoo.com.
I tested with nslookup on my server all those DNS servers, and they all answer properly.
Anyone got this problem? Or any other DNS problem? How have you solved it?
I can't use my Palm web browser unless I fix that.

8th September 2005, 01:11 AM
I solved my DNS problem.
I just disabled FC3 SELinux and the firewall in the security panel.
(Yeah, I know, I should have thought about it, sorry, it was late.)
Thank you Dragon for this great mini-howto! :)

16th October 2005, 03:34 AM
Just an update for all reading this,
Fedora Core 4 worked for me with my Tungsten T3, without any difficulties. (using cheap no-name bluetooth dongle).
I set this up using Webmin, as I don't have a gui, it was all quite simple.

SELinux is disabled on my PC, and in bluetooth-netshare, I didn't need to alter anything.

Hope that encourages any new readers to give it a try!

Thanks to the author who spent the time to share this with us!



Mid October 2005

5th January 2008, 08:47 PM

Trying to pair a Palm TX with CENTos 5.1 via bluetooth. Followed the HOW-TO in this thread. The bluetooth USB device flashes indicating connection, and hciscan finds the Palm ok and returns the mac address and the name of the device. However the command "sdptool records <mac address of Palm>" fails to contact the Palm device stating "Failed to connect to SDP server on <mac address>: Connection times out.
When I initiate a connection from the Palm, the Palm gives "Error: PPP timeout (0x1231)"

hcidump output is:
> ACL data: handle 11 flags 0x02 dlen 46
L2CAP(d): cid 0x0040 len 42 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 2 pf 0 ilen 38 fcs 0x9a
> ACL data: handle 11 flags 0x02 dlen 46
L2CAP(d): cid 0x0040 len 42 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 2 pf 0 ilen 38 fcs 0x9a
> ACL data: handle 11 flags 0x02 dlen 46
L2CAP(d): cid 0x0040 len 42 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 2 pf 0 ilen 38 fcs 0x9a
> ACL data: handle 11 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): DISC: cr 1 dlci 2 pf 1 ilen 0 fcs 0xb8
< ACL data: handle 11 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 2 pf 1 ilen 0 fcs 0x92
> ACL data: handle 11 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x0041
< ACL data: handle 11 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0041
> HCI Event: Number of Completed Packets (0x13) plen 5
> HCI Event: Disconn Complete (0x05) plen 4

tail -f /var/log/messages shows:
Jan 5 14:31:31 blackcherry pppd[15568]: pppd 2.4.4 started by blackcherry, uid 1002
Jan 5 14:31:31 blackcherry dund[15563]: New connection from 00:70:E0:AD:D0:65
Jan 5 14:31:31 blackcherry pppd[15568]: Failed to open /dev/rfcomm0: Permission denied
Jan 5 14:31:31 blackcherry pppd[15568]: Exit.

I have performed "mknod rfcomm0 c 316 0", chmod'd the file to 755, and chown'd it to the user I am connecting as, all to no avail. Still denies permission. Any ideas would be appreciated?


Gene Evans