October 1, 2014
 
 
RSSRSS feed

Palm and Linux: Making the Connection - page 2

Connecting with Pilot-Link

  • April 3, 2000
  • By Michael Hall

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, 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, try a simple command to tell 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.

Accept the prompt to press the HotSync button on your Palm's cradle to get a list of the databases and programs installed on the 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).

Check the serial port settings, making sure it's named correctly according to the above table and that its IRQ is set properly. Try man setserial for documentation on the program to use if you suspect problems with the 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. Proper configuration can increase the speed of backups and other operations by six times. In order to get faster transfer speeds, 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, start adjusting PILOTRATE to speed things up.

By default, PILOTRATE is set at 9600 baud. It can be set 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 the serial port is able to handle the higher transfer rates. Having established how fast your Palm can talk to the computer, edit your .bashrc file to include the line export PILOTRATE="57600".

Sitemap | Contact Us