|
No Excuses--Sync Your Visor/Palm to Linux
Setting Up the Hardware"I need to change the batteries in my Visor again," my wife said. "OK, now if I swap the old AAA's fast enough, I won't lose any data," I muttered to myself for the 47th time. "Perhaps I ought to back up the Visor's data this time," I silently continued. Then, the familiar realization hit me again. I've been using Linux totally at home for quite a while and the last time the PDA was backed up was when I still had access to a Windows box. Has it been that long? Bad sysadmin! Double bad sysadmin for not backing up the wife's data! Time to figure how to save myself a lot of grief and get that Visor data over to the old dependable SuSE Linux laptop. Here's how I did it. The first order of business was to make sure the USB and hotplugging features were working when the Linux machine was booted. I plugged in my HP scanner for a test. I used the lsmod command to see if the USB hardware was recognized by the kernel. I simply typed: lsmod I was looking for entries such as usbcore, usb-uhci, scanner, etc. Basically any module that was USB related. No luck! As it turned out, SuSE Linux 7.3 Pro had a major USB problem on my no-name 300 Mhz PII laptop when I made the initial installation. YaST2 went through all the installation menus, tried to reboot the new system, and promptly stopped running when it tried to load the USB and hotplugging modules. I chased my tail for quite a while before I was able to boot up with the rescue disk, then temporarily mount the /dev/hda1 partition and edit the /etc/rc.config.d/hotplug.rc.config file. I changed the hotplug_start_USB parameter from "yes" to "no" and then my laptop booted just fine. The USB and hotplugging didn't work, but that was OK, I would fix that later. It's kind of hard to get any work done if your machine won't boot after you load the OS. After the machine booted, it was time to figure out how to get USB and hotplugging to work first time, every time. I went the modprobe route with the usb-core, usb-uhci, scanner, usb-storage, etc. for a while. Loading kernel modules is OK once in a while, but if you are going to use external USB hardware on a regular basis, recognizing the devices auto magically is the only way to go. The whole problem of hotplugging turned out to be the ohci/uhci USB controller hardware war. SuSE 7.3 apparently assumed my USB controller used the ohci module. My laptop USB controller needed the uhci module. There was a file called /etc/hotplug/blacklist that prevented modules from loading. I commented the usb-uhci entry out and saved the blacklist file. Next, I changed the hotplug_start_USB parameter back to "yes" in /etc/rc.config.d/hotplug.rc.config and rebooted. The Linux bootup screen flew through the USB and hotplugging steps without a hitch. I was finally greeted with the familiar login request. I logged in as a normal user and plugged in my HP scanner to test the USB connection. The drive light flickered for a moment and I knew I was on the right track. I took a look with lsmod again and was happy to see usbcore, usb-uhci and scanner proclaimed as loaded modules. Xsane was fired up and sure enough, I could scan with the HP scanner. It looked like the USB hardware was working properly.
Making The USB Connection and Using The Visor CradleThe Visor USB connection was slightly more complicated. The visor and usbserial modules didn't show up in lsmod until I did a sync. Don't worry, we'll get to that in a minute. Before I could do a sync, I needed a Visor application on the Laptop. I like JPilot because it's simple, easy to use and requires a minimum of fuss to get working. You should know that JPilot is really what could be called a personal application. The 0.99 version I was using, from the SuSE 7.3 CDs didn't have any import/export capabilities. You may want to use another package if you need that feature. None of the Visor/Linux applications like JPilot, at least that I've seen, handle importing and exporting to other applications or databases very well. My purpose was well served however by being able to back up the Visor data and look at it with a nice simple gui on my Linux laptop.
By far the easiest way to get JPilot on your machine is to load it from the distribution CDs. JPilot is also available on the web at http://www.jpilot.org. It is typically a tarball file that can be extracted in the usual way and then installed using the tried-and-true You might also have to download and install pilot-link. Take a look at the JPilot Web site under "requirements" to find out about pilot-link.
Using JPilotOnce JPilot was loaded it was time to see if the Visor could be synced to the Linux laptop. These were the steps: The Visor was positioned in it's cradle and the USB cable was plugged in. Next, I started JPilot in an xterm window. I like to flip between using the KDE and FVWM2 window managers, so it's real easy just to start JPilot with an xterm. Soon the JPilot screen came up showing the calendar and various function buttons. I turned on the Visor and pushed the sync button on the cradle. Next, I pushed the sync function button on the left side of the screen on JPilot. It seemed to work best in that order. I had tried using sync just from the JPilot screen, but it gave an error. Much to my relief, the window at the bottom of JPilot showed that the address book, calendar, memos, etc. were syncing. Success! And I'm now pre-emptively out of the doghouse. You'll want to take a look at the "preferences" tab under the "file" tab. If data is entered, such as an appointment in JPilot, the "sync datebook" button on the "conduits" tab should be pushed. I couldn't figure out why my test appointment wasn't being transferred on a sync, until that button was pushed. The same goes for the "sync address," "sync todo," and "sync memo." Once the right buttons are set, dates, address, todos, and memos go back and forth without a problem. The last area I looked at was installation of Visor/Palm programs from the Linux laptop. I wanted to add some of those cool Visor/Palm freeware and shareware programs to the PDA from my Linux box. How hard could it be? Right? Let me tell you, if it got any easier, I wouldn't have had to do anything, the new application would have just magically appeared on the Visor, seemingly out of the ether.
I just picked out a Visor/Palm application, from a freeware source on the web and downloaded it to my ~/.jpilot directory (on my Linux laptop). I used
Wrapping UpOnce you get the USB hardware working properly, getting your Visor to talk to your Linux laptop is probably one of the easiest jobs I've ever done with Linux. The main focus should be on getting the USB connections straightened away and the buttons set correctly on JPilot. There are also other Visor/Palm tools available, such as KPilot, pilot-link, coldsync and pose (Palm OS emulator for Linux), if you want other options. Oh, yes...now that I have my wife's Visor data is on my Linux laptop's disk, perhaps I should fire up the external USB ZipCD drive and do a backup to CD. But that's another article. Rob Reilly is a technology consultant who writes and speaks about Linux, business integration, innovation and automotive design. He has 16 years experience in the technology, manufacturing and the utilities industries. He is always 'on-the-lookout' for stories and projects that focus on Linux, business and the cutting edge. Send him a note or visit his web site at http://home.cfl.rr.com/rreilly.
|