# palm TX and ttyUSB problem

## thecooptoo

if i hit the hotsync button on the palm connector this appears in dmesg

```
May 16 20:30:50 skippy usb 2-2.2: USB disconnect, address 16

May 16 20:30:50 skippy visor ttyUSB0: Handspring Visor / Palm OS converter now disconnected from ttyUSB0

May 16 20:30:50 skippy visor ttyUSB1: Handspring Visor / Palm OS converter now disconnected from ttyUSB1

May 16 20:30:50 skippy visor 2-2.2:1.0: device disconnected

May 16 20:30:51 skippy usb 2-2.2: new full speed USB device using uhci_hcd and address 17

May 16 20:30:51 skippy usb 2-2.2: configuration #1 chosen from 1 choice

May 16 20:30:51 skippy visor 2-2.2:1.0: Handspring Visor / Palm OS converter detected

May 16 20:30:51 skippy usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB0

May 16 20:30:51 skippy usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB1

```

i then start pilot-xfer 

```
skippy rules.d # pilot-xfer -p /dev/ttyUSB1   -b /tmp/palm

   Listening for incoming connection on /dev/ttyUSB1...        
```

 and  nothing appears in  dmesg 

When i then press the hotsync button 

it appears are ttyUSB2 &3 

```
May 16 20:30:50 skippy usb 2-2.2: USB disconnect, address 16

May 16 20:30:50 skippy visor ttyUSB0: Handspring Visor / Palm OS converter now disconnected from ttyUSB0

May 16 20:30:50 skippy visor ttyUSB1: Handspring Visor / Palm OS converter now disconnected from ttyUSB1

May 16 20:30:50 skippy visor 2-2.2:1.0: device disconnected

May 16 20:30:51 skippy usb 2-2.2: new full speed USB device using uhci_hcd and address 17

May 16 20:30:51 skippy usb 2-2.2: configuration #1 chosen from 1 choice

May 16 20:30:51 skippy visor 2-2.2:1.0: Handspring Visor / Palm OS converter detected

May 16 20:30:51 skippy usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB0

May 16 20:30:51 skippy usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB1

May 16 20:33:02 skippy usb 2-2.2: USB disconnect, address 17

May 16 20:33:02 skippy visor 2-2.2:1.0: device disconnected

May 16 20:33:03 skippy usb 2-2.2: new full speed USB device using uhci_hcd and address 18

May 16 20:33:03 skippy usb 2-2.2: configuration #1 chosen from 1 choice

May 16 20:33:03 skippy visor 2-2.2:1.0: Handspring Visor / Palm OS converter detected

May 16 20:33:03 skippy usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB2

May 16 20:33:03 skippy usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB3

```

ive tried adding the udev rule from http://gentoo-wiki.com/HOWTO_USB_sync_for_Palm_PDAs_with_Evolution_2.0_and_udev which hasnt changed anything 

```
skippy rules.d # cat /etc/udev/rules.d/10-udev.rules

KERNEL="ttyUSB[13579]", NAME="pilot", GROUP="usb", MODE="0660" SYMLINK="pilot"

skippy rules.d #     
```

so how do I get it to connect to the correct ttyUSB connection ?

----------

## PaulBredbury

You've missed out a comma before SYMLINK, making the whole line invalid and ignored, probably.

Anyway, see Palm setup thread.

----------

## mumcut

hi...

the problem is, that you don't compare something in your rules file...

if there is only one '=', then udev will set something, and not look after something.

anyway, the solution would be probably something like that:

```

# cat /etc/udev/rules.d/10-udev.rules

KERNEL=="ttyUSB[13579]", SYSFS{serial}=="PN1234567890", NAME="pilot", GROUP="usb", MODE="0660"

```

look after your serialcode at the back, and replace PN1234...

=> you can also do this, to find out what your serial is:

```
udevinfo -p /sys/class/tty/ttyUSB1 -a
```

cheers,

mumcut

----------

## thecooptoo

my config 

```

skippy paul # cat /etc/udev/rules.d/10-udev.rules

KERNEL=="ttyUSB[13579]", SYSFS{serial}=="PN70M1Y8V18D", NAME="pilot", GROUP="usb", MODE="0660"

```

after rebooting  I do this 

```

skippy paul # udevinfo -p /sys/class/tty/ttyUSB1 -a

no valid sysfs device found

```

but this still happens 

```

skippy paul # pilot-xfer -p /dev/ttyUSB0 -l

   Unable to bind to port: /dev/ttyUSB0

   Please use --help for more information

skippy paul # pilot-xfer -p /dev/ttyUSB1 -l

   Unable to bind to port: /dev/ttyUSB1

   Please use --help for more information

```

pressing the hotsync, this appears

```
usb 2-2.2: new full speed USB device using uhci_hcd and address 7

usb 2-2.2: configuration #1 chosen from 1 choice

visor 2-2.2:1.0: Handspring Visor / Palm OS converter detected

usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB0

usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB1

skippy paul #  

skippy paul # udevinfo -p /sys/class/tty/ttyUSB1 -a

Udevinfo starts with the device specified by the devpath and then

walks up the chain of parent devices. It prints for every device

found, all possible attributes in the udev rules key format.

A rule to match, can be composed by the attributes of the device

and the attributes from one single parent device.

  looking at device '/class/tty/ttyUSB1':

    KERNEL=="ttyUSB1"

    SUBSYSTEM=="tty"

    DRIVER==""

    ATTR{dev}=="188:1"

  looking at parent device '/devices/pci0000:00/0000:00:10.0/usb2/2-2/2-2.2/2-2.2:1

.0/ttyUSB1':

    KERNELS=="ttyUSB1"

    SUBSYSTEMS=="usb-serial"

    DRIVERS=="visor"

    ATTRS{port_number}=="1"

  looking at parent device '/devices/pci0000:00/0000:00:10.0/usb2/2-2/2-2.2/2-2.2:1

.0':

    KERNELS=="2-2.2:1.0"

    SUBSYSTEMS=="usb"

    DRIVERS=="visor"

    ATTRS{bInterfaceNumber}=="00"

    ATTRS{bAlternateSetting}==" 0"

    ATTRS{bNumEndpoints}=="04"

    ATTRS{bInterfaceClass}=="ff"

    ATTRS{bInterfaceSubClass}=="00"

    ATTRS{bInterfaceProtocol}=="00"

    ATTRS{modalias}=="usb:v0830p0061d0100dc00dsc00dp00icFFisc00ip00"

  looking at parent device '/devices/pci0000:00/0000:00:10.0/usb2/2-2/2-2.2':

    KERNELS=="2-2.2"

    SUBSYSTEMS=="usb"

    DRIVERS=="usb"

    ATTRS{dev}=="189:135"

    ATTRS{configuration}==""

    ATTRS{bNumInterfaces}==" 1"

    ATTRS{bConfigurationValue}=="1"

    ATTRS{bmAttributes}=="c0"

    ATTRS{bMaxPower}=="100mA"

    ATTRS{urbnum}=="11"

    ATTRS{idVendor}=="0830"

    ATTRS{idProduct}=="0061"

    ATTRS{bcdDevice}=="0100"

    ATTRS{bDeviceClass}=="00"

    ATTRS{bDeviceSubClass}=="00"

    ATTRS{bDeviceProtocol}=="00"

    ATTRS{bNumConfigurations}=="1"

    ATTRS{bMaxPacketSize0}=="16"

    ATTRS{speed}=="12"

    ATTRS{busnum}=="2"

    ATTRS{devnum}=="8"

    ATTRS{version}==" 1.00"

    ATTRS{maxchild}=="0"

    ATTRS{quirks}=="0x0"

    ATTRS{authorized}=="1"

    ATTRS{manufacturer}=="Palm, Inc."

    ATTRS{product}=="Palm Handheld"

    ATTRS{serial}=="PN70M1Y8V18D"

<more snipped that I dont think is relevant> 

                                                  
```

when i plug the palm USB connection in the palm switchew itself on and this appears

```
crw-rw---- 1 root uucp 188, 0 May 22 10:36 /dev/ttyUSB0

skippy paul #             
```

when i switch the plam off (manually) , it is still present 

it only disappers when i unplug the usb/palm cable 

with the palm unplugged i still get this 

```

skippy paul # pilot-xfer -p /dev/ttyUSB1 -l

   Unable to bind to port: /dev/ttyUSB1

   Please use --help for more information

skippy paul #                       
```

----------

## mumcut

did you try to pilot-xfer as root? I have the problem, that I can't use my palm device as user (the GROUP flag in udev-rules doesn't work)...

first:

try this rules:

```

skippy paul # cat /etc/udev/rules.d/10-udev.rules

KERNEL=="ttyUSB[13579]", ATTRS{serial}=="PN70M1Y8V18D", NAME="pilot", GROUP="usb", MODE="0660" 
```

then try as root:

```

mumcut@supertux ~ $ su

Passwort: 

supertux mumcut # pilot-xfer --port /dev/pilot --list

   Listening for incoming connection on /dev/pilot... 

```

I have added the flag OWNER="mumcut" for me, because that GROUP= flag doesn't work somehow. So I can use my pilot as user... But I have to find another solution...

Let me know...

Cheers

mumcut

----------

## PaulBredbury

 *mumcut wrote:*   

> the GROUP flag in udev-rules doesn't work

 

Look at your udev rule filename - 10 vs my 91. The rules are processed in order. From "man udev":

 *Quote:*   

>        NAME
> 
>            The name of the node to be created, or the name the network
> 
>            interface should be renamed to. Only one rule can set the node
> ...

 

What that is trying to say is, a rule named e.g. 40-blahblah.rules is changing the GROUP after your 10-blahblah.rules file  :Wink: 

Udev works this way, because it's designed to confuse the hell out of us, presumably  :Twisted Evil: 

----------

## mumcut

Hey PaulBredbury...

That was the trick... /dev/pilot belongs now to root, and the group is as desired "usb"...

And I can use my palm normally...

Thanks a lot...

mumcut

----------

## thecooptoo

when i unplug the usb connection from my switched off palm Its like this 

```
skippy paul # pilot-xfer -p /dev/pilot -l

   Unable to bind to port: /dev/pilot

   Please use --help for more information

skippy paul # ls -la /dev/pilot

ls: cannot access /dev/pilot: No such file or directory

skippy paul #                                    
```

i plug the usb cable in , the palm comes to life and in dmesg and /dev 

```
[May 22 19:08:32 skippy usb 2-2.2: new full speed USB device using uhci_hcd and address 27

May 22 19:08:32 skippy usb 2-2.2: configuration #1 chosen from 1 choice

May 22 19:08:32 skippy visor 2-2.2:1.0: Handspring Visor / Palm OS converter detected

May 22 19:08:32 skippy usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB0

May 22 19:08:32 skippy usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB1

kippy paul # ls -la /dev/pilot

crw-rw---- 1 paul uucp 188, 1 May 22 19:08 /dev/pilot

skippy paul #    

                                       
```

then 

```
skippy paul # pilot-xfer -p /dev/pilot -l

   Listening for incoming connection on /dev/pilot...    
```

and it sits there 

so /dev/pilot is created by the palm when its plugged in, but it doesnt know  that /tty/USB1 should be symlinked.

so thats the problem. 

```
skippy paul # cat /etc/udev/rules.d/10-udev.rules

KERNEL=="ttyUSB[13579]", SYSFS{serial}=="PN70M1Y8V18D", NAME="pilot", GROUP="usb", OWNER="paul", MODE="0660"

skippy paul #        
```

----------

## mumcut

Hi

It hasn't to be symlinked. Udev does create the device.

Do these steps:

1. Plug in your palm

2. Press the HotSync - Button

3. as root: # pilot-xfer --port /dev/pilot --list

=> Sometimes it doesn't work if you first enter the command, and press the button afterwards.

Advice: rename your 10-udev.rules file to 99-palm.rules or something. That way, you'll get the permissions set correctly.

cheers,

mumcut

----------

## thecooptoo

1. Plug in your palm

```
dmesg 

usb 2-2.2: new full speed USB device using uhci_hcd and address 6

usb 2-2.2: configuration #1 chosen from 1 choice

usbcore: registered new interface driver usbserial

drivers/usb/serial/usb-serial.c: USB Serial support registered for generic

usbcore: registered new interface driver usbserial_generic

drivers/usb/serial/usb-serial.c: USB Serial Driver core

drivers/usb/serial/usb-serial.c: USB Serial support registered for Handspring Visor / Palm OS

drivers/usb/serial/usb-serial.c: USB Serial support registered for Sony Clie 3.5

drivers/usb/serial/usb-serial.c: USB Serial support registered for Sony Clie 5.0

visor 2-2.2:1.0: Handspring Visor / Palm OS converter detected

usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB0

usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB1

usbcore: registered new interface driver visor

drivers/usb/serial/visor.c: USB HandSpring Visor / Palm OS driver

paul@skippy ~ $

```

2. Press the HotSync - Button

```
usb 2-2.2: USB disconnect, address 6

visor ttyUSB0: Handspring Visor / Palm OS converter now disconnected from ttyUSB0

visor ttyUSB1: Handspring Visor / Palm OS converter now disconnected from ttyUSB1

visor 2-2.2:1.0: device disconnected

usb 2-2.2: new full speed USB device using uhci_hcd and address 7

usb 2-2.2: device not accepting address 7, error -71

usb 2-2.2: new full speed USB device using uhci_hcd and address 9

usb 2-2.2: configuration #1 chosen from 1 choice

visor 2-2.2:1.0: Handspring Visor / Palm OS converter detected

usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB0

usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB1

paul@skippy ~ $                                                           
```

3. as root: # pilot-xfer --port /dev/pilot --list 

```
paul@skippy ~ $ su

Password:

skippy paul # pilot-xfer -p /dev/pilot -l

   Listening for incoming connection on /dev/pilot...    
```

and it waits 

if i cancel the connection from the palm and then press the synch button ( ie the daemon is running)

```
May 23 20:24:52 skippy usb 2-2.2: USB disconnect, address 9

May 23 20:24:52 skippy visor 2-2.2:1.0: device disconnected

May 23 20:24:53 skippy usb 2-2.2: new full speed USB device using uhci_hcd and address 10

May 23 20:24:53 skippy usb 2-2.2: configuration #1 chosen from 1 choice

May 23 20:24:53 skippy visor 2-2.2:1.0: Handspring Visor / Palm OS converter detected

May 23 20:24:53 skippy usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB2

May 23 20:24:53 skippy usb 2-2.2: Handspring Visor / Palm OS converter now attached to ttyUSB3

                                                                                                                  
```

----------

## mumcut

I'm sorry but I have no moving ideas, but..

Some questions:

1. Is your "USB Serials Generic Driver" compiled in to the kernel or is it set as a module?

2. Same question for the visor part...

3. Did you pilot-xfer immediately after you have pressed the button?

Cheers,

mumcut

----------

## thecooptoo

genkernel , so they will be modules 

```
skippy paul # lsmod |grep visor

visor                  16268  1

usbserial              26088  3 visor

usbcore                93676  13 visor,usbserial,gspca,usblp,acecad,hci_usb,sl811_hcd,usbhid,ohci_hcd,uhci_hcd,usb_storage,ehci_hcd

skippy paul # ls -la /dev/pilot

crw-rw---- 1 paul uucp 188, 3 May 24 17:03 /dev/pilot

skippy paul # 
```

pressed it immediately after and before -  in fact Ive tried all combinations

PS and autodetection in kpilot doenst work - kpilot aurodetection just stays at o% until it crashes with this backtrace  *Quote:*   

> (no debugging symbols found)
> 
> Using host libthread_db library "/lib/libthread_db.so.1".
> 
> (no debugging symbols found)
> ...

 

----------

## monsm

Sorry for barging into this thread like this.

After lots of problems I have finally managed to sync my Palm Tungsten with Gnome.  Only problem is when I do a backup, it runs it 3-4 times.

Check this:

```
gentux rune # ps aux |grep pilot

rune      9632  0.0  1.1  35220 18384 ?        S    19:25   0:00 gpilotd-control-applet

rune      9643  0.0  1.1  35220 18384 ?        S    19:25   0:00 gpilotd-control-applet

rune      9645  0.0  1.1  35220 18384 ?        S    19:25   0:00 gpilotd-control-applet

rune      9648  0.3  1.2  36564 19584 ?        R    19:25

0:00 /usr/libexec/gpilotd --oaf-activate-iid=OAFIID:GNOME_Pilot_Daemon

--oaf-ior-fd=29

rune      9653  0.0  1.1  35220 18388 ?        S    19:25   0:00 gpilotd-control-applet

root      9663  0.0  0.0   2012   632 pts/1    R+   19:28   0:00 grep --colour=auto pilot
```

At least the list 3 gets started automatically when I press the hotsync button.  Anyone seen this?  What's going on here?

My udev rule, that finally did the trick is:

```
BUS=="usb", SYSFS{product}=="Palm Handheld ", NAME="%k", SYMLINK="pilot", GROUP="users", OWNER="mons", MODE="0666"

```

Also I am having to connect on /dev/ttyUSB0....

----------

## PaulBredbury

 *monsm wrote:*   

> Also I am having to connect on /dev/ttyUSB0....

 

Well, Palm exposes TWO devices - they can't both be symlinked to /dev/pilot, obviously. Look at the TWO udev rules I use.

Also, the devices exposed by the Palm differ between Palm models - in name, and possibly in order.

----------

