Using a Sony Clie with Linux
I have a Sony Clie 610C. Nice PDA. Here's how I am able to use it with Mandrake Linux 8.2 and Ximian Evolution.
Basic Connectivity
Your first challenge is going to be getting the USB cradle to work. There are a ton of good documents on this subject, so just go search Google for "linux clie". Seriously. Here's a high level of what you'll find:
- The kernel must support your device. Open a terminal and type tail -f /var/log/messages. Plug in the cradle, put the PDA in the cradle and hit the sync button. If you don't see this sort of stuff, you have a kernel problem, and there is no sense continuing until you have figured it out and fixed it:
Jul 31 12:41:15 felix kernel: hub.c: USB new device connect on bus1/2, assigned
device number 6
Jul 31 12:41:15 felix kernel: usbserial.c: Sony Clié 4.0 converter detected
Jul 31 12:41:15 felix kernel: visor.c: Sony Clié 4.0: Number of ports: 2
Jul 31 12:41:15 felix kernel: visor.c: Sony Clié 4.0: port 1, is for Generic use
and is bound to ttyUSB0
Jul 31 12:41:15 felix kernel: visor.c: Sony Clié 4.0: port 2, is for HotSync use
and is bound to ttyUSB1
- You need a user-space program to do useful things with the device. There are two options which will work: pilot-link and coldsync. Pilot-link comes with Mandrake (and most other distributions) and is also included with Ximian Desktop. NONE OF THESE DISTRIBUTED VERSIONS AS OF JULY 2002 WILL WORK WITH A USB CLIE; you need 0.11.*. You must go get the latest from www.pilot-link.org. It's dirt simple to install, but you do have to make a choice:
- Avoid the distribution's version of pilot-link? You can specify that your pilot-link installs into /usr/local/ or /opt/ or ~/bin/, then be careful to always specify the full path to your version instead of using the older one. Then when Ximian or Mandrake or whoever is ready to approve 0.11 and distribute it, you can just upgrade the package and delete your installation. This is The Right Thing(TM) to do.
- Overwrite the distribution's version? You can also just install your pilot-link over the binaries that came with the OS. Ugly, but effective. As long as you don't try to verify the pilot-link RPM, you'll be fine. Let me be clear that the only reason to do this rather foolhardy thing is that you are too lazy to muck with $PATH.
- Remove the distribution's version and replace it with yours? This will wreck the dependencies database and I don't recommend it.
- Install a development package provided by your distribution (e.g. Cooker)? In many cases it works, and in many others it doesn't. Distribution vendors will not suggest, approve, or support your doing this, ref this thread. Like the man said, you have been warned that this is The Wrong Thing(TM) to do.
Alternatively, if you do not mind doing everything from the command line you can just go get coldsync, it works and doesn't have dependency relationships with anything else. Whatever you choose, you have an issue -- there's nothing for the application to bind to until you press the sync button, so you must be careful to first press the button, then start the command-line utility. Otherwise, it will not work. You will also need to modify permissions on the port in /dev so that you have read/write capabilities.
- Fancy-pants GUI applications are nice to have.
- The easiest one to use is J-Pilot -- great program. However, some older versions didn't work with pilot-link 0.11, and the not-working is that subtle kind that leads to corrupt and non-synchronized data. Your safest course of action is to get the latest and compile from source, as distribution vendors tend to stay well behind the bleeding edge for desktop applications (which seems kind of odd since so many of them love shipping the latest beta of gcc...
- gnome-pilot is a GNOME daemon with some nifty conduits. Much like the rest of GNOME, it's not terribly stable, but if you get it configured and then leave it alone it will work okay most of the time. It's also kind of nice to have it be a daemon, because it will listen for the USB port to become active and will start synchronization a few seconds after you hit the button. Using the GNOME desktop is not necessary to use this daemon -- I use it so that Evolution can synchronize, and I start it from XFce by putting "I" Exec gpilotd into ~/.xfce/xfwmrc. To configure it run gnomecc. Couple of issues: in the GNOME Control Center (gnomecc), it's best to enable the conduits one at a time and click okay between each. You may also crash the conduit-chooser if you try to enable the old-style ones like MemoFile and GCard. Finally, there's a known issue with the time-sync conduit that will crash PalmOS 3.3 (the one used by Palm V units). That shouldn't be an issue for Clie users, but if you sync multiple devices to the same computer like I do, you may need to know.
- Then there's kpilot for you KDE users. Looked into it briefly when I had a Palm V and ran screaming when I discovered that it didn't synchronize the Address and Calendar databases with KDE's programs. I don't know anything about making it work with a Clie.
- Plucker is a must-have. It's a little confusing to set up though, so here's a few tips:
- The binary distribution isn't as binary as it looks - you still need to do a ./configure && make && make install.
- The parser isn't where you think it is. ln -s /usr/lib/python2.2/site-packages/PyPlucker/Spider.py ~/bin/plucker-parser in my case, you may need to do similar. I already had the Plucker .prc on my Clie, so I didn't have to deal with it; search for it and install it with pilot-xfer -i [path/to/file]. Then just run plucker-setup in your home directory, edit ~/.plucker/home.html, and you're done.
- There's no gnome-pilot conduit for synchronizing Plucker. This is easily solved with cron. crontab -e and give it this:
30 6 * * * bin/plucker-parser -f PluckerDB
45 6 * * * gpilot-install-file --later .plucker/PluckerDB.pdb
Problems and Troubleshooting:I have had two problems with this set up... first, sometimes after downloading pictures off of my USB camera, synchronization quits working. This is what I see in my logs:
Aug 1 21:24:28 felix kernel: usb.c: USB device not accepting new address=3 (error=-110)
The important part is the error -110. As far as I can gather, the USB subsystem has gotten confused. Here's what you need to do:
- As root or with sudo, you might want to lsmod|grep usb and make sure you know what all those
pieces do...
- Now modprobe -r visor, and maybe the rest of the USB modules too (unless if you have a USB mouse or keyboard, in which case you may just have to
reboot in order to put things to right). You may need to manually unload usbserial and usbstorage. I
have been unable to unload usbcore because you have to unmount /proc/bus/usb/ first and for whatever reason it
wouldn't do so (maybe a zombie gpilotd??) ...anyway, I'm told this module doesn't need to be unloaded to reset the USB
controllers.
- Put back the modules you removed with modprobe visor. If it gripes, try putting them back one by one. Make sure that you do not load visor before *hci: you might be able to force the issue by putting pre-install visor /sbin/modprobe [uhci|ohci] into /etc/modules.conf.
- Now tail -f /var/log/messages and try to sync your pilot. It should work; if it doesn't, first kill gpilotd and try using pilot-xfer or coldsync. If it still doesn't work, you'll probably need to reboot.
...and second, I had gpilotd from gnome-pilot-0.1.64 occasionally running away with all the memory and crashing the computer. I fixed this by upgrading to 0.1.65 (don't forget to apply the patch).