Default
Google

Palm Computing with UNIX Platforms

Home Abstract Packages Activities Python Status

Abstract

Having been given a Palm III by my colleagues as a work tool, and given that I work in a UNIX environment, I set about getting various Palm OS connectivity packages for Linux and Solaris. This document describes how I got on with this task.

Packages

pilot-link 0.9.3

One popular package is called pilot-link and can transfer data to and from the Palm device.

Solaris

The pilot-link.0.9.3.tar.gz source code package was straightforward to configure and install, given a familiarity with packages using the GNU autoconf system. A working C compiler, such as GCC is required to compile the software, although Solaris packages do seem to be available on the FTP site.

On an Ultra 10 workstation, the serial port is located at the back of the tower and is labelled with the letter "B". The serial port device is known in Solaris as /dev/ttyb.

Linux

I installed an RPM package on a Red Hat Linux 6.1 computer (a Dell Latitude laptop). This did not seem to involve too many upgrades of existing RPM packages, unlike the gnome-pilot software which seemed to want tens of packages to be disturbed - a situation I do not want to get involved with!

On this laptop, the serial port is located at the back of the machine and is labelled as "10101". The serial port device is known in Linux as /dev/ttyS2. I think that the PC card modem occupies /dev/ttyS1, but this may all be configured in the machine's own setup menu: accessing that menu using the Fn-F1 key combination, the serial port is listed as being addressed to COM3.

Note that to use the serial port as a "normal" user requires read and write permissions to be set on the serial port. I did this using the following command:

chmod go+rw /dev/ttyS2

Activities

With the pilot-link package, several activities can be performed.

Backing up

To do this, invoke the pilot-xfer program, specifying the serial port and the directory on the UNIX computer into which the Palm device's data will be placed. For example:

pilot-xfer --port /dev/ttyb --backup .

This uses the serial port found under Solaris to backup the data on the Palm device to the current directory - not necessarily a good idea in a non-empty directory.

Installing Software

Software can be installed using the following style of command:

pilot-xfer --port /dev/ttyb --install application.ext

Reading To-do List Items

The to-do list can be converted into simply formatted text from the backed-up to-do list file using the following command in the directory where the backup was performed.

read-todos -f ToDoDB.pdb

Alternatively, it should be possible to read the to-do list directly from the Palm device:

read-todos /dev/ttyb

This program will, in both cases, output the text to standard output.

Reading Memos

The memos program extracts memos directly from the Palm device, and these can then be written out as mailbox-style output or to a directory hierarchy of text files. Arguably the most useful output is the mailbox-style output which, when redirected to a file, can then be read by mail reading software such as Netscape Communicator. For example:

memos -p /dev/ttyb > /export/paulb/nsmail/Memos

Here, /export/paulb is my home directory, and Netscape stores mail in the nsmail directory. Note that the Memos file should not exist before you do the above operation unless you want to overwrite it.

Starting Netscape Communicator after the Memos file has been created will alert the software to the presence of the new mailbox, and the memos can then be viewed inside the "Memos" folder within the mail reading interface. The "Get Msg" button should be able to fetch new messages from that mailbox, should it be edited or recreated later, without having to restart the software.

Python

The Pyrite package enables access to Palm data from the Python programming language.

Installing Pyrite 0.9.3/Sulfur 0.1.3

Install GNU gettext if it isn't available on your system. Try the following command to discover whether you have all you need already:

which msgmerge

Make sure that the bin directory is in your PATH environment variable and move into the directory where the Pyrite package is located.

Set some environment variables:

LDFLAGS, LIBS
These should refer to the pilot-link installation's lib directory and reference the socket library on platforms like Sun Solaris.
CPPFLAGS
This should refer to the pilot-link include directory.

For example:

LDFLAGS=-L/export/paulb/Software/pilot-link/lib -lsocket
CPPFLAGS=-I/export/paulb/Software/pilot-link/include
LIBS=-L/export/paulb/Software/pilot-link/lib -lsocket

Edit Pyrite's configure to fix an "include" in a test program. You can use this "diff" with the patch program, or edit line 1127 appropriately:

1127c1127
< #include <libpisock/pi-dlp.h>
---
> #include <pi-dlp.h>

Invoke configure for Pyrite, specifying a new locale directory unless you want to install into the system's locale directory. For example:

./configure --prefix=/export/paulb/Software/pyrite --with-locale-dir=/export/paulb/Software/pyrite/locale

Build Pyrite by invoking the make command.

Once the build has finished, fix Sulfur/Makefile to ensure the right INSTALL program is in use - on Solaris this should be /usr/ucb/install. On Solaris, fix Makefile changing...

for i in `find . -path './Sulfur' -prune -o -name '*.py' -print` ; do \

to:

for i in `find . -name Sulfur -prune -o -name '*.py' -print` ; do \

Now try and install Pyrite using the make install command.

You should find that i18n/Makefile doesn't seem to work for the install target, so try a "dry run" installation using make -n install, move into the i18n directory, and execute the part which failed (a for...done loop) in a Bourne shell. For example:

cd i18n
for dir in de ; do \
make -C $dir MSGFMT=/export/paulb/Software/gettext/bin/msgfmt MSGMERGE=/export/paulb/Software/gettext/bin/msgmerge LOCALEDIR=/export/paulb/Software/pyrite/locale format install ; \
done

Pyrite should now be installed.

Status

(October 6th, 2000)
Cleaned up this page, adding information about Python packages for accessing Palm data and other useful activities.


Acquiring image from ProHosting Banner Exchange