Using the Palm Treo 650
with Debian Project


This document contains my experiences using the Palm Treo 650 with Debian GNU/Linux (initially with sarge, with the 2.6 kernel and udev). Included are instructions on how to pair the Bluetooth devices, to create a network connection and perform a HotSync over it, and finally to use the Treo as a modem to the Internet.

Syncing over USB

This works out of the box on lenny using the usb: port as all of the instructions in /usr/share/doc/pilot-link/README.libusb.gz have been carried out in the system.

I found that pilot-xfer -l -p usb: didn't connect initially. It seems that the first time you HotSync, you need to run the pilot-xfer command before starting HotSync on the Treo. After that first time, the order doesn't matter.

Set up Bluetooth

Set up Bluetooth on your laptop as per Debian GNU/Linux on an IBM ThinkPad T40p.

Set up DUN (Dial-up Networking) for HotSync

Modify two variables in /etc/default/bluetooth (was /etc/default/bluez-utils) as follows:

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

The dial-up script referred to above is found in the /etc/ppp/peers directory. Assuming you called it treo as I did, edit /etc/ppp/peers/treo as follows:

ms-dns <IP address of your DNS server>

This file is used to set up a ppp connection and will set the IP address of your Debian GNU/Linux PC to and your Treo to You can use these values or choose two of your own.

The value of ms-dns should be set to the IP address of your DNS server, or if your DNS server is on your host, or you don't need DNS resolution.

Optionally, uncomment the auth enable and encrypt enable lines in /etc/bluetooth/hcid.conf.

Finally, restart Bluetooth (was bluez-utils):

# /etc/init.d/bluetooth restart

Pair Your Treo with Your Computer

On the Treo, go to the Bluetooth application and turn on Bluetooth. Then select Setup Devices > Trusted Devices > Add Device. You should see your computer listed. Select it and click OK. You should then be prompted for your PIN. You should now be paired with your computer. Click Done twice to return to the main Bluetooth application.

2009-03-24: I installed lenny on a new laptop, and I was not able to pair my Treo with my laptop: the passkey setting in hcid.conf no longer seemed to work. However, by killing bluetooth-applet, running sudo hciconfig hci0 piscan to make the Bluetooth on the laptop discoverable, and compiling passkey-agent in /usr/share/doc/bluez-utils/examples using the Makefile and following the instructions therein, I was able to pair successfully. Hopefully, these problems will go away when version 4 of bluez-utils is added to Debian.

Set up HotSync on the Palm

Create a new connection.

  1. Open the Prefs application.
  2. Select Connection > New.
  3. Enter a Name (for example, Bluetooth to PC), Connect to PC, Via Bluetooth.
  4. Select the Device field, select your trusted PC, and click OK.
  5. Click on Details and set the speed to 115,200 and leave the Flow Ctl at Automatic.
  6. Click OK twice to save your settings and click Done.

Create a new network.

  1. Open the Prefs application.
  2. Select Network.
  3. Select Menu > Service > New.
  4. Enter a Name (for example, Unix).
  5. Enter your Connection (for example, Bluetooth to PC) and don't set the User Name or Password.
  6. Select Details > Idle timeout and set it to 3 minutes.
  7. Click on OK.
  8. Click Connect to test your connection. You should see a popup that displays the following messages in turn: Initializing, Signing On, Established. Then click on Disconnect.
  9. Click Done.

Configure the HotSync application.

  1. Open the HotSync application.
  2. Select Options > Modem Sync Prefs > Network and click OK.
  3. Select Options > LANSync Prefs > LANSync and click OK.
  4. Go to the Options > Primary PC Setup screen.
  5. Enter your Primary PC Address (for example, if you used my version of /etc/ppp/peers/treo, you'd use
  6. Leave the Primary PC Name field blank as an entry may actually cause problems due to failed DNS lookups.
  7. Go to the Options > Connection Setup screen.
  8. Select the Bluetooth connection that was created in the pairing process above, and click OK.
  9. Select Modem (above the HotSync button).
  10. Click on Select Service and choose the Service you created (for example, Unix).

Test HotSync

Try running pilot-xfer -p net:any -l on the PC and click on the HotSync button on the Treo. Hopefully, you'll get a listing of the applications on your Palm. I found that you could simply specify a port of net: as well.

I set the name and ID on my Treo to that of my old Palm so that the my registered 3rd-party applications would continue to work. I did this with install-user -u "Bill Wohler" -i 12345. You can get the old ID by running install-user without arguments.

I also found that configuring gpilotd for network HotSyncs is a pain in the sphincter so I went back to JPilot. Even though the Treo is a breeze to use, I'm finding that I am now using JPilot to enter data on the PC again. I had been using Evolution in read-only mode because the Evolution conduits were slow and often corrupted my data and didn't propagate categories. Its ToDos only had three priorities instead of the five in the Palm.

Configure DUN to Put Your Laptop on the Net

If you have a Treo 650 that has the DUN feature, then you can use the following steps to put your laptop on the net anywhere your phone has reception.

My carrier is T-Mobile so some of the files below are named accordingly. If you have a different carrier, you will most likely need to find slightly different scripts on the net.

Configure /etc/bluetooth/rfcomm.conf.

On the Treo, go to the Prefs application and set Bluetooth > Discoverable to Yes. Then run hcitool scan to get your Treo's hardware address. I found that hcitool could not find the Treo if Dial-up Networking was on. Update /etc/bluetooth/rfcomm.conf with that information.

rfcomm0 {
        bind yes;
        device 11:22:33:44:55:66;
        channel 1;
        comment "";

Then run /etc/init.d/bluetooth restart (was bluez-utils). You can now set Discoverable to No.

Alternatively, you can find the Treo's address by peeking at the log file after a HotSync. For example:

Apr  5 13:47:38 olgas hcid[8349]: link_key_request \
  (sba=01:23:45:67:89:00, dba=11:22:33:44:55:66)
Apr  5 13:47:40 olgas dund[15145]: New connection from 11:22:33:44:55:66

Create /etc/ppp/peers/t-mobile.


idle 300
lcp-echo-failure 0
lcp-echo-interval 0

ipparam tmobile
password tmobile
remotename tmobile
user ''

connect "/usr/sbin/chat -f /etc/chatscripts/t-mobile-connect"
disconnect "/usr/sbin/chat -f /etc/chatscripts/t-mobile-disconnect"

Create /etc/chatscripts/t-mobile-connect.

SAY     'Starting GPRS connect script\n'
''      ATZ
OK      'AT+CGDCONT=3,"IP",""'
SAY     'Dialing...\n'
OK      ATD*99***1#

Create /etc/chatscripts/t-mobile-connect.

SAY     'Starting GPRS disconnect script\n'
""      \K
""      +++ATH0

Bring up Network.

On the Treo, go to the Prefs application and set Bluetooth > Dial-up Networking to On. Then test the connection by uncommenting out the debug and nodetach lines in /etc/ppp/peers/t-mobile and running pon t-mobile. You can also create a stanza in /etc/network/interfaces for this connection. It is the Debian way, after all.

iface ppp0 inet ppp
	provider t-mobile

You then create the network connection with ifup ppp0. I first run ifdown ath0 so that the new connection gets the default route unless I'm just using the Treo to provide access to my mail MX if it is blocked by my current Internet connection.

If you see tcsetattr: Invalid argument (line 971) in the log, you can work around this error by turning off Bluetooth and connecting to T-Mobile Internet just on the Treo. After downloading some mail or viewing a web page or whatever, turn Bluetooth and Dial-up Networking back on and try again.


Using Bluetooth and JPilot makes syncing fast and a whole lot more reliable than when I used infrared with gpilotd and the Evolution conduits. Still no wires, and you no longer have to ensure the Palm is pointed at your infrared device (which was often difficult since my laptop was often balanced on my lap or the edge of the couch).

I'm currently seeing about a 15-20 kB data rate via dial-up networking. While I wouldn't use it to upgrade my system, it is entirely adequate for getting and sending mail and doing some light web surfing if you don't happen to have a broadband connection.

Now that I'm used to the Treo 650, my old Palm m505 looks and feels awfully clunky, and the screen seems drab and lifeless. By combining the phone and PDA with Bluetooth networking and a wireless earpiece, the Treo is the device I've been waiting for for a long, long time.


Luke, Bluetooth Hotsync on my Treo 650 to my Laptop, previously at
This is a short and sweet blog of how to HotSync your Treo to a Debian GNU/Linux system. Mine is shorter as it assumes the use of a non-custom kernel-image kernel.

Luke, Bluetooth Dial-Up Networking with my Treo and Debian, previously at
This is a short and sweet blog of how to set up dial-up networking on your Treo with Debian GNU/Linux system. Luke's version contains a bit more detail; my version corrects a couple of errors in his scripts.

David A. Desrosiers, Synchronize your PalmOS® Handheld over Bluetooth in Linux,
While some of the information is old, and doesn't cover Debian GNU/Linux specifically, this document is long and rich and contains much background information which is extremely helpful.

Werner Heuser, Linux PDA & Handheld Compatibility Survey: Handspring,
Additional HOWTOs and references for the Treo, among others.

by-nc-nd Best Viewed With YOUR Browser Valid HTML 4.01! Valid CSS! Powered by Debian GNU/Linux
Free DNS