Palm and Linux: Making the Connection

From the archive — written 26 years ago. About old posts.

I can’t be the only gadget freak who impulsively bought a Palm Pilot and ran home with it, only to find myself standing in front of a Linux machine that I suddenly realized might or might not talk to my new toy. I’m also sure there are lots of Windows users out there with years of information tucked away on their Palms who’d love to complete the jump to Linux and want to bring their beloved PDA with them.

With their open and elegant design, Linux and the Palm are nice complements. Even though Linux support for the wildly popular Palm platform isn’t something 3COM has chosen to pursue, the Linux community has stepped forward to fill the gap in typical style.

In this article, I’ll cover the installation and use of pilot-link, a collection of command line tools and libraries that connect Linux and Palms. Pilot-link also forms the foundation of several GUI-based tools. If you’re a Linux user considering purchasing a Palm, or long-time Windows user who’d like to migrate you calendars, contacts, and backups to Linux; there’s a lot of support available for you.

Getting and Installing Pilot-Link

Pilot-link, included with most recent Linux distributions, has been around for some time. Even though pilot-link is primarily command-line based, several GUI-based packages depend on it to run. You won’t get GNOME or KDE’s Pilot tools to talk to your Palm without pilot-link, so the time you’ll spend on the command line installing and configuring pilot-link is a good investment.

Before getting involved with installation and configuration, you should decide how you plan to use your Palm. Red Hat 6.1 users who chose to install KDE already have a working copy of pilot-link and KDE support for the Palm. If you don’t plan to use your Palm with GNOME, you may want to skip down to the “Installation Tweaking” section and go from there.

Debian 2.1 (Slink) users are similarly supported “out of the box” with the PilotManager tool. Install the PilotManager and any dependencies it may have, and you can also skip down to “Installation Tweaking.”

For those who wish to use their Palm with GNOME, or who want to sample everything available before deciding, it’s best to obtain and install pilot-link before going any further.

If you don’t already have pilot-link installed on your Linux system, check the CD’s that came with your distribution for a copy. If you don’t have the CD’s for your distribution, or you’d like to have the very latest version, you can also download pilot-link from several locations.

The GNOME Pilot team has prepared RPM’s of the latest release (0.9.3). You need this if you want to use the GNOME Pilot software. The GNOME Pilot ftp site is at http://www.gnome.org/gnome-pilot/download/pilot-link/

Advanced users can download the source and compile the package for themselves from the pilot-link archive at ftp://ryeham.ee.ryerson.ca/pub/PalmOS/ .

Users of Debian 2.1 (Slink), or Corel Linux, who plan to run the latest GNOME or KDE Pilot tools should consider compiling pilot-link for themselves. The version of pilot-link that shipped with Slink and Corel Linux is too old, and the versions available from the frozen and unstable versions of Debian (Potato and Woody) require other upgrades to meet pilot-link’s dependencies. As with any time you compile a software package from source, make sure to remove any binary packages of pilot-link your distribution may have installed.

Installation Tweaking

Once you’ve installed pilot-link on your system, you should create a link to the serial port called /dev/pilot. Since many programs for the Palm assume you’ve created this link, you’ll save yourself a little time later on. Make sure you’re logged in as the root user before trying to create the link.

Check which serial port your Palm’s cradle is connected to. If you’re more familiar with how Microsoft Windows works, you should make sure you know the Linux name for your serial port, which is listed on the table below:

Serial Port Name

MS DOS/Windows Linux

COM 1 /dev/ttyS0

COM 2 /dev/ttyS1

COM 3 /dev/ttyS2

COM 4 /dev/ttyS3

Once you’re sure of which port your Palm cradle is connected to, open an xterm or switch to a console and enter the following command, replacing /dev/ttySX with the Linux name for your serial port:

ln /dev/ttySX /dev/pilot

Next, enter the command ls -l /dev/pilot to ensure you set the link correctly. If you receive an error message, make sure you are logged on as the root user before trying the command again. You should get output that looks something like this:

lrwxrwxrwx 1 root root 5 Mar 21 22:57 /dev/pilot -> ttyS0

Next, you should set appropriate permissions for the serial port so you can use pilot-link and other software for your Palm as a user other than root. Do this with the command chmod 666 /dev/ttySX where ttySX is the correct Linux name for the serial port your Palm’s cradle is attached to.

Once you’ve created the /dev/pilot link, you’re ready to try a simple command to tell you whether you’ve got your Palm talking to Linux. Place the Palm in its cradle, make sure the cradle is connected, and enter the command pilot-xfer -l.

You’ll see a prompt to press the HotSync button on your Palm’s cradle. Once you do, you should get a list of the databases and programs installed on your Palm. If you instead get a message like this:

Unable to bind to port ‘/dev/pilot’. (Please see ‘man pilot-xfer’ or ‘pilot-xfer –help’ for information on setting the port).

you should check the settings on your serial port, making sure you named the serial port correctly according to the table provided above and ensure that the IRQ is set correctly on your serial port. Try man setserial for documentation on the program to use if you suspect you have problems with your serial port.

Before we begin to explore the programs that come with pilot-link, it’s a good idea to set one last parameter: the speed at which your Palm communicates with your computer. With proper configuration, you can increase the speed of backups and other operations by six times. In order to get faster transfer speeds, you need to set the PILOTRATE variable. Once you’re comfortable using some of the pilot-link tools and have an idea of about how fast backups usually progress, you can start adjusting PILOTRATE to speed things up.

By default, PILOTRATE is set at 9600 baud. You can set it to 19200, 38400, or 57600 baud using the following command:

export PILOTRATE=“19200”

You should increase PILOTRATE in increments, especially on older computers, to ensure your computer’s serial port is able to handle the higher transfer rates. Once you’ve established how fast your Palm can talk to your computer, you can edit your .bashrc file to include the line export PILOTRATE=“57600”.

A Quick Look at Pilot-Link

If you don’t plan to use your Palm with anything other than the GUI tools available, you can skip this section. Pilot-link is primarily designed for command-line use. On the other hand, pilot-link provides some useful tools you can incorporate into scripts or programs of your own. Pilot-link also provides tools for routine maintenance of your Palm that don’t require a complex or cumbersome GUI interface.

The first pilot-link program you might want to look at is pilot-xfer, which we used to check your Palm’s connection to the computer. pilot-xfer can perform a full backup of your Palm, which is recommended before you do much else with it.

To perform a backup, you’ll need to open an xterm and create a directory for your backup data using the command mkdir pilot_backup . Once you’ve created the directory, you can backup your Palm data by using the command pilot-xfer -b ~/pilot_backup/. If you need to restore your data, you can use the command pilot-xfer -r ~/pilot_backup/ .

pilot-xfer is probably the most useful program you’ll encounter before you get started using GUI interfaces with your Palm. If you’re curious about what else pilot-xfer can do, use the command pilot-xfer –help, which details how to do incremental backups and several other useful things.

Another fairly useful program that comes with the pilot-link package is addresses. This program bears specific mention because it isn’t quite as friendly as some of the other pilot-link programs. It will appear to “hang” when you run it, since it never asks you to press the HotSync button on your Palm’s cradle. It doesn’t automatically assume /dev/pilot is linked to your Palm, either. You also have to specify the port your Palm’s cradle is connected to with a command line parameter.

To get a nicely formatted list of the addresses you have stored in your Palm, enter the command addresses /dev/pilot > addresses.txt and press the HotSync button on your Palm’s cradle once you’ve pressed the Return key.

You can look at the address list this produces with less addresses.txt.

There’s a small amount of documentation available with pilot-link, as well. Check in the /usr/doc/pilot-link directory on your system for the README file, which lists all the programs available with pilot-link.

GUI Tools for Use With Your Palm

Pilot-link forms the foundation for several GUI-oriented tools available for the Palm, which is why we spent so much time making sure it was running properly before looking at GUI-based software. KDE and GNOME include programs that work with their standard calendar and addressbook utilities, and there are several other packages that aren’t tied to any particular desktop environment.

One thing all these tools have in common is their use of “conduits”. Conduits are ways in which your Palm can communicate with the software on your computer. You can use conduits to synchronize your schedule, download mail, and update your addressbook. Almost all software that works to link a Palm and a computer depends on conduits, and all the software I’ll be covering uses the term “conduit”, so it’s a concept worth noting.

KDE’s kpilot

kpilot is KDE’s Palm software. It includes a program much like the HotSync manager that runs in the system tray on Microsoft Windows. While some features of kpilot are only supported under KDE, it can be used with any (or no) desktop environment, and in conjunction with organizer software other than that provided with KDE.

kpilot’s homepage is located at http://www.slac.com/pilone/kpilot_home/, but it’s included as part of the standard KDE distribution, so you should only need to download the newest version if you’re having problems with the software.

If kpilot is installed on your system, you’ll be able to find it under KDE’s “Utilities” menu. You can run it by selecting it from the menu, or typing kpilot from the command line. One “gotcha” you may encounter on starting kpilot is the kpilotDaemon program complaining about being unable to “bind to a socket.” If that’s the case, check the file /etc/hosts to make sure you have a line that looks like this:

127.0.0.1 localhost.localdomain localhost

If you don’t see that line, log in as root and add it.

You’ll also need to make sure kpilot knows which port your Palm’s cradle is connected to. kpilot is configured to connect to a cradle connected to /dev/pilot, so if you created the /dev/pilot link to your computer’s serial port while you were setting up pilot-link, you won’t have to change this setting. If you didn’t create that link, you can select the correct serial port from a drop-down menu. If you’re unsure of which port your Palm’s cradle is connected to, consult the chart provided in the section where we configured pilot-link. You can also set the rate at which your Palm and computer communicate, as you did with PILOTRATE when you were configuring pilot-link earlier. You should set this to the same speed you set PILOTRATE.

There are a couple of other basic options you can set that are largely self-explanatory and documented, but the ones most important to using kpilot with the KDE calendar (kalendar or korganizer) and addressbook (kab) are in the Conduit menu, which you’ll see once you adjust the basic settings and have the main kpilot program window on your screen.

There are three conduits available with kpilot: popmail_conduit, todo_conduit, and vcalconduit. You can activate any of these conduits by clicking on it once to highlight it, and then clicking on the right-facing arrow to move it from the “Available Conduits” to the “Installed Conduits” column. Once you’ve placed the conduit in the “Installed” column, you can configure it by clicking on it and clicking “Setup”.

todo_conduit and vcalconduit both need to be told where your calendar file is located. You may need to start kalendar and save an empty calendar file from the File menu so you can then set todo_conduit and vcalconduit accordingly. vcalconduit, it should also be noted, is compliant with the vcal standard. That means users may use vcal-compliant software with kpilot, not just korganizer.

GNOME’s Pilot Tools

The GNOME desktop environment has also added Palm support. Unlike kpilot, the GNOME Pilot project is a little more rough, and under more active development. If you’re just interested in making your Palm work with the GNOME calendar and address book, though, GNOME Pilot is usable.

One important thing to note if you plan to take advantage of GNOME’s Palm support is that it requires the very latest pilot-link, which is currently at version 0.9.3. Red Hat versions before 6.2, Debian 2.1, and most other distributions, will require an upgrade. Depending on how closely you track GNOME development, you may also need to upgrade your version of the GNOME calendar and addressbook packages (gnome-pim).

The source files and RPM’s for the correct version of pilot-link as well as the sources and RPM’s for GNOME Pilot support are all at the GNOME Pilot website, http://www.gnome.org/gnome-pilot/ . Once there, read the available pointers and documentation carefully: GNOME Pilot is still under heavy development, which could pose some problems for novice users.

After you install the GNOME Pilot packages, you need to run the pilot-sync applet. You can find this in the GNOME Panel menu by selecting “Panel”, then “Add to Panel”, “Applet”, “Utility”, then “pilot-sync”. This will bring up a GNOME “Druid” to help you configure GNOME for use with your Palm. At one point in the installation process, you’ll be asked which directory your Palm data should live in. Once you decide on a directory name, make sure you’ve created this directory with mkdir before trying to sync your Palm. Once you’ve successfully completed installation with the Druid, you’ll see the pilot-sync applet in your panel. Right-clicking on that applet will allow you to restart the pilot-sync daemon and set configuration options.

As noted earlier, GNOME Pilot is under heavy development. This means that not every feature works correctly. If you’re an inexperienced user, or simply unwilling to put up with the sort of bugs found in newer software, you might want to consider another package. If you need a little help, the FAQ can be found at http://www.gnome.org/gnome-pilot/documents/FAQ.html .

JPilot Recreates the Palm Desktop

JPilot largely recreates the Palm Desktop familiar to Microsoft Windows users. It includes calendar, to-do, addressbook, and file installation conduits. Like the KDE and GNOME packages, it requires pilot-link, and it also requires version 1.2 of the GTK toolkit, which is available on most current distributions. You can learn more about it at http://www.gtk.org.

You can find JPilot at http://jpilot.linuxave.net/, where both source and RPM’s are available. Even though JPilot is a GUI-based program, you’ll need to open an xterm to run it, since it isn’t part of any desktop environment and doesn’t include itself in their menus automatically. Just open an xterm and enter the command jpilot&.

Once you’ve installed JPilot, make sure to configure the program to use the correct serial port to talk to your Palm’s cradle. Check out “Preferences” under the “File” menu. If you made the link between your cradle’s serial port and /dev/pilot while you were setting up pilot-link, just type /dev/pilot into the correct field.

PilotManager: Another GUI Solution

PilotManager isn’t designed to integrate with a particular desktop environment, nor is it designed to emulate the Palm Desktop. It does, however, synchronize with several common Unix/Linux programs, including the popular Plan calendar software and the Big Brother Database, an Emacs address book. It also offers file backup and installation, plus a few other conduits. The PilotManager homepage, located at http://www.moshpit.org/pilotmgr/ has a lot of documentation, plus archives of its active mailing lists.

PilotManager is a great solution for Debian users, since it comes with Debian 2.1 (Slink), which already includes the packages you need to run it “out of the box.”

One pitfall for users of newer Linux distributions is that there are no Linux versions of PilotManager compiled against Perl 5.005

  • the standard on most current distributions. The documentation for how to compile a working version of PilotManager for systems with Perl 5.005 is available in the download files. Users of Red Hat prior to 6.0 should also check out the Red Hat FAQ on the PilotManager homepage.

Wrapping Up: A Couple of Tips and Warnings, and a Pointer for the Lucky Ones with Handspring Visors.

Like much of Linux, support for the Palm is a work in progress. Every package mentioned in this article gets the job done, but there’s room for improvement, which occurs on a daily basis. If a program isn’t offering what you’d hoped, keep an eye on its homepage and write the author. The chances are good things will get better. If you take the time to make thoughtful suggestions and thorough bug reports, they’ll get better yet.

You should also take care to make a good backup of your Palm’s information, either on another computer or using the pilot-xfer program I detailed above. Though I’ve never lost data from any of the programs in this article, I have had to put up with duplicated records and similar annoyances that can easily be solved with a quick restore from a good backup.

Keep in mind that once you’ve decided which program most suits your needs, you should stick to it. The KDE and GNOME packages both rely on daemons that need exclusive access to your Palm: if both are running, neither will work. While you can turn off each of the daemons to use its counterpart, that isn’t very convenient.

Even though they’re having a hard time meeting demand, a new company on the Palm scene, Handspring, is also finding support under Linux. The wrinkle in Handspring support is the fact that the Visor, Handspring’s name for their PalmOS-based PDA, ships with a USB-connected cradle. USB support is still relatively new to Linux. You can find out more information on making a Handspring work with USB under Linux at the Linux Visor Homepage, located at http://usbvisor.sourceforge.net/cgi-bin/index.pl.

Home

© 1999, Michael Hall ([email protected])

Drop a line about this.