Linux
From SynCE-Wiki
[edit]
Linux Hotplug Script
2005-06-14 Yaron Tausky provides A better way to handle iPAQ auto-connection.
- With the above udev script and later versions of udev you might want to use DRIVER=="ipaq" ( two equal signs ) if udev gives errors in /var/log/messages
2005-05-19 Ed Catmur suggests some improvements to the hotplug script below.
2004-10-19 If you have the devfs daemon (for example on Gentoo), you can follow Stanislaw Pusep's tips for using "devfsd" instead of "hotplug".
Instructions originally provided by Fredrik Nilsson.
- First make sure that your connection works with manual operation using synce-serial-start.
- Make sure that Linux Hotplug is installed on your system. (For RedHat Linux, this is an RPM called hotplug.)
- Create the directory /var/run/usb if it doesn't already exist.
- If you are using a Linux Hotplug release prior to the August 8, 2002 release, add a line like below to your /etc/hotplug/usb.usermap file. (This applies to for example RedHat 9 and earlier.)
- If you are using Linux Hotplug released August 8, 2002 or later, create the file /etc/hotplug/synce.usermap with the contents below. (Thanks to Andrew Radke and Mark "Delirium" for this info.)
-
synce 0x0003 0xVVVV 0xPPPP 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
- Replace VVVV with the USB vendor ID for your device and PPPP with the USB product ID for your device. IDs for common devices:
Device Vendor ID Product ID
Casio EM500 07cf 2002
Compaq iPAQ 049f 0003
Dell Axim X5 413c 4001
HP Jornada 548 03f0 1016
HP Jornada 568 03f0 1116
For devices missing in the list above, find the Vendor and Product IDs for your device.
- Create the file /etc/hotplug/usb/synce with the following contents (download) and make it executable by root:
#!/bin/bash
export time=`date +"%b %d %X"`
export uname=`uname -n`
echo "$time $uname $0: iPAQ added" >> /var/log/synce
synce-serial-abort >> /dev/null
synce-serial-start >> /var/log/synce
:> $REMOVER
echo "export time=\`date +\"%b %d %X\"\`" >> $REMOVER
echo "export uname=\`uname -n\`" >> $REMOVER
echo "echo \"\$time \$uname $0: iPAQ removed\" >> /var/log/synce" >> $REMOVER
echo "sleep 15 >> /var/log/synce" >> $REMOVER
echo "synce-serial-abort >> /var/log/synce" >> $REMOVER
chmod +x $REMOVER
- When you have the hotplug script installed you should not run synce-serial-start yourself.
