Pilot-link

Pilot-link

Start simple. The pilot-link tools are a set of command- line-based utilities for syncing PalmOS-based PDAs. These tools all default to a port of /dev/pilot and a baud rate of 9600. You can override these with the environment variables PILOTPORT and PILOTRATE.

Pilot-xfer

The main tool is called pilot-xfer. If you run that without arguments, it dumps out its help screen:

 mschwarz@mars:~$ pilot-xfer 
 Usage: pilot-xfer [-p port] command(s) 
 
 Where a command is one or more of: -b(ackup) backupdir 
 -u(pdate) backupdir 
 -s(ync) backupdir 
 -r(estore) backupdir 
 -i(nstall) filename(s) 
 -m(erge) filename(s) 
 -f(etch) dbname(s) 
 -d(elete) dbname(s) 
 -e(xclude) filename 
 -P(urge) 
 -l(ist) 
 -L(istall) 
 -v(ersion) 
 -h(elp) 
 
 The serial port to connect to may be specified by the PILOTPORT 
 environment variable instead of the command line. If not specified 
 anywhere, it will default to /dev/pilot. 
 
 The baud rate to connect with may be specified by the PILOTRATE 
 environment variable. If not specified, it will default to 9600. 
 Please use caution setting it to higher values, as several types 
 of workstations have problems with higher rates. 
 
 -b backs up all databases to the directory. 
 -u is the same as -b, except it only backs up changed or new db's 
 -s is the same as -u, except it removes files if the database is 
 deleted on the Pilot. 

The backup switch saves all programs and data from your PDA to the named directory. The update command moves only new programs and changed data to the directory, but it doesn't erase data from the directory that has been removed from the pilot. The sync command works like update, except it does erase things from the directory that have been erased on the pilot. The restore command will load everything in the directory into the pilot. This is great for restoring the pilot if you let the batteries die.

The install switch loads a .prc file (a pilot program) into the pilot. This is how you add new Palm applications.

The merge switch is one you aren't likely to use very often. It allows you to add the data stored in a file in your backup directory to your Palm. This might be used if you have a Linux application that adds data to such a file. Note: If you add a file that is already loaded, you might end up with multiple copies of data records on your palm (for example, two copies of all your memos). Fortunately, the pilot-link package contains a program, pilot-dedupe, that eliminates duplicate records from your palm.

The fetch switch allows you to pull a single database out of the palm. This is another option you are unlikely to use unless you are developing or debugging a palm application.

The delete switch allows you to erase a database from the palm. Once again, I wouldn't use this one as a matter of routine.

The exclude switch allows you to name one or more directories to omit from a backup, update, sync, or restore operation. You must specify this option on the command line before the operation you intend it to modify.

The list switch will give you a list of the databases in your palm:

 mschwarz@mars:~$ pilot-xfer -l 
 Waiting for connection on /dev/ttyS0 (press the HotSync button now)... 
 Connected 
 Reading list of databases in RAM... 
 'AvGoPref' 
 'AvGoVersion' 
 'QuickenCategories' 
 'AvGoChanMQ' 
 'Auto Log DB' 
 'CityTimeDB' 
 'Datebk3HDB' 
 'HSAdvCalcDB' 
 'AddressDB' 
 'DatebookDB' 
 'ExpenseDB' 
 'LauncherDB' 
 'MailDB' 
 'MemoDB' 
 'NetworkDB' 
 'WWJournal' 
 'SolitaireFreeData' 
 'ToDoDB' 
 'DiddleDB' 
 'AvGoDocsMQ' 
 'DiddleIDB' 
 'Untitled' 
 'AvGoMUrlMQ' 
 'QuickenMemorized' 
 'Auto Log Notes' 
 'AvGoNtShMQ' 
 'HSPrefs' 
 'AvGoTimeMQ' 
 'QuickenTransactions' 
 'HandyShop2' 
 'Auto Log' 
 'AvantGo' 
 'Diddle' 
 'Hearts' 
 'MobileLink' 
 'PktQuicken' 
 'YAtzee' 
 'GraffitiDemo' 
 'WW Journal' 
 'SolFree' 
 'MBlnDeviceInfo' 
 'libmal' 
 'Graffiti ShortCuts' 
 'Unsaved Preferences' 
 'AvGoRecent' 
 'Net Prefs' 
 'System MIDI Sounds' 
 'Saved Preferences' 
 'MBlnProfile' 
 List done. 

The Listall (note the capital) switch will list all databases, including system databases. You normally shouldn't be messing about with system databases.

The purge switch will remove all deleted records from the palm device without doing a sync. This does no harm. I would think you should prefer to do a sync, however.

Backup

Here it is in action. First, we do a complete backup:

 mschwarz@mars:~$ pilot-xfer -b visor 
 Waiting for connection on /dev/ttyS0 (press the HotSync button now)... 
 Connected 
 Backing up 'visor/AvGoPref.pdb'... OK 
 Backing up 'visor/AvGoVersion.pdb'... OK 
 Backing up 'visor/QuickenCategories.pdb'... OK 
 Backing up 'visor/AvGoChanMQ.pdb'... OK 
 Backing up 'visor/Auto Log DB.pdb'... OK 
 Backing up 'visor/CityTimeDB.pdb'... OK 
 Backing up 'visor/Datebk3HDB.pdb'... OK 
 Backing up 'visor/HSAdvCalcDB.pdb'... OK 
 Backing up 'visor/AddressDB.pdb'... OK 
 Backing up 'visor/DatebookDB.pdb'... OK 
 Backing up 'visor/ExpenseDB.pdb'... OK 
 Backing up 'visor/LauncherDB.pdb'... OK 
 Backing up 'visor/MailDB.pdb'... OK 
 Backing up 'visor/MemoDB.pdb'... OK 
 Backing up 'visor/NetworkDB.pdb'... OK 
 Backing up 'visor/WWJournal.pdb'... OK 
 Backing up 'visor/SolitaireFreeData.pdb'... OK 
 Backing up 'visor/ToDoDB.pdb'... OK 
 Backing up 'visor/DiddleDB.pdb'... OK 
 Backing up 'visor/AvGoDocsMQ.pdb'... OK 
 Backing up 'visor/DiddleIDB.pdb'... OK 
 Backing up 'visor/Untitled.pdb'... OK 
 Backing up 'visor/AvGoMUrlMQ.pdb'... OK 
 Backing up 'visor/QuickenMemorized.pdb'... OK 
 Backing up 'visor/Auto Log Notes.pdb'... OK 
 Backing up 'visor/AvGoNtShMQ.pdb'... OK 
 Backing up 'visor/HSPrefs.pdb'... OK 
 Backing up 'visor/AvGoTimeMQ.pdb'... OK 
 Backing up 'visor/QuickenTransactions.pdb'... OK 
 Backing up 'visor/HandyShop2.prc'... OK 
 Backing up 'visor/Auto Log.prc'... OK 
 Backing up 'visor/AvantGo.prc'... OK 
 Backing up 'visor/Diddle.prc'... OK 
 Backing up 'visor/Hearts.prc'... OK 
 Backing up 'visor/MobileLink.prc'... OK 
 Backing up 'visor/PktQuicken.prc'... OK 
 Backing up 'visor/YAtzee.prc'... OK 
 Backing up 'visor/GraffitiDemo.prc'... OK 
 Backing up 'visor/WW Journal.prc'... OK 
 Backing up 'visor/SolFree.prc'... OK 
 Backing up 'visor/MBlnDeviceInfo.pdb'... OK 
 Backing up 'visor/libmal.prc'... OK 
 Backing up 'visor/Graffiti ShortCuts.prc'... OK 
 Backing up 'visor/Unsaved Preferences.prc'... OK 
 Backing up 'visor/AvGoRecent.pdb'... OK 
 Backing up 'visor/Net Prefs.prc'... OK 
 Backing up 'visor/System MIDI Sounds.pdb'... OK 
 Backing up 'visor/Saved Preferences.prc'... OK 
 Backing up 'visor/MBlnProfile.pdb'... OK 
 Backup done. 
Sync

Now there is a copy of every program and database from my Handspring Visor Deluxe stored in the directory ~/visor. From now on, I will probably use the sync option to bring in only my changes.

That operation looks like this:

 mschwarz@mars:~$ pilot-xfer -s visor 
 Waiting for connection on /dev/ttyS0 (press the HotSync button now)... 
 Connected 
 No change, skipping 'AvGoPref'. 
 No change, skipping 'AvGoVersion'. 
 No change, skipping 'QuickenCategories'. 
 No change, skipping 'AvGoChanMQ'. 
 No change, skipping 'Auto Log DB'. 
 No change, skipping 'CityTimeDB'. 
 No change, skipping 'Datebk3HDB'. 
 No change, skipping 'HSAdvCalcDB'. 
 No change, skipping 'AddressDB'. 
 No change, skipping 'DatebookDB'. 
 No change, skipping 'ExpenseDB'. 
 No change, skipping 'LauncherDB'. 
 No change, skipping 'MailDB'. 
 Backing up 'visor/MemoDB.pdb'... OK 
 No change, skipping 'NetworkDB'. 
 Backing up 'visor/WWJournal.pdb'... OK 
 No change, skipping 'SolitaireFreeData'. 
 No change, skipping 'ToDoDB'. 
 No change, skipping 'DiddleDB'. 
 No change, skipping 'AvGoDocsMQ'. 
 No change, skipping 'DiddleIDB'. 
 No change, skipping 'Untitled'. 
 No change, skipping 'AvGoMUrlMQ'. 
 No change, skipping 'QuickenMemorized'. 
 No change, skipping 'Auto Log Notes'. 
 No change, skipping 'AvGoNtShMQ'. 
 No change, skipping 'HSPrefs'. 
 No change, skipping 'AvGoTimeMQ'. 
 No change, skipping 'QuickenTransactions'. 
 No change, skipping 'HandyShop2'. 
 No change, skipping 'Auto Log'. 
 No change, skipping 'AvantGo'. 
 No change, skipping 'Diddle'. 
 No change, skipping 'Hearts'. 
 No change, skipping 'MobileLink'. 
 No change, skipping 'PktQuicken'. 
 No change, skipping 'YAtzee'. 
 No change, skipping 'GraffitiDemo'. 
 No change, skipping 'WW Journal'. 
 No change, skipping 'SolFree'. 
 No change, skipping 'MBlnDeviceInfo'. 
 No change, skipping 'libmal'. 
 No change, skipping 'Graffiti ShortCuts'. 
 Backing up 'visor/Unsaved Preferences.prc'... OK 
 No change, skipping 'AvGoRecent'. 
 No change, skipping 'Net Prefs'. 
 No change, skipping 'System MIDI Sounds'. 
 Backing up 'visor/Saved Preferences.prc'... OK 
 No change, skipping 'MBlnProfile'. 
 Backup done. 

When you have something large and with as much data in it as AvantGo, which is a Web-clipper application, the complete backup can take a long time indeed. The sync, however, usually takes only a few seconds. If you are an AvantGo user , be patient, you can indeed use this service with Linux, but it isn't part of this package. If you can't wait, skip to the later section on malsync.

Restore

If you ever lose the contents of your palm because your batteries die, you are forced to do a hard reset, or if you accidentally leave your palm on top of your car at a gas station like a moron and then some other moron comes along and rolls an SUV over it (My poor Palm V! My poor Palm V!), then be glad you have made this little backup and have been keeping it in sync! You can now restore all your former data with a single command. That looks like this:

 mschwarz@mars:~$ pilot-xfer -r visor 
 Waiting for connection on /dev/ttyS0 (press the HotSync button now)... 
 Connected 
 Restoring visor/libmal.prc... OK 
 Restoring visor/AvantGo.prc... OK 
 Restoring visor/Auto Log.prc... OK 
 Restoring visor/Untitled.pdb... OK 
 Restoring visor/SolitaireFreeData.pdb... OK 
 Restoring visor/SolFree.prc... OK 
 Restoring visor/MobileLink.prc... OK 
 Restoring visor/MBlnProfile.pdb... OK 
 Restoring visor/HSPrefs.pdb... OK 
 Restoring visor/HandyShop2.prc... OK 
 Restoring visor/AvGoDocsMQ.pdb... OK 
 Restoring visor/DiddleIDB.pdb... OK 
 Restoring visor/DiddleDB.pdb... OK 
 Restoring visor/HSAdvCalcDB.pdb... OK 
 Restoring visor/Auto Log DB.pdb... OK 
 Restoring visor/AvGoChanMQ.pdb... OK 
 Restoring visor/QuickenMemorized.pdb... OK 
 Restoring visor/QuickenCategories.pdb... OK 
 Restoring visor/PktQuicken.prc... OK 
 Restoring visor/Hearts.prc... OK 
 Restoring visor/Diddle.prc... OK 
 Restoring visor/WW Journal.prc... OK 
 Restoring visor/YAtzee.prc... OK 
 Restoring visor/GraffitiDemo.prc... OK 
 Restoring visor/Net Prefs.prc... failed. 
 Restoring visor/WWJournal.pdb... OK 
 Restoring visor/Saved Preferences.prc... OK 
 Restoring visor/Graffiti ShortCuts.prc... failed. 
 Restoring visor/AddressDB.pdb... OK 
 Restoring visor/System MIDI Sounds.pdb... OK 
 Restoring visor/LauncherDB.pdb... OK 
 Restoring visor/ToDoDB.pdb... OK 
 Restoring visor/MemoDB.pdb... OK 
 Restoring visor/Unsaved Preferences.prc... OK 
 Restoring visor/NetworkDB.pdb... OK 
 Restoring visor/QuickenTransactions.pdb... OK 
 Restoring visor/DatebookDB.pdb... OK 
 Restoring visor/CityTimeDB.pdb... OK 
 Restoring visor/AvGoPref.pdb... OK 
 Restoring visor/AvGoVersion.pdb... OK 
 Restoring visor/MBlnDeviceInfo.pdb... OK 
 Restoring visor/AvGoTimeMQ.pdb... OK 
 Restoring visor/AvGoMUrlMQ.pdb... OK 
 Restoring visor/AvGoNtShMQ.pdb... OK 
 Restoring visor/AvGoRecent.pdb...  OK  
  Restoring visor/ExpenseDB.pdb... OK  
  Restoring visor/MailDB.pdb...  OK 
 Restoring visor/Datebk3HDB.pdb... OK 
 Restoring visor/Auto Log Notes.pdb... OK 
 Restore done 

Most of the time, that is all you will do with pilot-link. It serves primarily as a backup for your palm. It is capable of a great deal more, however. It has "conduit" programs to allow you to link your calendar and mail applications and so forth. I will go over some of these additional programs briefly . Note that this is not a complete list, nor is it complete documentation. Once again, we aim to get you started in the right direction. Half the fun of using Linux is learning to figure it out for yourself (with a little help from other users and, of course, the source code).

Program

Description

addresses

This program will read your addressbook database and write it to standard output in a fairly useful format.

pilot-addresses

This will export and import your addressbook.

read- todos

This will output the to-do lists in your palm to a text format.

install-todos

The function complementary to the read-todos program. This will take a text file of to-do items and store them in your palm.

pilot-schlep

This will turn your palm into a one-file file system. You can save any disk file (that will fit in your palm's free memory) on your palm and then use this program to extract it again. Very James Bond.

pilot-mail

This will read mail from a POP3 account into your palm's mail application and will send any mail coming from your palm using the sendmail program.

There are many more programs in this package, including ones that allow you to hotsync over a network, ones that will synchronize your datebook with ical or netplan, and ones that will capture your pilot's ROM (for use in some of the palm pilot emulators used to develop palm applications). What we have shown you here should be enough to get you going.

 



Multitool Linux. Practical Uses for Open Source Software
Multitool Linux: Practical Uses for Open Source Software
ISBN: 0201734206
EAN: 2147483647
Year: 2002
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net