Cool Palm with Linux Tricks
All Palms sold today have the ability to establish a PPP (or [C]SLIP) connection though the serial or Infrared port. Some models go further, and have wireless Internet connectivity, which will become more common in the near future. If you don't have the luxury of a wireless connection, interesting things can still be done with the Palm networked through the desktop computer.
To set things up on the Palm side, go to the Preferences application, Connection section. Select "Direct Serial" (or "IR to a PC/Handheld"), and click "Edit...". Set the Connection Method to be appropriate, if not already, and then click "Details..." and set the Speed to be the highest you've been able to communicate with the Palm reliably. Then click "OK" twice to return to the top level.
Next, go to the Network section, and select the UnixPPP from the Service pull-down menu. Leave "User Name" blank, Password as "Prompt", and set the Connection type to be "Direct Serial" (or again, "IR to a PC/Handheld"). Click on "Details..." and set the Connection Type, DNS, and IP Address fields as appropriate. Lastly, click on "Script..." and set the first statement to be "End". Click OK twice to return to the top of the Network section.
At this point, the Palm is ready to establish the connection. The next
step is to set the Unix environment to host the connection. As root,
run the command
/usr/sbin/pppd /dev/pilot BAUDRATE HOST_IP:PALM_IP proxyarp passive silent persist local noauth, replacing
as appropriate. The command should return silently after a few seconds
unless something went wrong. Additional run-time information is available in
/var/log/messages. No other program can be using the serial port while this
is running, so that's the first thing to check for if the command fails.
Lastly, if using the Serial port, place the Palm in its cradle -- or, if using IR, point the Palm's IR port at the computer's -- and press Connect. A small notice titled "Service Connection Process" will pop up reporting "Initializing", then "Signing on", and finally "Established". Then the notice will go away, the "Connect" button will change to be "Disconnect", and a small vertical light will blink in the far top, right-hand corner. To test your connection, try pinging the Palm's IP from the desktop machine. If the connect can't be established, check the log messages and double-check that the IP numbers given are correct.
Once the connection is up and running, you have a network
between the Palm and the desktop computer. In order to allow the Palm
to connect to other machines on the Internet, it needs to be routed
appropriately. Network routing is beyond the scope of this article, but
a simple example would be to execute the command
/sbin/ipchains -A forward -j MASQ -s PALM_IP -d 0.0.0.0/0 as
root on the host machine, replacing
PALM_IP as appropriate. Now the Palm is able to connect to any machine
on the Internet, assuming the host machine is connected itself.
Don't let it power-off
One undocumented trick that is really handy when doing networking with the
Palms is the
.3 shortcut. Normally, the Palm will power off after
one to three minutes of inactivity, but when networking, it's often
desirable to have the unit remain on for an extended period. By entering
the shortcut symbol (see your Palm manual or the Graffiti help), and then
.3, the auto-power-off function is disabled. Be careful when entering
this though, as some other
.n shortcuts are rather dangerous.
OK, so you've got your Pilot on the Internet. Now what? Well, by default a Pilot can't do much more than establish the connection. Actually using it requires third-party software. In additional to several commercial web-browsers for the PalmOS, there are also many interesting free and GPLed tools available. Two examples we'll look at briefly are a (very simple) httpd web-server, and a VNC client.
VNC Client -- Yes, that really is a Windows desktop you see on that Palm.
The httpd server for PalmOS, written by Jim Rees and Mark Eichin and available at Rees' site.), is a very specialized, minimalist server, and does not serve arbitrary files. Instead, it presents a series of web pages, which lets one drill down into the Palm's Datebook, Memo, and Doc Files. While it may seem like a strange idea, this actually presents a fairly handy way to gain access to documents on a Palm. Note that as masqueraded above, only the host computer would have access to the web server.
Another surprisingly useful, not to mention amusing, Internet tool for the PalmOS is a Virtual Network Computer (VNC) client. This little Palm application actually lets you access and control a VNC server on a Windows or Unix box. It's practical on the road (through a dial-up modem when no other option is available), but it can be even more fun to watch friends' eyes bug out as you show them what your Palm is currently doing.
There are many other Internet-enabled Palm apps available, some free but many commercial. Everything from News group readers to a simple network time protocol client. With most hand-held devices expected to have wireless Internet connectivity within a year's time, trying out what's available now helps us to see where things might go. Besides, it's just too fun, and too easy, not to do.