# Palm Pilot or Sony Clie USB sync w/ udev HOWTO

## taxilian

Just wanted to pass this along to anyone else who might be having the same problem I was.  I wanted my palm pilot to work regardless of what other serial devices were plugged in, since I also have a usb/serial converted serial port and a usb/serial gps.

Unfortunately, whereas most palm pilots seem to use ttyUSB1 to sync with (they all seem to create ttyUSB0 and ttyUSB1 for some reason), mine uses ttyUSB0.  If this were consistant, of course, there wouldn't be a problem, but if I have other serial/usb devices plugged in, it's ttyUSB1/ttyUSB2, or something else.

There is nothing unique reported by the kernel between the two, so you just have to know which you use.  That made it impossible to hardlink it to /dev/pilot with udev, however.

I fixed this by creating the following rule in my /etc/udev/rules.d/10-local.rules file:

```
SYSFS{product}="Palm Handheld", KERNEL="ttyUSB*", NAME="tts/USB%n", SYMLINK="pilot%e"
```

This gives me two symlinks anytime I hit hotsync on my palm (Sony Clie TH-55, actually):  /dev/pilot and /dev/pilot1

those two links go to the two devices created by the palm.  After that, I simply tell KPilot to use /dev/pilot1 and it always works, as long as I don't have more than one palm pilot plugged in and hotsyncing. =]

I'm told most palm devices use the second device... if it doesn't work for you to do /dev/pilot, just try /dev/pilot1

whichever works, it should be consistant. 

Good luck!  Feel free to ask for clarification if I wasn't very clear.  I'm not very good at writing HOWTO thingies

----------

## gentsquash

Thanks for your HOWTO; very useful to those of us who may

someday get a second serial/usb device

As to why two devices are allocated (second paragraph in your

post), it is possible that one device is the *cradle* and the

other is the handheld which is plugged-in to the cradle.  Indeed,

the signal from the cradle's hotsync button, may come in on a

different /dev device than the does the graphical hotsync

"button" on the handheld's screen.  

  Can some cognoscento clarify this?

----------

## taxilian

You know, I thought about that, but what I'm using as a "cradle" is a simple usb cable that plugs into the clie.. no aparent room for a serial-to-usb converter, so I can only assume that the converter is inside the clie... particularly since the clie can be used as a usb storage device as well. I know that palm m515s have a similar cable, with no adapter built into them.

Also, generally a serial adapter would show up in the sysfs as a different device type than the device it's connecting to.  Then again, I could be completely out in left field. :-/

Ironically enough, my hard drive had a head crash yesterday not long after I wrote this howto, so it's helping me as much as anyone else, 'cause I lost my fules file. =]

luckily the drive is under warantee, and I have a spare slightly smaller drive to use until I get the RMA

----------

## furbmeister

Thanks taxilian, this is what I was looking for  :Wink: 

----------

## cybermac912

Thanks for the tips. Filled in some holes from other HOW-TO's. Just wanted to post another tip on something that caught me (a udev newbie) up...

If you just can't seem to connect, the permissions on the device may not be setup correctly. I had to add the following line to /etc/udev/permissions.d/10-udev.permissions:

```
tts/USB*:root:usb:0666
```

----------

## furbmeister

 *cybermac912 wrote:*   

> Thanks for the tips. Filled in some holes from other HOW-TO's. Just wanted to post another tip on something that caught me (a udev newbie) up...
> 
> If you just can't seem to connect, the permissions on the device may not be setup correctly. I had to add the following line to /etc/udev/permissions.d/10-udev.permissions:
> 
> ```
> ...

 

Why not add the user to usb group?  :Wink: 

----------

## SuperJudge

 *furbmeister wrote:*   

>  *cybermac912 wrote:*   Thanks for the tips. Filled in some holes from other HOW-TO's. Just wanted to post another tip on something that caught me (a udev newbie) up...
> 
> If you just can't seem to connect, the permissions on the device may not be setup correctly. I had to add the following line to /etc/udev/permissions.d/10-udev.permissions:
> 
> ```
> ...

 Yeah, I did that, too, just in case I needed it.

----------

## cybermac912

 *furbmeister wrote:*   

>  *cybermac912 wrote:*   Thanks for the tips. Filled in some holes from other HOW-TO's. Just wanted to post another tip on something that caught me (a udev newbie) up...
> 
> If you just can't seem to connect, the permissions on the device may not be setup correctly. I had to add the following line to /etc/udev/permissions.d/10-udev.permissions:
> 
> ```
> ...

 

Uh, yeah, I knew that.  :Embarassed:  In the future, I'll try to be sleeping by midnight instead of dinking around with hardware.

----------

## SuperJudge

 *cybermac912 wrote:*   

>  *furbmeister wrote:*    *cybermac912 wrote:*   Thanks for the tips. Filled in some holes from other HOW-TO's. Just wanted to post another tip on something that caught me (a udev newbie) up...
> 
> If you just can't seem to connect, the permissions on the device may not be setup correctly. I had to add the following line to /etc/udev/permissions.d/10-udev.permissions:
> 
> ```
> ...

 Better to have tried and failed than to not have tried at all.  :Very Happy: 

----------

## stobbsm

Found this had the answer I needed to make it work without always changing the hotsink port

thanks

----------

## Aitikin

My god.  THANK YOU.  I've been trying to get this thing working for a while now.  If I didn't get it fixed soon I was afraid I'd have to become  dependant on *shudders* Microsoft again.

BTW, I'm a bit of a n00b so would you mind explaining what that did?

----------

## vuud

I am really losing it over this.

I've installed UDEV... I got the visor module working.  (I think).  Everytime I hit hotsync it gives me a new set of /dev/tts/USB... files.  So its never the same.  The transfer works, I managed to get it with pilot-xfer, so the comm is okay.

I don't understand though - how I get it so it gets the same USB# each time, and also, the symlinks dont get created above.

I don't have a /etc/udev/permissions.d directory...

I am pretty much lost at this point - any help would be appreciated.

EDIT:

I now have a pilot dev link, but it does nothing.

----------

## assaf

 *vuud wrote:*   

> I am really losing it over this.
> 
> I've installed UDEV... I got the visor module working.  (I think).  Everytime I hit hotsync it gives me a new set of /dev/tts/USB... files.  So its never the same.  The transfer works, I managed to get it with pilot-xfer, so the comm is okay.
> 
> I don't understand though - how I get it so it gets the same USB# each time, and also, the symlinks dont get created above.
> ...

 

I think you should run pilot-xfer with the new device, like:

```
pilot-xfer -p /dev/pilot ...
```

for the permission stuff just set the pilot device to be in the usb group (by adding ,GROUP="usb",MODE="0660" to the udev rule) and make sure you're part of that group. The permissions.d way is deprecated.

----------

## vuud

 *assaf wrote:*   

>  *vuud wrote:*   I am really losing it over this.
> 
> I've installed UDEV... I got the visor module working.  (I think).  Everytime I hit hotsync it gives me a new set of /dev/tts/USB... files.  So its never the same.  The transfer works, I managed to get it with pilot-xfer, so the comm is okay.
> 
> I don't understand though - how I get it so it gets the same USB# each time, and also, the symlinks dont get created above.
> ...

 

I found some help through this thread... which is basically what you are saying, but I was so confused I think I was becoming counter productive.

https://forums.gentoo.org/viewtopic-p-2585358.html

In the end, the solution was my udev rule was off somehow...

Thanks much

----------

