Henry's NotesHomeHomeSlackwareCamerasGadgets Installation Laptops Links Palm Printing Sound System Administration X Window System ContactEmail MeSearchAdvanced search |
Palm SyncingIt's easy to sync a Palm with your PC under Windows. It can be a challenge to do it under Linux. When there was just the serial interface, it was very easy. With USB, it's not quite so easy. However, once you have the software and master the technique, it's becomes just routine to do it. I don't bother with conduits, or editing my data on the PC. I don't use my PDA that way. I do all the work on my PDA. For me, there are only two purposes for connecting my Palm to the PC - backing up, and installing new software. pilot-linkUnder Linux, it all happens with the pilot-link suite of programs. Most distributions include this. If yours doesn't, or you want to get a later version of it, go to freshmeat.net or go straight to the home page. Read some of the info there, it's interesting and useful. The only program out of the suite that I use is pilot-xfer. I use this to backup and install new software. It does it all for me. PreparationIt helps to use two environment variables. Connection portFirst you need to tell the software suite where you are going to attach the Palm. You can do this a number of ways. You can set up a symbolic link /dev/pilot to the actual device. And you can set up the environment variable PILOTPORT to point to the actual device. You can even set up PILOTPORT to point to the symbolic link to the actual device. Many distributions will automatically create /dev/pilot for you. Sometimes this will be wrong. SerialIf you have an older Palm that connects via serial port, then you need to work out whether you are connecting via COM1 or COM2 (to use the old DOS terms). In Linux land, that will be /dev/ttyS0 or /dev/ttyS1.
USBThis is a little bit trickier. You're going to connect to /dev/ttyUSB0 or /dev/ttyUSB1. Maybe higher numbers. On my laptop, it's always /dev/ttyUSB1. But don't go and look for those devices in /dev. Usually they are not going to exist. They won't exist until you connect the Palm to the USB port, and press the sync button. At this point, the USB drivers in Linux (uhci [type of USB bus you have] and usb-core) gets activated, it gets the USB device number, looks it up in the device table, works out that a Palm device wants to do USB stuff, loads the usb-serial module, and then loads the top-level module that pertains to your Palm device. I have a Palm m515 so it loads the visor module, as apparently the Palm m515 looks like a Handspring Visor. As root, if you do "lsmod", you are likely to see something like:
At that point, and not before, /dev/ttyUSB0 or /dev/ttyUSB1 get created and data can be transferred via it. To work out which one you are going to be using, log on as root, "tail -f /var/log/messages" and watch the action. You can't get any more explicit about what's happening. It tells you exactly which port you'll be using. Nov 28 01:07:16 cerebus kernel: hub.c: new USB device 00:1f.2-1, assigned address 2 Nov 28 01:07:20 cerebus /etc/hotplug/usb.agent: Setup visor for USB product 830/3/100 Nov 28 01:07:20 cerebus kernel: usb.c: registered new driver serial Nov 28 01:07:20 cerebus kernel: usbserial.c: USB Serial support registered for Generic Nov 28 01:07:20 cerebus kernel: usbserial.c: USB Serial Driver core v1.4 Nov 28 01:07:20 cerebus kernel: usbserial.c: USB Serial support registered for Handspring Visor / Palm 4.0 / Clié 4.x Nov 28 01:07:20 cerebus kernel: usbserial.c: Handspring Visor / Palm 4.0 / Clié 4.x converter detected Nov 28 01:07:20 cerebus kernel: visor.c: Handspring Visor / Palm 4.0 / Clié 4.x: Number of ports: 2 Nov 28 01:07:20 cerebus kernel: visor.c: Handspring Visor / Palm 4.0 / Clié 4.x: port 1, is for Generic use and is bound to ttyUSB0 Nov 28 01:07:20 cerebus kernel: visor.c: Handspring Visor / Palm 4.0 / Clié 4.x: port 2, is for HotSync use and is bound to ttyUSB1 Nov 28 01:07:20 cerebus kernel: usbserial.c: Handspring Visor / Palm 4.0 / Clié 4.x converter now attached to ttyUSB0 (or usb/tts/0 for devfs) Nov 28 01:07:20 cerebus kernel: usbserial.c: Handspring Visor / Palm 4.0 / Clié 4.x converter now attached to ttyUSB1 (or usb/tts/1 for devfs) Nov 28 01:07:20 cerebus kernel: usbserial.c: USB Serial support registered for Sony Clié 3.5 Nov 28 01:07:20 cerebus kernel: visor.c: USB HandSpring Visor, Palm m50x, Sony Clié driver v1.6 HotSync use is going to be /dev/ttyUSB1. So set up a symbolic link to it if you want, "ln -s /dev/ttyUSB1 /dev/pilot" and set up the environment variable PILOTPORT in .profile or .bashrc with "PILOTPORT=/dev/ttyUSB1; export PILOTPORT". Transfer speedNow the pilot-xfer program knows where to go to get to your Palm. There's one more step. You have to tell the Palm and pilot-xfer what speed you'll be transferring data. You have to be in sync with this or they won't be able to talk to each other. On the Linux side, set the PILOTRATE environment variable. I usually stick with a data speed of 57,600. This works fine for me and doesn't give me data errors. You might want to experiment with 115,200, but I'm happy with old slow-but-steady. For other options, do "man pilot-link" and read the notes. Set the environment in your .profile or .bashrc with "PILOTRATE=57600; export PILOTRATE". And if you're using USB, it's the same thing. You're doing a serial data transfer across USB. Sure it's faster, but basically it's just plain old serial transfer. Fancier cable. So you have to tell the Palm to use the same speed.
That's it. You're ready to use pilot-xfer. pilot-xferThis utility is used to do most of the command line connectivity with the Palm. This is what I use to backup and install new software. It's a command line program. Typing. On the command line. It's easy. There are options. The first option is optional. If you have set up the /dev/pilot symbolic link, or the PILOTPORT environment variable, you can omit the first parameter. But if you want to set the connect port on the fly, then use the first parameter "-p port" or "--port port". This must come before the commands about what sort of data transfer you want to do. Example: pilot-xfer -p /dev/ttyUSB1 --install /home/hgriggs/citytime.prc After you enter the port, or omit the port, you can choose what type of operation you want to do. There are four main operations: installYou can install software to your Palm. This is easy. pilot-xfer --install /home/hgriggs/citytime.prc Note that install takes two dashes before it. It's a long command line option, and they take two dashes. You coul duse the shorter approach and use -i. One dash. pilot-xfer -i /home/hgriggs/citytime.prc You can list a number of files to install, and use wildcards. syncIf you have a directory containing the contents of your Palm, you can do a sync. This will check the already stored version of data or program with the version on the Palm. If they are the same, no backup is done. If they have changed on the Palm, they are copied to the directory. Faster than a backup. pilot-xfer --sync /home/hgriggs/palm/syncdir backupYou can backup your Palm to a directory. This will copy the entire contents of your Palm to the directory. Make sure the directory exists before you start. I use directory names with dates. When I have enough of them, I burn them to cdrom, file the cdrom, and delete all but the last directory. I try and backup about once a week. pilot-xfer --backup /home/hgriggs/palm/backup20031127 restoreYou can restore all the contents of a directory to the Palm. I used this when I backed up my Palm IIIc after the screen died. I then restored the directory to my new Palm m515 and promptly crashed it. What I should have done was restore to exactly the same style of Palm. But I didn't have that option, so I rebooted the Palm, and then installed the applications and data one by one, without attempting to overwrite system applications. That worked okay. I haven't had to use the restore feature yet, but I could if I needed to. In the past, I have used this to save the entire contents of the Palm, and load them into another Palm. Make sure you set the owner to be the same name on both Palms before you start the exercise. pilot-xfer --restore /home/hgriggs/palm/backup20031120 Optionspilot-xfer has a lot of options. Use "man pilot-xfer" to check it out. Most of the double-dash options have short single-dash equivalents. Operation with serialThis is easy. Attach the cables. Type your pilot-xfer command and press Enter. Then press the Hotsync button on the cradle, or fire up the Hotsync program on the Palm and press the Hotsync button there. Watch the data flow. Operation with USBThis is slightly more tricky. Attach the cables. Type your pilot-xfer command but don't press Enter yet. Then press the Hotsync button on the cradle, or fire up the Hotsync program on the Palm and press the Hotsync button there. This will create the device /dev/ttyUSB1. Wait a second or two, then press Enter. Then watch the data flow. The pilot-link web site reports that they have added a wait so that you don't have to do the little wait yourself. If this is important to you, then grab the latest version and try it out. JPilotJPilot is a really nifty GUI application that looks like the Windows Palm desktop. It will do syncs and backups and program installs for you. It's nice. It works. Get it from the web site at jpilot.org, install it, read the documentation and use it. It uses the pilot-link suite, especially pilot-xfer underneath the pretty face, so you still need to have pilot-xfer available. |