[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: question on hotplug/udev



On Mon, Feb 21, 2005 at 06:47:15PM +0100, Bob Alexander wrote:
> The device is recognized ONLY when I press the hotsync button. Normal?

Yes, the device only registers on the USB bus when the hotsync button is
pressed (thus activating the hotsync app on the palm), and deregisters
when the hotsync app finishes.

> udev seems to map the Palm to TWO devices:

Most Palm devices register two serial devices. Generally the second one
is the one that you use for hotsyncing.

First get it working without trying to create special device names:

 1. Type the command "pilot-xfer -l -p /dev/ttyUSB1" (don't press return
    yet)

 2. Press hotsync

 3. Press return on your pilot-xfer command and you should see a list of
    the databases that are on your Palm.

 4. If it doesn't work, try /dev/ttyUSB0 instead.

To make udev create a specially-named device, do the following:

 1. Press hotsync

 2. Run the command "udevinfo -a -p $(udevinfo -q path -n /dev/ttyUSB1)"

    This will display a bunch of stuff. Look for a key that udev will be
    able to use to uniquely identify your Palm and not mistake it for
    some other USB device (including other Palms). I use the serial
    number.

 3. Create a file called /etc/udev/rules.d/00-local.rules with the
    following contents:

    SYSFS{serial}="your-serial-here", KERNEL="ttyUSB*[13579]", SYMLINK="palm"

This tells udev that when a USB device with the specified serial number
and an odd-numbered ttyUSB device shows up, that it should create a
symlink named "palm" to that device.

It's not perfect. For example, if you have other USB serial devices,
then you would probably want to create a symlink to the even-numbered
device, depending on how many serial devices were already on the
bus. But it works for me, because all of my serial USB devices are palms.

-- 
Dave Carrigan
Seattle, WA, USA
dave@rudedog.org | http://www.rudedog.org/ | ICQ:161669680
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL

Attachment: signature.asc
Description: Digital signature


Reply to: