Using a Palm Tungsten-T with a Linux PC

Introduction

I recently upgraded my Palm IIIe (which I had been very happy with) to a Palm Tungsten-T and so far, have been very pleased with it. The colour screen is sharp, the battery life pretty good and the ability to play MP3s and surf the web is amazing! (And of course, being a Palm it is also a very good electronic organiser!)

The one downside is that some of the tools that come with it are only available Windows, but fortunately, thanks to the Free Software community, the Tungsten will also work well with a Linux machine. Below is a mini-HOWTO based on my experiences. My machine runs Debian GNU/Linux testing/unstable distribution, but hopefully the information will be applicable to other Linux distributions. If you spot any errors or have any comments, please let me know at: Nathan [dot] Dimmock [at] bcs.org.uk.

Contents

Synchronising with the desktop

I use the excellent j-pilot as my desktop-based view onto the data I have stored on the palm. It supports the four major palm apps and also has plugins for expenses, GNU keyring, mail and backing up the entire palm on a regular basis.

J-Pilot is only a front-end actually uses the pilot-link tools to access the palm. Support for USB devices was introduced in v0.11, and I recommend you get at least version 0.11.7 as there were some nasty bugs in the earlier ones. (Debian users: Unfortunately the package in woody is too old to have USB support.)

Kernel Drivers

In order to allow the PC to communicate with the palm you will need the usbserial and visor kernel modules. Support for the Tungsten T first appeared in the 2.4.21-pre4 kernel, but it's fairly easy to patch the visor.{c,h} files from 2.4.18, 2.4.19 and 2.4.20 to support it if you don't want to run a beta kernel.

Update - 2.4.21 is now out of beta.

Once you have the modules compiled and installed, you need to make the visor module automatically load at start up as otherwise there is a tendancy for the sync process to enter an "uninterruptible sleep" state. Under Debian you can do this by adding a line saying "visor" to /etc/modules.

The Tungsten-T uses /dev/ttyUSB0 to communicate with the computer, although other Palm devices use ttyUSB1. For the pilot-link tools you can set this on the command line using -p switch or by setting the PILOTPORT environment variable. In j-pilot it is settable in the preferences dialog box. Some people have also reported that using the syntax "usb:/dev/ttyUSB0" causes a big increase in speed, although I haven't been able to get this to work myself.

More information: USB Readme, manpage: pilot-link(7)

Surfing the web and e-mail - PPP over bluetooth

I have an MSI USB bluetooth dongle for my PC which works very nicely with the Tungsten, allowing me to use a wireless connection to surf the web, check e-mail and hotsync up to about 10m from my PC. This section describes how to setup a PPP connection over the bluetooth link.

PC Setup

First of all you need the Linux Bluetooth protocol stack. I would advise using the latest kernel patches (I'm using mh6) as the tools in Debian unstable would not work with the Bluetooth support in the vanilla 2.4.20 kernel.

Warning: If you are using the BlueZ stack, do not compile any USB Bluetooth support into your kernel (or even as a module!) as this driver and the BlueZ stack conflict.

Install the bluez-{pan,utils,sdp} Debian packages (at time of writing these are only available in the unstable repository) or equivalent for your distribution.

Check that your bluetooth device is up and running using the hciconfig command. The output will look something like this:

# hciconfig
hci0:   Type: USB
        BD Address: 00:10:DC:AF:BB:E5 ACL MTU: 192:8  SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN
        RX bytes:778010 acl:9154 sco:0 events:5193 errors:0
        TX bytes:182357 acl:5245 sco:0 commands:21 errors:0
    

This might also be a good time to set the PIN in /etc/bluetooth/pin and check that your PC can find your palm using hcitool e.g.

$ hcitool scan
Scanning ...
        00:07:E0:0C:A1:5A       Nathan's Palm
    

Next you need to start the hcid and sdpd if they are not already running. If you are using a Debian system, then the easiest way to do this (if they are not already running) is to use the scripts in /etc/init.d/ although if you are not running Debian, they don't need any parameters to be passed.

The dund daemon will listen for incoming PPP connections and hand them off to pppd. To do this, create a file /etc/ppp/peers/dun containing (and customised to your setup of course):

debug
57600
noipdefault
proxyarp
# IP address of PC : IP address to be assigned to Palm
172.31.64.12:172.31.130.67
# My DNS server
ms-dns 172.31.129.1
ktune
noauth
local
nodefaultroute
noipx

Now invoke dund with the options:

dund --listen --persist --msdun call dun

On a Debian system, you can do this at startup by adding the line:

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

to /etc/default/bluez-pan.

Tungsten Setup

  1. Go to the Preferences->Communications->Bluetooth->Trusted Devices screen and add the computer. My device is called BlueZ(0).
  2. Now go to the Connection screen (underneath "Bluetooth" on the Communications preferences panel) and add a new connection to your computer. "Connect to PC", Via "Bluetooth", "Device BlueZ(0)" (or whatever you called it in the previous step).
  3. Next go to the Network screen and add a new service. The username and password are irrelevent unless you setup your PPP connection to require authentication, but set the "Connection" to the connection you created in the previous step and check that the Details screen has Connection type set to PPP, the idle timeout is at least 3 minutes, Query DNS is ticked and IP address is automatic. "Script" should just say "End:".
  4. OK, now you're all set. Go back to the Preferences->Network screen, select your new connection and hit "connect". If all goes to plan, you should now have a PPP link between your Palm and the computer – if not, take a look in your /var/log directory for log files that might contain helpful info (a ppp log and/or syslog are good places to start).

Wireless hotsync: infrared & bluetooth

Infrared

David A. Desrosiers has written an excellent HOWTO.

Bluetooth

At the moment, it's not possible to do a "bluetooth sync" under Linux as pilot-link doesn't support this yet, but since it does support network syncing, once we have a working PPP connection, we can achieve the same effect. This section assumes you have a working PPP setup, as described in the previous section.

Tungsten Setup

  1. Load the hotsync application, and go to the "Modem Sync Prefs" menu and select "Network".
  2. On the LanSync prefs menu, choose "Local HotSync".
  3. Now go to the "Primary PC Setup" menu and enter the details of the PC you want to HotSync with. To to save time on a DNS lookup, I entered the IP address rather than the hostname. Unfortunately, there is a bug in OS 5.0 that causes the palm to get the IP address wrong, if your machine's IP address is 172.31.64.12 it will try to send to 12.64.31.172 instead. I believe this might be fixed in the latest OS patch for the Tungsten, but if not, you can get around it by simply entering the IP address "backwards" (i.e. enter 12.64.31.172 to get it to sync with 172.31.64.12). The Subnet Mask is optional - it defaults to 255.255.255.0.
  4. Finally, on the main HotSync screen, select "Modem" and then choose the network connection to your PC. To perform the hotsync, setup the PC as detailed below and then tap the button in the centre of the screen.

PC Setup

This part is easy - simply tell pilot-link (or jpilot) to use "net:any" as the port to use to connect to the Palm. e.g. pilot-xfer -p net:any -l.

Aside: Cool and useful PalmOS programs

Useful

Games


Home PageReturn to Home Page Last updated: 2006-04-24 21:32