| Connecting your PalmOS® handheld device to the Internet via PPP | ||
|---|---|---|
| Prev | Chapter 3. Connecting with Linux | Next |
Now that you have successfully configured your Palm handheld and Linux kernel for communicating across USB, serial, and/or IrDA interfaces, we need to verify that it all works. There are several diagnostics you can use to verify that this is all working properly.
As described in the previous section, simply run the statserial application against your serial port, and see that it responds properly. If it does, you're all set.
USB configuration can be a bit more complicated than serial, but it is not impossible to get working. To verify that USB is properly configured on your machine, ensure the following:
You should be running a kernel of 2.4.20 or higher. Previous kernels were known to "crash" the visor kernel module under certain circumstances and with specific kinds of hardware. 2.4.20 has not suffered any of these problems to date.
Your kernel is properly configured as described earlier with USB support and the proper usbserial and visor modules available to it.
A copy of the current pilot-link or ColdSync package compiled with USB support, to use for testing the USB Palm handheld device.
Now you should be able to see the modules load and properly bind to your hardware, using the following (or similar) syntax:
broccoli:~# modprobe usbserial
This should produce the following, in the system logs (likely in /var/log/messages ):
broccoli kernel: usb.c: registered new driver serial broccoli kernel: usbserial.c: USB Serial support registered for Generic broccoli kernel: usbserial.c: USB Serial Driver core v1.4
Now you can proceed to load the necessary visor module in the same fashion. If you would like these autoloaded at boot time, simply add the usbserial and visor lines to /etc/modules and they will be loaded at boot time.
broccoli kernel: usbserial.c: USB Serial support registered for Handspring Visor / Palm 4.0 / Clié 4.x broccoli kernel: usbserial.c: USB Serial support registered for Sony Clié 3.5 broccoli kernel: visor.c: USB HandSpring Visor, Palm m50x, Sony Clié driver v1.6
Don't be alarmed if your version does not show these exact strings. As long as you see the usbserial and visor driver load successfully, without reporting any errors or unresolved symbols, the system is ready for the next steps.
Verify that these modules successfully loaded as follows:
broccoli:~# /sbin/lsmod
This should report something similar to the following:
Module Size Used by Tainted: PF keyspan 32812 0 (unused) usb-ohci 20008 0 (unused) visor 10024 0 (unused) usbserial 19228 0 [keyspan visor] uhci 28336 0 (unused)
The important thing to note here is that the visor driver has a 0 in the Used by column. If you have anything other than 0 here, your visor module has crashed inside the kernel, and the only way to free this resource is to reboot or upgrade to kernel 2.4.20 or later.
Simply cradling your Palm handheld and hitting the HotSync button after you have properly configured your kernel for USB and Visor support, should show the following in the system logs (likely /var/log/messages):
broccoli kernel: hub.c: new USB device 00:1d.1-2, assigned address 13 broccoli kernel: Manufacturer: Palm, Inc. broccoli kernel: Product: Palm Handheld broccoli kernel: SerialNumber: R0JH14R11771 broccoli kernel: usbserial.c: Handspring Visor / Palm 4.0 / Clié 4.x converter detected broccoli kernel: visor.c: Handspring Visor / Palm 4.0 / Clié 4.x: Number of ports: 2 broccoli kernel: visor.c: Handspring Visor / Palm 4.0 / Clié 4.x: port 1, is for Generic use and is bound to ttyUSB0 broccoli kernel: visor.c: Handspring Visor / Palm 4.0 / Clié 4.x: port 2, is for HotSync use and is bound to ttyUSB1 broccoli kernel: usbserial.c: Handspring Visor / Palm 4.0 / Clié 4.x converter now attached to ttyUSB0 (or usb/tts/0 for devfs) broccoli kernel: usbserial.c: Handspring Visor / Palm 4.0 / Clié 4.x converter now attached to ttyUSB1 (or usb/tts/1 for devfs)
Also, you should see the device registered on the USB subsystem, assuming you have usbdevfs mounted as described earlier in this HOWTO. If you have, cradling your Palm and hitting HotSync should produce the following (among other similar values) in /proc/bus/usb/devices:
T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 14 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs= 1 P: Vendor=0830 ProdID=0002 Rev= 1.00 S: Manufacturer=Palm, Inc. S: Product=Palm Handheld S: SerialNumber=R0JH14R11771 C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA I: If#= 0 Alt= 0 #EPs= 4 Cls=ff(vend.) Sub=00 Prot=00 Driver=serial E: Ad=81(I) Atr=02(Bulk) MxPS= 16 Ivl=0ms
A disconnect (i.e. end of sync or simply unplugging the cradle and Visor from the USB port) should show the following messages in /var/log/messages:
broccoli kernel: usb.c: USB disconnect on device 00:1d.1-2 address 13 broccoli kernel: usbserial.c: Handspring Visor / Palm 4.0 / Clié 4.x converter now disconnected from ttyUSB0 broccoli kernel: usbserial.c: Handspring Visor / Palm 4.0 / Clié 4.x converter now disconnected from ttyUSB1
Next we must verify that the actual USB devices are created and registered in /dev for you to point your Palm handheld to for connections.
In your kernel source directory, under the kernel source directory Documentation/usb/usb-serial.txt , is an overview of how to create the proper USB devices on your system.
For Palm devices, you will need no more than two of these devices, /dev/ttyUSB0 and /dev/ttyUSB1, depending on your Palm device manufacturer (as of the time of this HOWTO, two Sony models use /dev/ttyUSB0, and the rest of the Sony and Palm models use /dev/ttyUSB1)
broccoli:~# mknod /dev/ttyUSB0 c 188 0 broccoli:~# mknod /dev/ttyUSB1 c 188 1
If you are using devfs , these devices will be created for you as /dev/usb/tts/0 and /dev/usb/tts/1 respectively.
Also, make sure the permissions permit reading and writing to these devices. Permissions of 0666 or greater should allow this for most users, and is not dangerous in most cases.
The last step in testing these devices is to make sure that they function with pilot-link or ColdSync . To test this, you can run either of the following commands ( not as root):
From pilot-link , you can run the dlpsh command. This is a "Desktop Link Protocol" (DLP) Shell. Make sure that your version of dlpsh is at least 0.11.7. If your dlpsh is from 0.9.5 or earlier, it will not work with USB Palm handheld devices.
Also note that you may have more than one version of pilot-link installed on your system. Many distributions put the stock pilot-link that they supply in /usr, and if you've compiled your own without specifying an installation prefix (with the --prefix=/some/other/place argument at configure time), you may have another copy in /usr/local. Always make sure you are using the latest version on your system.
broccoli:~$ dlpsh -p /dev/ttyUSB1 Listening to port: /dev/ttyUSB1 Please press the HotSync button now... Connected Welcome to the DLP Shell Type 'help' for additional information dlpsh>
If you get a connection, you're all set. From here, you can type ' help ' and get help on additional commands available from within dlpsh. One useful command is user . Executing this will display the current user information as stored on your Palm handheld. Type ' quit ' to exit dlpsh and return back to the shell.
Here is ColdSync running a similar command:
broccoli:~$ coldsync -mI -d dlp:2 -d net:2 -d sync:2 Opening device [/dev/ttyUSB1] Please press the HotSync button. dlp_dlpc_req: sending request 0x12, trycount: 0 Got response, id 0x92, args 2, status 0 Serial number is "R0JH14R11771-O" dlp_dlpc_req: sending request 0x10, trycount: 0 Got response, id 0x90, args 1, status 0 dlp_dlpc_req: sending request 0x11, trycount: 0 Got response, id 0x91, args 0, status 0 dlp_dlpc_req: sending request 0x2f, trycount: 0 Got response, id 0xaf, args 0, status 0
If this connects, and gives you the trademark "tweedle-dee" noise, you're ready to move onto the next step.
Verifying the Infrared configuration is almost as easy as testing serial. You'll need to have the irda-utils package installed. If you've started up the irmanager daemon using the script described earlier, you can test the connection by launching irdadump .
Placing the Palm within 50-100cm's of the IR window on your desktop or laptop machine and running 'irdadump' should produce something like the following. Note that the username on the Palm was seen and printed by IrOBEX:
If you then configure your Palm for IrDA HotSync, and hit the HotSync button, while placing it in view of the IR window on your hardware, you should see the following while running irdadump (Note the addition of IrCOMM now as well as the "Baud Rate" lines, this is a good thing.)
If you got here, and all was working well, you've successfully completed this portion of the configuration.