Sync your Pocket PC with Linux

2135

Author: Pat Lampert

You can use a Pocket PC with Linux, but the integration of a device such as Hewlett-Packard’s iPaq with Linux software such as Evolution requires add-on software. If you wish to use a Windows CE device with Linux you will need to install SynCE, a set of open source tools. You can download the software from SourceForge.net.

This article is adapted from the newly published book Deploying Linux on the Desktop.

After you install and configure the program, you can use SynCE by first establishing a connection (a.k.a. syncing) with your Windows CE device, then using the tools provided to copy files to and from the device and perform other operations.

For this article, I used a Compaq 3700 series iPaq Pocket PC. As you will find on the SynCE Web site, there are special steps you may need to take depending on the device you are using. In my case it was quite straightforward.

Installation and configuration

The software you need for a simple connection with your Windows CE device consists of a single package: synce-0.9.1. You can download a tar archive of the most current version or an RPM of a slightly older version. SynCE also offers optional kits for synchronizing your address book and other options.

Once SynCE is installed you need to configure it. The instructions vary depending on the type of Windows CE device you are using, the version of Linux, and what type of port you are using. Follow the guidelines on the project’s site.

Because I was using an iPaq with a USB connector I had to follow some special instructions. First I used modprobe to enable the iPaq USB serial module:

$ /sbin/modprobe ipaq

Next, I had to configure SynCE to use the proper USB port. I was connecting to USB port 0, so I used the command:

# synce-serial-config ttyUSB0

Finally, I started up the daemon that detects connections:

# synce-serial-start
synce-serial-start is now waiting for your device to connect

User setup

Once you’ve configured the hardware devices to communicate with each other, you need to set up any user that will be syncing with your device to run the dccm command. You can add the command to the user’s .login file if you want to. You should then be able to start a manual sync using the Windows CE ActiveSync icon on your Pocket PC.

If you have difficulties with a USB connection, a SourceForge SynCE Web page is very helpful. Also examine or tail the file /var/log/messages for errors from the synce-serial-start and dccm commands.

SynCE tools

After you have successfully established a sync connection between your Windows CE device and your Linux desktop, you can use a variety of command line tools to perform various operations with your device:

  • pstatus allows you to obtain status on your connection and information about the device you have connected.
  • pls allows you to obtain a listing of the files on your device.
  • pmkdir creates a directory (or folder) on your device.
  • pcp copies files to and from the device.
  • prun runs a program on the device from your Linux machine.
  • synce-install-cab installs a .cab file on the device.

After you have completed your work, remove the device from its cradle or connector and the sync will disconnect.