Palm Zire 31 support under Linux 2.4.21

You can! I struggled a good deal to get my brand new Palm Zire 31 to sync with Linux and Kpilot, something that it is supposed to do, and does, but not neccesarily right away. Some of the tips and tricks I found on the net didn't work as smoothly as they "should". Here is what I did.

Credits: This page is a modified version of a page made by Yannick Copin, Palm Zire support under Linux 2.4.10, including his stylesheet. I am most grateful for the help that Copin's page has been to me! With the new model of Palm Zire, Palm Zire 31, and with limited skills in hacking, I learned a few tricks that Copin did not write in his page. I add those lessons here, to help new Zire 31 users to get their very nice, new PDA to hotsync with Linux. In the spirit of Free Software, I slightly rewrite Copin's page, and republish. But the main parts og this page is the work of Copin.

My one Linux box is a Red Hat Enterprise, with a 2.4.21-EL-kernel. My other is a SUSE 9.0, with about the same kernel. The problem is the same on both. The following solution is only tested on the Red Hat machine.

Palm Zire is supported from kernel 2.4.20, but Palm has expanded the "Palm Zire" model into three different models, Zire 21, Zire 31 and Zire 71. These models are still supported by the driver of kernel 2.4.20 and newer (even if I don't really know about Zire 21). The problem is that when you plug these PDAs into your USB port, they identify themselves with a number that the kernel does not recognize. In /var/log/messages you may get this message:

hub.c: new USB device 00:1f.2-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x830/0x61) is not claimed by any active driver.

Assuming you have a 2.4.20 or newer, this message does not mean that you have no support. It means that you have a driver for your Zire 31, but that this driver (or the kernel) does not recognize the ID-number of your device. You solve this problem by writing that number into the source code of your driver. You recompile the driver, and install it. Here is what I did, as a wannabe geek, rather than a kernel hacker. Hopefully it might work for you as well!

The easiest way! For the kernel to recognize your Zire 31, this is the easy way to do it. Quoted from

With kernels later than 2.4.21, you can insert this module with some parameters for your vendor and product id, without recompiling it, using the following syntax:

# /sbin/insmod visor vendor=0x830 product=0x0061

But then, I did not get this "hack" to work, even if I have a kernel that should support it. (But I know that this may work, so it is definetly worth trying!)

Not succeding the easy way above, I followed Copin's page and directly hacked the original driver sources visor.c and visor.h. So, here are Copin's steps. I have kept Copin's origianl "recipe", now with the ID-number of Zire 31, and with some added a comments, where I had problems:

  1. Install (if needed) the Kernel sources. visor.c and visor.h You will find them about here: /usr/src/linux/drivers/usb/serial/.
  2. Edit (as root) these files to add support for the Zire 31:
  3. Compile and install this single module (as root). Copin, following David A. Desrosiers, suggests that the following commands may be an easy way to compile your new module, as is also suggested by my host instiution, Univeristy of Oslo. (But they are risky! Read on before acting!)
    cd into /usr/src/linux and type:
    make modules SUBDIRS=drivers/usb/serial
    make modules_install SUBDIRS=drivers/usb/serial
    Be cautious about the previous tips! "Make modules" recompile, as I understend it, all serial modules for your kernel. If you have installed your kernel using RPMs (or if it is installed by your distribution), then you first have to make a kernel .config-file. This is not trivial (and it is time-consuming) if you aren't a very skilled hacker. You have to know your hardware quite well. If you make a bad .config-file, you run the risk of corrupting some other serial modules in your kernel.
    Copin, and I following him (after first burnig myself on the above metod), compiled the single visor module. Do this: cd into /usr/src/linux/drivers/usb/serial and type, on one line:
    gcc -D__KERNEL__
           -I/usr/src/linux-2.4.10.SuSE/include -Wall -Wstrict-prototypes
           -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing
           -fno-common -pipe -mpreferred-stack-boundary=2 -march=i586
           -DMODULE -c -o visor.o visor.c
    (This is Copin's original command. I got an error message concerning "-Wstrict-prototypes", and just skipped it. It worked without.) Then replace the initial module visor.o (most probably somewhere like here: /lib/modules/2.4.21/drivers/usb/serial/) by the brand new module.
  4. Load the usbserial and the visor modules (in that precise order):
    bash-2.05b# insmod usbserial
    bash-2.05b# insmod visor
  5. If needed, check the permissions on the USB device, probably /dev/ttyUSB1.

You should be all set: you can now hotplug your Zire 31. I sync it with KPilot. That works wonderfully! The only trick I did not manage to read right out of the Kpilot-litterature, was the presice order of the Hotsync sequence. Here is what I had to do (which is a bit contrary to how Kpilot is supposed to be working):

1: Plug in your device.
2: Make sure no Kpilot is running, including the kpilotDaemon.
3: Hit the hotsync-button on your Zire.
4: Immediatly after that: Start Kpilot.
5: Syncing starts.

By the way, the Palm Zire 31 looks like is a cheap and nice little machine!

For the latest developments regarding these matters (driver model updates and prod/vendor ID strings), have a look at the Device matrix and Visor structures of the WIKI (thanks to David A. Desrosiers, maintainer of pilot-link). Finally, thanks to Yannick Copin, for the web page that this page is based upon.

Comments welcome!/Kommentarer velkomne!
Find my Email address here.

This page was last modified on Mon 25. October, 2004