03/09/2002: For some or other reason, this page has become quite popular
- so I am having to host it somewhere so my adsl line is not killed;-)
13/10/2002: After having gone over to the Dark Side ( I sold my Clie and
bought a Toshiba e740 <blush>), I have come back to the palm platform.
I have also decided to revise my HOWTO and add a few bits here and there
since I am actually using it to set up my T675...
Hi, here is my quick howto on using the sony clie under linux.



Please contact me at milmber@hotmail.com ( my "other" address ) and I will get
back to you.
Ok, first off, here is what I know you can do with your clie under linux:
- sync your clie with gnome-pilot,jpilot, etc ( basically the linux
equivalent of palm desktop) with the USB cradle.
- access your memory stick as a drive ( you mount it like any other
drive )
- copy mp3/movies to your memory stick to listen to/watch..
- sync your clie with windows inside vmware through a serial cable/cradle.
I will only deal with the following topics in my howto:
Coldsync syncing under linux
Mounting a memory stick as a drive
under linux
Syncing your clie via vmware
For gnome-pilot and evolution syncing ( yes this is supposed to be possible)
, please visit the gnome-pilot
homepage. I will try to get a howto for that and gnome-pilot up, once
I find some more time and the inclination to do so.
For syncing with jpilot, all I can say is that a friend at work managed to
get his clie to work. You must however, make sure that pilot-link is working,
as well as making sure that you have the correct pilot-link libraries. For
more information, see the jpilot homepage.
SYNCHING WITH COLDSYNC:
Ok. now for the technical bit. The easiest way to sync your clie with linux
is using coldsync. There are is some
documentation on the site on how to sync your clie, but I will run through
it.
1. Modules:
First of, you need to make sure you have the following kernel
modules:
usbserial.o
visor.o
Check for them in '/lib/modules/2.x.x/kernel/drivers/usb/' ( where 2.x.x
refers to your kernel version)
If you are using Redhat or another "lazy" version of linux, you will have
hotplugging set up already (which will load these modules for you. ) I use
Debian. So we will assume we have to do everything from scratch ( and learn
a thing or two ;-) )
We need check if the modules are loaded. As root, type 'lsmod', you should
see something like the following:
FordPrefect:/home/milmber# lsmod
Module Size Used by
vmnet 17920 8
vmmon 18176 5
eeprom 3056 0
w83781d 17072 0
i2c-amd756 3056 0 (unused)
visor 10208 1
usbserial 17024 0 [visor]
NVdriver 945088 10 (autoclean)
3c59x 24992 1
As I said, if you are using RedHat or some other distribution, hang on. These
distributions use a hotplugging feature to load these modules on demand.
Just make sure they are in '/lib/modules/2.x.x/kernel/drivers/usb/'
2. Permissions and devices:
Next we need to check if you have the proper dev nodes. Check
for them under either '/dev/ttyUSBx' or '/dev/usb/ttyUSBxx'.
Check for them in /dev/ and, if they are not there create them ( as root
) with the following: ( This step should be skipped if you have Redhat 7.1
or Suse Debian 8.0 and upwards..)
'mknod /dev/ttyUSB0 c 188 0'
'mknod /dev/ttyUSB1 c 188 1'
Check the permissions on your '/dev/ttyUSBx' files and make sure that your
defualt user can read them ( otherwise you have to be root every time you
want to hotsync..). Mine are set as follows:
crw-rw-rw- 1 root dip 188, 0 Mar 24 23:47 /dev/ttyUSB0
crw-rw-rw- 1 root dip 188, 1 Mar 24 23:48 /dev/ttyUSB1
As you can see all users can write to these ports ( which is not really
wise from a security point of view ). You "should" only allow user root and
group dip to write to these ports. ( You can check whether your user is part
of group dip by typing 'groups '. If it is not, add it with 'groupmod')
3. Is the Clie detected by linux?
Next, tail your log by typing 'tail -f /var/log/messages'
( you need to be root...) and put your clie in the usb hotsync cradle and
press the hotsync button. You should see something like the following:
Mar 27 22:37:22 FordPrefect kernel: hub.c: USB new device connect
on bus1/1, assigned device number 23
Mar 27 22:37:22 FordPrefect kernel: Manufacturer: Sony Corp.
Mar 27 22:37:22 FordPrefect kernel: Product: Palm Handheld
Mar 27 22:37:22 FordPrefect kernel: usbserial.c: Sony Clié
4.0 converter detected
Mar 27 22:37:22 FordPrefect kernel: visor.c: Sony Clié 4.0:
Number of ports: 2
Mar 27 22:37:22 FordPrefect kernel: visor.c: Sony Clié 4.0:
port 1, is for Generic use and is bound to ttyUSB0
Mar 27 22:37:22 FordPrefect kernel: visor.c: Sony Clié 4.0:
port 2, is for HotSync use and is bound to ttyUSB1
Mar 27 22:37:22 FordPrefect kernel: usbserial.c: Sony Clié
4.0 converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
Mar 27 22:37:22 FordPrefect kernel: usbserial.c: Sony Clié
4.0 converter now attached to ttyUSB1 (or usb/tts/1 for devfs)
4. Coldsync
Next we need to download a copy of coldsync. Make sure
you have a copy of the latest version and then install.( Following the instructions
for installation on the coldsync.org webpage or the INSTALL file inside the
tar gzip source file). I use version 2.2.5 right now.
Create the following file in your home directory and call it '.coldsyncrc':
listen serial {
protocol: net;
device: /dev/ttyUSB0;
--> or /dev/usb/ttyUSB0; depending
on your distribution
}
Note that '/dev/ttyUSB0' points to the usb port you have plugged your clie
in to. Next, type 'coldsync -mI'.
you should see something as follows:
pda {
snum: "your palm serial number";
username: "your username will be printed here";
userid: your userid;
}
Append these lines to the '.coldsyncrc' file you created. Mine looks like
this:
listen serial {
protocol: net;
device: /dev/ttyUSB0;
}
pda "Sony Clie" {
directory: /home/milmber/.palm;
snum: "your palm serial number";
username: "your username will be printed here";
userid: your userid;
}
Note the line that says 'directory: /home/milmber/.palm' - let this point
to your home directory, and create the '.palm' directory. Create further
more 'install' and 'backup' directories under the '.palm' directory.
And, now your Clie "should" sync! Note that you have to first press the hotsync
button on your clie's cradle and then run 'coldsync'.
Type 'coldsync' and after a while you will see that all of the data on your
clie has been backed up to '.palm/backup'. To install files, simply put them
in '.palm/install' and sync.
Coldsync FAQ:
- When I try to run coldsync the program segfaults:
This might happen because of a few reasons. Have you
created the .palm directory in your home directory? Is it writeable by the
user running coldsync? Delete the snum: and userid: lines from the .coldsync
file and try again....
- When I try to run coldsync I get the message "warning:
no device on /dev/ttyUSB0; sleeping":
This means that coldsync has not seen your Clie at all. Are
you pointing it to the right device? Perhaps you are running a newer distribution
of linux with devfs and you need to point it to /dev/usb/ttyUSB0? Or you
might not have the neccessary permission to access the device. Lastly, are
you sure you are pressing the hotsync button on the cradle before you run
coldsync? If all else fails, change the protocol setting in the .coldsyncrc file to simple instead of net.
5. Mounting the Memory Stick:
Check in '/lib/modules/2.x.x/kernel/drivers/usb/' and check that you have
the 'usb-storage.o' module and load it. Also, make sure you have generic
scsi support compiled into your kernel ( or as a module 'sg.o' ) as
well as scsi disk support ( 'sd_mod.o').
Load these modules after recompiling your kernel and rebooting ( of course
;-) ). For those of you with newer distributions, a 'modprobe usb-storage',
'modprobe sg' and 'modprobe sd_mod' should suffice....
Now, put your clie in its cradle and choose the 'MS Import' utility on it.

and click Connect...

When you click on it, it will make a connection to your computer. Once
again, tail your log by typing 'tail -f /var/log/messages' ( you need to
be root...). You should see something like the following:
Oct 13 15:30:37 localhost last message repeated 3 times
Oct 13 15:30:37 localhost kernel: hub.c: port 1, portstatus 103, change 0,
12 Mb/s
Oct 13 15:30:37 localhost kernel: hub.c: USB new device connect on bus1/1,
assigned device number 13
Oct 13 15:30:37 localhost kernel: usb.c: kmalloc IF c6511cc0, numif 1
Oct 13 15:30:37 localhost kernel: usb.c: new device strings: Mfr=1, Product=2,
SerialNumber=0
Oct 13 15:30:37 localhost kernel: usb.c: USB device number 13 default language
ID 0x409
Oct 13 15:30:37 localhost kernel: Manufacturer: Sony
Oct 13 15:30:37 localhost kernel: Product: Sony PEG Mass Storage
Oct 13 15:30:37 localhost kernel: usb-storage: act_altsettting is 0
Oct 13 15:30:37 localhost kernel: usb-storage: id_index calculated to be:
55
Oct 13 15:30:37 localhost kernel: usb-storage: Array length appears to be:
64
Oct 13 15:30:37 localhost kernel: usb-storage: USB Mass Storage device detected
Oct 13 15:30:37 localhost kernel: usb-storage: Endpoints: In: 0xc33afda8
Out: 0xc33afd94 Int: 0xc33afd80 (Period 1)
Oct 13 15:30:37 localhost kernel: usbdevfs: USBDEVFS_CONTROL failed dev 13
rqt 128 rq 6 len 4 ret -6
Oct 13 15:30:37 localhost kernel: usb-storage: Found existing GUID 054c00990000000000000000
Oct 13 15:30:37 localhost kernel: usb-storage: Allocating IRQ for CBI transport
Oct 13 15:30:37 localhost kernel: usb-storage: usb_submit_urb() returns 0
Oct 13 15:30:37 localhost kernel: WARNING: USB Mass Storage data integrity
not assured
Oct 13 15:30:37 localhost kernel: USB Mass Storage device found at 13
Oct 13 15:30:37 localhost kernel: usb.c: usb-storage driver claimed interface
c6511cc0
Oct 13 15:30:37 localhost kernel: usb.c: kusbd: /sbin/hotplug add 13
Oct 13 15:30:37 localhost kernel: usb.c: kusbd policy returned 0xfffffffe
Oct 13 15:30:37 localhost kernel: hub.c: port 2, portstatus 103, change 0,
12 Mb/s
Oct 13 15:30:55 localhost modprobe: modprobe: Can't locate module char-major-6
Now type 'mount -t vfat /dev/sda1/ /mnt/' and viola!, your should see the
contents of your memory stick. If it does not work, try /dev/sda2, etc..Note
once more that you have to be root to do this..( I will add some examples
from the logs on my machine here once I have rebooted ( I am preserving my
uptime...)... )
If for some or other reason mounting the memory stick does not work apply
the following patch to your kernel: ( must be at least kernel version 2.4.3
or greater...)
--- linux/drivers/usb/storage/transport.c.orig Tue Dec 4 16:55:13
2001
+++ linux/drivers/usb/storage/transport.c Tue Dec 4 16:58:10
2001
@@ -817,10 +817,7 @@
}
/* was this a command-completion interrupt? */
- if (us->irqbuf[0] && (us->subclass != US_SC_UFI))
{
- US_DEBUGP("-- not a command-completion IRQ\n");
- return;
- }
+ us->irqbuf[0] = 0;
/* was this a wanted interrupt? */
if (!atomic_read(us->ip_wanted)) {
or just replace the lines in 'linux/drivers/usb/storage/transport.c':
/* was this a command-completion interrupt? */
if (us->irqbuf[0] && (us->subclass != US_SC_UFI)) {
US_DEBUGP("-- not a command-completion IRQ\n");
return;
}
with:
us->irqbuf[0] = 0;
( Thanks to the post by "LinuxStefan van der Eijk" for how to do this.. )
Recompile your modules and reboot...try to reload them and mount the memory
stick. All should work fine now ;-)
6. Syncing with Vmware:
Syncing with vmware using your usb cradle
and clie does not work. Or, at least I have not ever heard of anyone getting
it working and I sure as hell has never gotten it working. ( I virtually
"lived" in the vmware newsgroups up until now trying to solve this...).
Quick Update! While I am writing this I have checked vmware website and seen
that a new
release (3.2) is avaliable. This should hopefully fix the USB issue..
You can, however, sync to windows inside vmware with a serial cradle/cable.
First, you will need some extra hardware:
- A serial sync cable avaliable from either Brando ( They delivered from Hong
Kong to me in the UK within 3 days...), or Expansys.
- A serial cradle, aka Sony part no PEGA-SC500. This cradle is only
avaliable in the US. They don't sell it in Europe and I will be damned if
I know why....You can get it from the sonystyle website or from compusa...
Once you have your hardware, check that you have the following settings:

Also check that your settings inside windows are fine too...


Note that windows has to support USB, so WinNT and Win95 won't work...
Also note that serial syncing is slower than USB and you should not try to
copy mp3 to your clie this way..
I suggest you do that by mounting you memory stick and copying your mp3's
to '/Palm/Programs/msaudio/' on the memory stick.
Once you are set, check the permissions on '/dev/ttySx' and make sure that
you can read and write to them:
crw-rw-rw- 1 root root 4, 64 Mar 27 08:44 /dev/ttyS0
crw-rw-rw- 1 root root 4, 65 Jan 2 2000 /dev/ttyS1
crw-rw-rw- 1 root root 4, 66 Jan 2 2000 /dev/ttyS2
crw-rw-rw- 1 root root 4, 67 Jan 2 2000 /dev/ttyS3
Note the same security warning as in the usb section above...
And, once you run the hotsync app inside your clie, your should see your
clie syncing!

If you have any comments, or tips that I did not think of please email me...and
if you manage to USB sync your clie with Windows in Vmware let me know!!
( I will add a howto here...)
milmber
milmber'at'hotmail.com