# Palm z22 + JPilot and /dev settings [solved 99%]

## jmp_

Hi all,

I bought one "Palm z22" recently (109 in Barcelona/Catalonia/Spain), I'm trying to set-up "jpilot" without success... the problem is that I'm not sure about where to point the device in /dev

I'm using sys-fs/udev-077-r5 

Kernel 2.6.x with USB support enabled

Hotplug working fine

Gentoo 32-bit i386 (AMD Athlon XP)

app-pda/jpilot-0.99.8_pre9 +gtk2 +nls

I've got more info (but not enough to solve the problem) here:

http://www.e-oss.net/wordpress/?p=60 (SPANISH)

http://www.linuca.org/body.phtml?nIdNoticia=122 (SPANISH)*

*I'm looking for something like /dev/ttyUSBx (since I read about this in the links from above) but this device doesn't exist.

What can I do to search my Palm's device into /dev and configure my 'jpilot' settings ?

'dmesg' info doesn't help but:

```

~ # cat /proc/bus/usb/devices

T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#=  5 Spd=12  MxCh= 0

D:  Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1

P:  Vendor=0830 ProdID=0061 Rev= 1.00

S:  Manufacturer=Palm, Inc.

S:  Product=Palm Handheld

C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=500mA

I:  If#= 0 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)

E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=04(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

E:  Ad=03(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

```

Can someone help me? any advices?

Thanks in advance.Last edited by jmp_ on Wed Dec 21, 2005 3:31 am; edited 1 time in total

----------

## Aries97

I am at a similar point.

The device is connected to the USB bus as shown by lsusb:

```
Bus 003 Device 010: ID 0830:0061 Palm, Inc.
```

However, if we also look at lsusb -v:

```
bInterfaceClass       255 Vendor Specific Class
```

We can see that this device doesn't fall into one of the standard USB Device Class's.  So we need a vendor specific class driver/thingy.  I havent found one yet.

EDIT:

Maybe I am mistaken and a driver thingy isn't needed:

http://groups.google.com/group/alt.os.linux.mandrake/browse_thread/thread/aee766bc34288fe7/b9b909ee42f6fc21%23b9b909ee42f6fc21?sa=X&oi=groupsr&start=0&num=2

It is possible, according to Palm, but they will help only a little:

http://kb.palm.com/SRVS/CGI-BIN/WEBCGI.EXE?New,kb=PalmSupportKB,CASE=obj(6503),ts=Palm_External2001

Every article that claims sucess so far seems to use a serial cradle.  I would much rather use USB, however so far I've only found articles showing how to USB sync with the Handspring Visor, Palm m50x and Sony Clie.  And I have not yet found a serial cradle for the Z22.  So unless we can make it sync with USB we might be out of luck.Last edited by Aries97 on Mon Dec 19, 2005 5:43 pm; edited 2 times in total

----------

## bobspencer123

you can look at this for udev stuff. http://www.daniel-lemire.com/blog/archives/category/open-source/linux/gentoo/

second you need to have usb-serial enabled or module in your kernel and also visor enabled or module in your kernel then it should connect to. /dev/tts/USB1

you need to edit udev for permissions once you get this far if you want to be able to access device as user.

```
pilot-xfer --port /dev/tts/USB1 --list
```

this should spit out some output and let you know if device is set up right.

----------

## Aries97

Thank you for the reply Daniel, however I'm not sure that your adivce will work I will try using udev.   But you have a Palm m500

There is a Kernal module for your device:

```
<M>   USB Handspring Visor / Palm m50x / Sony Clie Driver
```

There isn't one for the Z22,   yet...

----------

## enrique

The kernel module should work for a Z22 also, it works for my Treo 600.

----------

## alexlm78

 *enrique wrote:*   

> The kernel module should work for a Z22 also, it works for my Treo 600.

 

Actually with all PalmOS PDA, it works with a Palm Zire 31 ( a friend's palm) and the mine a Palm Tunsgten T3, even I help another friend with a Palm Tunsgten C, in all works.

----------

## jmp_

Hi all :)

First of all, sorry for my poor english (grammar destructive comments are welcome).

Thanks for your comments... ok, the first thing you have to ensure is that you have the USB Serial converter support enabled in your kernel, after this you have to compile "VISOR","Pocket PC" (and so on) as modules too. For us we should try the "USB Handspring Visor / Palm m50x / Sony Clie Driver"; Since the Palm z22 is a  very newest device it maybe or not included in visor's db of the supported devices, if something is wrong about that you can try this:

```

root# modprobe visor vendor=0x830 product=0x61

```

you can write (when needed) into your /etc/modules.conf the following line to prevent loading the module by hand:

```

options visor vendor=0x830 product=0x61

```

thanks to 'chusquete' for his comments. (spanish)

If you do so you will be able to access to the attached device at /dev/ttyUSBx, that's the reason why I couldn't point to this before, now with the visor module loaded:

 *dmesg wrote:*   

> 
> 
> visor 1-3:1.0: Handspring Visor / Palm OS converter detected
> 
> usb 1-3: Handspring Visor / Palm OS converter now attached to ttyUSB0
> ...

 

 *lsusb wrote:*   

> 
> 
> #lsusb
> 
> Bus 001 Device 017: ID 0830:0061 Palm, Inc.
> ...

 

Seems ok. 

 *lsmod -v wrote:*   

> 
> 
> Bus 001 Device 019: ID 0830:0061 Palm, Inc.
> 
> Device Descriptor:
> ...

 

Then I go to my jpilot's (0.99.8-pre9 gtk2-based) settings to set the serial port to: /dev/ttyUSB0 first (and after /dev/ttyUSB1), now I try to sync the PDA, but it fails reporting the following error WHEN TRYING TO SYNC  "your Palm to the desktop and then do a backup":

```

****************************************

 Syncing on device /dev/ttyUSB1

 Press the HotSync button now

****************************************

dlp_ReadSysInfo error

Exiting with status SYNC_ERROR_PI_CONNECT

Finished
```

but when I tried to "sync your Palm to the desktop (Ctrl + Y)" it worked! but slowly.

I ran jpilot as root to ensure privileges are enough ;-)

```

****************************************

 Syncing on device /dev/ttyUSB1

 Press the HotSync button now

****************************************

Username is "myuser"

User ID is 0x90 

lastSyncPC = 22671

This PC = 1447041974

Doing a slow sync. -------------> you can't do a "turbo sync" plez ??

Syncing DatebookDB

Syncing AddressDB

Syncing ToDoDB

sync_categories: Unable to open file: Memo32DB ----> oops

Syncing MemoDB

Syncing ExpenseDB

Syncing Keys-Gtkr

slow_sync_application: Unable to open file: Keys-Gtkr ----> :( oops

Backup: Fetching 'finger'... OK

Backup: Fetching 'AdditTGRData'... OK

Backup: Fetching 'ADD051SData'... OK

[...] ok

Backup: Fetching 'article_hack-netfilter.pdb'... OK

Backup: Fetching 'javasecurity.pdb'... OK

Backup: Fetching 'DragonfireQuick'... OK

Backup: Fetching 'AwSU-ScratchpadData'... OK

Backup: Fetching 'DxtgTempDB'... OK

Backup: Fetching 'article-virii2.PDB'... OK

Backup: Fetching 'sp1-xp.PDB'... OK

Backup: Fetching 'article_hack-netfilter.PDB'... OK

Backup: Fetching 'javasecurity.PDB'... OK

Backup: Fetching 'AwSU-UserData'... OK

Backup: Fetching 'DevicePatchVFSCacheDB'... Failed, unable to back up database ----> shut up punk!

Backup: Fetching 'PACERsrcDB9'... OK

[...] ok

Backup: Fetching 'DGraphConverter'... OK

Backup: Fetching 'DSLib'... OK

Backup: Fetching 'DSlideLib'... OK

Backup: Fetching 'GraphicsLibrary'... OK

Backup: Fetching 'MathLib'... OK

Backup: Fetching 'ZLib'... OK

[...]

Expiring old archives...

Backup: sync complete 

Plucker: Installing all databases in 

Plucker: Cannot open directory : No such file or directory ----> next step for me: found "plucker" detailed information

**** ERROR: No SyncMAL user config found! ---> no way

Is AvantGo installed and configured on the PDA? -----> I don't think so

synctime: Palm OS version 5.49

synctime: Setting the time on the pilot... Done

Fetching 'AddressDB' (Creator ID 'addr')... OK

Fetching 'DatebookDB' (Creator ID 'date')... OK

Fetching 'ExpenseDB' (Creator ID 'exps')... OK

Fetching 'MemoDB' (Creator ID 'memo')... OK

Fetching 'ToDoDB' (Creator ID 'todo')... OK

Fetching 'Saved Preferences' (Creator ID 'psys')... OK

Finished. ---> good :-)

```

* Let's see if my data is really synchronized...           [YES], that's all.

I tried again the other sync option and I got this (surely because the dev was turned off auto):

```

****************************************

 Syncing on device /dev/ttyUSB1

 Press the HotSync button now

****************************************

pi_bind error: /dev/ttyUSB1 No such file or directory

Check your serial port and settings

Exiting with status SYNC_ERROR_BIND

Finished

```

Is not good but it's ok :P

About warnings and errors: can someone give me some information about  ? what can I do to make them dissappear? anyway it's time to see how to install new apps from Linux into the Palm, etc. 

Well, as you can see sync your Palm z22 with Gentoo Linux is reasonably easy at least :)

Hope this helps, greetings.Last edited by jmp_ on Sun Dec 25, 2005 10:48 am; edited 1 time in total

----------

## bobspencer123

just so I'm not assuming someone else's identity. I'm not daniel just found his sight useful in my search for syncing my palm. I have a palm zire (the old one). I also used this gentoo-wiki which at the end talks about editing for newer devices.

http://gentoo-wiki.com/HOWTO_USB_sync_for_Palm_PDAs_with_Evolution_2.0_and_udev#Adding_support_for_your_Handheld

personally the udev stuff in here was not very helpful for me and actually most of it in my case was uneccessary. The only think I did was (warning this goes under "your not supposed to do that") but I edited the main udev file. and went down the part that deals with usb and has some stuff about tts/tty. I changed the permission globally for ALL devices accessing this (but in reality it wil only be my palm that connects this way). This worked for me and now I can always use my palm as regular user without having to make a symbolic link and change permissions everytime. But once again this is not the right way but it worked for me.

----------

## Aries97

Ok so some people wrote some replys:  enrique and alexlm78 gave me their assurances that the above kernel module will work for my z22, and in fact any Palm OS Device.  

Please  jmp_ don't ever reply to one of my posts ever again.  I got so discourgaged looking at your reply that it took me several days to build up the courage to start working on this again.  (If you want noobs like me to understand your post explaining your intent, and the context of your statements is critical.  Secondly don't paste the entire output of a command unless the entire output is relevant.  Broken english is more helpful to me than another language and is of course forgiven.)  

Finally bobspencer123 gives us a very helpful link. To the Wiki.  (The WIki was down when I origionally posted...)

I promised that I would work with udev, and I found a document that seems to explain it very well:

http://www.reactivated.net/udevrules.php

(or  http://www.reactivated.net/writing_udev_rules.html  i'm not sure what the offical link is.)

Unfortunilty I have to sleep.  I wanted to contribute this udev link because it appears to be very helpful. 

I will edit this tomorrow with what I have found about udev.  Hopefully we can make some general instructions and add or edit a Wiki page..

----------

## jmp_

Ok, sorry for the inconveniencie.

 *Aries97 wrote:*   

> 
> 
> Please jmp_ don't ever reply to one of my posts ever again. I got so discourgaged looking at your reply that it took me several days to build up the courage to start working on this again. [...]
> 
> 

 

The author of this thread is me, and my answers are for everyone with the same problem, not just for noobs (or gurus) like you. But I can understand what you are trying to say, no problem.

The idea is that you should compile "visor's module" and enable USB Serial Converter support in your Kernel.

After this, using UDEV, you will be able to access to new devices such as /dev/ttyUSBx (configure your jpilot's settings to point here).

If the "visor" cannot recognice your device since is a new one (like Palm z22) you can try:

```

root# modprobe visor vendor=0x830 product=0x61 

```

(You know that it's possible to obtain this information from "dmesg/syslog" output or cat /proc/bus/usb/devices)

But this maybe needed or not, and it's highly recommended update udev when possible.

As I said, this solved my problem from above.

greetings.

----------

## Aries97

jmp_ - I'm sorry for being rude.  Thank you for being understanding.  I think that shows real holiday spirit and I appreciate it.  I understand your post now.

I edited /etc/modules.conf as you suggested and now the 'visor' kernel module loads when I tun on the z22!! - Thank you!

(Success shown by lsmod)

(I think) The command 'dmesg' shows that it is connected to the system:

```
usb 3-3.1: Handspring Visor / Palm OS converter now attached to ttyUSB0

usb 3-3.1: Handspring Visor / Palm OS converter now attached to ttyUSB1

```

 Unfortunitly I have not yet gotten the correct udev rule to allow jpilot to connect to it.

EDIT

HA!  Just below the hotsync button there is a drop down menu with two choices:

Cradle/Cable or IR to a PC/Handheld

Guess which one my palm was set to?    Merry Christmas! and/or Happy Holidays!  

I can connect with the Palm using "pilot-xfer --list" from the command line.

I even got jpilot to work correctly, but it was a bit funky (I also had to run it as root); however this is normal from what I've heard and the connection to the computer is working!

This is the content of "10-local.rules" in etc/udev/rules.d although udev seems to be very flexible and many different setups should work:

```
# Palm Handheld

BUS="usb",SYSFS{Product}="Palm Handheld*",NAME="%k",OWNER="root",GROUP="tty",MODE="0660"

#

# Put the desired user in the "usb" group.

BUS="usb",SYSFS{Product}="Palm Handheld*",SYMLINK="pilot", GROUP="usb", MODE="0660"

```

Thanks again this is great success after days of fiddling!

----------

## Aries97

Hmm... I rebooted and the visor kernal module did not load...

And I have no idea yet on how to give user level access to /dev/pilot.

Still working on it!  - But I'm giong to take a break and play some games!

----------

## jmp_

Good.

 *Quote:*   

> 
> 
> Hmm... I rebooted and the visor kernal module did not load... 
> 
> 

 

Either in my case, but when I turn on my Palm z22 the VISOR module is loaded automatically (as shown by lsmod).

 *Quote:*   

> (I think) The command 'dmesg' shows that it is connected to the system 

 

Yeap, that is. You can view where is your new (connected) usb device attached.

```

//  dmesg - print or control the kernel ring buffer

usb 1-3: new full speed USB device using ohci_hcd and address 30

visor 1-3:1.0: Handspring Visor / Palm OS converter detected

usb 1-3: Handspring Visor / Palm OS converter now attached to ttyUSB0

usb 1-3: Handspring Visor / Palm OS converter now attached to ttyUSB1

```

I can access to my pda through /dev/ttyUSB1.

In my case, my pda worked by just compiling visor's lkm and enabling usb serial converter support in my kernel. I didn't edited any file after that.

Are you sure that your system is unable to load your visor's module when you connect your pda via usb? 

I have installed:

```

emerge -pv jpilot

Calculating dependencies ...done!

[ebuild   R   ] app-pda/jpilot-0.99.8_pre9  +gtk2 +nls 0 kB

```

Launch jpilot as root (by now, to ensure you have enough privileges). You'll see a screen with some buttons at your left, one of those is a "hotsync's icon" (ctrl+y) but before continue you have to set up your jpilot preferences, go to "File->Preferences -> Options" (ctrl+e  shortcut), and point where is your device attached to.

After this you should be able to sync your device (if connected and visor's module is present of course) but FIRST press your Palm z22 hotsync button and then the jpilot's hotsync button. If not, you will get an error message.

 *Quote:*   

> 
> 
> dlp_ReadSysInfo error
> 
> Saliendo con estado SYNC_ERROR_PI_CONNECT
> ...

 

If something goes wrong:

Try using "/etc/modules.autoload.d/kernel-2.6".

Load the module by hand to test if your palm and jpilot works, and sync your pda data.

Continue with udev configs if you think this may help.

Consider to upgrade udev if possible.

greetings.

----------

## paerez

 *Aries97 wrote:*   

> 
> 
> I even got jpilot to work correctly, but it was a bit funky (I also had to run it as root); however this is normal from what I've heard and the connection to the computer is working!
> 
> 

 

For those of you who want to run jpilot (or in my case KPilot) as a regular user, here is my /etc/udev/rules.d/10-local.rules:

```

BUS="usb", SYSFS{idProduct}=="0061", SYSFS{idVendor}=="0830", KERNEL="ttyUSB1", GROUP="usb", NAME="pilot", MODE="0660"

```

I had to force it on ttyUSB1. Also, the user must be in the "usb" group. You could make a pilot group or something if you wanted.

NOTE for some reason KPilot says "Unable to read system information" if I run kpilot first. I have to plug in my z22, hit the sync button, and while it tries to find the comp, I run kpilot.

----------

