|
Macintosh PowerBook
|
|
How-to
Links
|
Configuring IrDAThe IrDA (infrared) port on the back of the PowerBook can be used for a number of things. This page specifically describes how to use it to HotSync a Palm Pilot. There are several steps to get IrDA up and running:
Having kernel support In order to do IrDA, you need a kernel version 2.2.17 or later and have the following options set in the kernel configuration:
alias char-major-161 ircomm-tty
alias tty-ldisc-11 irtty
post-install irda /usr/sbin/irattach /dev/irda
pre-remove irtty /usr/bin/killall -q irattach
Setting up the IrDA port The first thing you might want to do is create the IrDA device /dev/irda by doing: ln -s ttyS1 /dev/irdaThe reason I said "might" is because you don't have to do it: in everything that's below, you can simply use /dev/ttyS1 instead; however, using /dev/irda is clearer. If it's not already there, you need to create the device to use the IrCOMM protocol (which is what is used by the Pilot): mknod /dev/ircomm0 c 161 0
chgrp tty /dev/ircomm0
chmod 666 /dev/ircomm0
ln -s ircomm0 /dev/pilot
Unlike the previous symbolic link, /dev/pilot is actually the
default device used to access the Pilot by Pilot-related software,
so having it simplifies configuration and use.
Getting and configuring the necessary the software The irda-utils package provides the basic software to access the IrDA port. For HotSync'ing a Pilot, you only need irattach. You should not run irmanager since doing so will commandeer the IrDA port and make it inaccessible as a plain serial device. The pilot-link package provides the software to do the HoySync'ing itself. The only configuration necessary is to set the following environment variable (bash syntax shown): export PILOTRATE=115200The J-Pilot package provides a nice, simple Palm Desktop application similar to Palm's MacPac version 1 (which I actually like much better than version 2). To configure it, under File > Preferences, set:
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
Configuring the Pilot In order to HotSync via the IrDA port, the Pilot has to be running PalmOS 3.3 or later. On the Pilot:
Performing a HotSync And now (finally), to perform a HotSync:
Unloading IrDA modules Whenever any communication with the Pilot is performed, all the IrDA modules and irattach will be loaded automatically. However, they will not unload automatically. One way to solve this problem is to make things so that whenever the jpilot executable exits, kill irattach and unload the modules. To do that, a "wrapper" script can be written that you call instead of calling jpilot directly. However, a complication is that only root can kill irattach and unload modules. A solution is to use a setuid root Perl script that forks and:
chown root:root jpilot-wrapper
chmod u+s jpilot-wrapper
|