First, an introduction. I'm an old time Palm user and have had several devices up to my current Tungsten T3. I've developed a couple small applications for the Palm, mostly using
OnBoard C, a compiler that runs on the Palm. Since Palm's decided to work with Windows, I'm starting a move to the iPaq running some flavor of Linux.
New Organization
Check out my New Organization.
TODO
Break into following pieces:
-
Getting Started
-
Purposes:
-
Basic PDA: Contacts, Dates, Notes
-
Basic PDA + internet
-
Basic PDA + some apps
-
Multi-media
-
Develop for PDA
-
Choosing Hardware
-
Choosing Software
-
How to install Linux
-
What you need
-
How to do it
-
Migrating
-
from Palm or Treo
-
from Pocket PC
-
from Blackberry
-
from Cellphone
-
How to configure the handheld
-
How to sync with desktop
-
How to load apps
-
How to add hardware
-
How to develop
-
Kernel
-
distribution apps
-
your own code
As It Stands
Table Of Contents
- New Organization
- TODO
- As It Stands
- Current Questions
- Getting the Hardware and Software
- Configure The Handheld
- Get a PPP Session Up
- Do Some Basic Configuration
- Get an SDCard mounted
- Develop Software
- Next Steps
Current Questions
Well,...
-
is there some way of backing-up my device without rebuilding the kernel
-
how to I find out what packages are currently on my handheld (so that I can remove the ones in which I'm not interested?)
-
which iPkg repositories should I add to the configuration file?
Getting the Hardware and Software
What Do I Want To Do?
My goal is to:
-
run some basic PDA functions,
-
port some Palm applications over, and
-
develop one or two small apps.
In the process of all of this, I figured that it would be pretty cool to be able to port X-Windows applications over to the iPaq.
Handheld Software
My Choice: Familiar with GPE.
I wanted access to lots of apps and I wanted the ability to twiddle a little with the OS. Familiar seems the best solution for these requirements.
I decided to use GPE rather than Opie because I figured that it would be pretty cool to be able to port X-Windows applications over to the handheld.
Handheld Hardware
My Choice: iPaq h3955.
I started by looking in the SupportedHandheldSummary page for an idea of what handhelds would give me a good user experience. I also lurked on the
Familiar mailing list and (later, after I decided that I wanted GPE) the
GPE mailing list. It looked to me like the iPaq series was the most supported for fiddling (but the Zaurus makes a pretty good showing, as well).
I was looking for basic PDA functionality; especially, having an alarm/event in the Calendar wake-up, beep, and display the alarm. I was told that this was...
-
Broken: h55xx,
-
Working: h39xx, h38xx and h22xx.
I decided on the most mature box that I *knew* supported the wake-up-to-play-alarm mode -- that was the h39xx. There seem to be 4 of those: 2 with Bluetooth and 2 without. Since I don't need BT (and decided that paying less was good for me), I elected to pick-up the h3955 (the h3950 seems to be the same box but sold outside the US).
I went onto
eBay and bid on numerous h3955s. Most of them sold for the $120 US, range but I got one for about $80 US. It might have been better if I'd held out for one with a CF sleeve since that's the only way I could get WiFi (there's no support SDIO, just support for SD memory cards) and because the sleeves go for about $55 on eBay.
Host Software
My Choice: Ubuntu Linux (Dapper Drake).
I started using Windows XP as the OS for my host machine (I wrote the flash and the OS with Windows, in fact). In reality, though, almost everybody uses Linux. Since nearly all of the examples are for a Linux Host, I decided that this would be the wise way to go. I decided on
Ubuntu as my Linux distribution because it was an easy install and that's what I'm using at work. It turns out that this is a great choice for host OS because it's a kissing cousin to Familiar/GPE. It's a Debian distro so the apt-get stuff is just like Familar's ipkg package manager (and you'll use both quite a bit). Also, they both use GTK for developing X applications. Sweet.
I setup my machine to dual-boot Ubuntu (Dapper Drake). It's a mind bogglingly simple install and it sets-up the dual-boot for you perfectly fine. I found some helper tutorials for this over on
BigPond and
PsychoCats (which has a pointer to a free program to burn iso images under WindowsXP).
This may not be necessary for the iPaq stuff but I wanted to mention it. Edit the '/etc/apt/sources.list' file to enable update via the web.
Handheld Software Installation
I installed
Familiar v0.8.2 according to the directions. The directions were fantastic -- they worked really well and I had no problems. I installed via the serial port from Windows XP.
Configure The Handheld
Get a PPP Session Up
You'll want to setup a PPP connection between the host and the handheld so that you can install packages and so that you can use your host's keyboard and monitor for things like software development.
I started with the PPPhowto guide and went from there. Since I need a serial connection to upgrade the OS on the iPaq and since I didn't want to crawl behind my host PC to swap between USB and serial cables, I elected to go with the slower serial cable. I may be sorry but, if so, I'll do this differently, later.
Host Machine Setup (One-Time)
Again, I'm using Ubuntu, Dapper Drake, (which is a Debian derivative).
I started by getting IP forwarding up. I did this by uncommenting the line that reads net/ipv4/ip_forward=1 in /etc/sysctl.conf and rebooting.
Next, I got PPP up and running by creating a file named /etc/ppp/peers/ipaq containing:
------ host file: /etc/ppp/peers/ipaq ------ -detach noauth nocrtscts lock user ppp connect '/usr/sbin/chat -v -t3 ogin--login: ppp' /dev/ttyS0 115200 192.168.1.100:192.168.1.101
Start PPP and Test Connection
On the host, in one terminal window, setup the PPP connection by typing (actually, I have this in a small shell script) do:
host$ sudo /usr/sbin/pppd /dev/ttyS0 115200 192.168.1.100:192.168.1.101 nodetach local noauth nocrtscts ms-dns 68.4.16.30 lock user ppp connect "/usr/sbin/chat -v -t3 ogin--ogin: ppp" found interface eth0 for proxy arp local IP address 192.168.1.100 remote IP address 192.168.1.101
NOTE:
-
replace the IP address of your DNS server with your *own* DNS server's IP
-
this will completely occupy the window unless you spawn the task
On the host, in another terminal window, type
host$ ssh root@192.168.1.101
This will be a terminal connection to your iPaq. What you type there is actually going on on the iPaq.
Alternatively to the ssh session; on the iPaq, do the following:
-
Bring-up a Terminal (found in the Utilities folder),
-
Become 'root' by typing su and entering the correct password,
Now, on the iPaq, type:
ipaq$ ping www.google.com 64 bytes from 64.233.167.147: icmp_seq=0 ttl=239 time=97.0ms 64 bytes from 64.233.167.147: icmp_seq=1 ttl=239 time=90.1ms 64 bytes from 64.233.167.147: icmp_seq=2 ttl=239 time=90.1ms ...
Do Some Basic Configuration
Check out FamiliarSlimDownHowto and GPENewbie.
Update The Software, Install Some Apps
On the handheld (or in the ssh window), do the following:
ipaq$ ntpdate -b time.handhelds.org ipaq$ ipkg update ipaq$ ipkg upgrade
I think you can find some applications to install by going to the
IpkgFind site but I think I still have some research to do on this one. Also, check out IpkgFeeds for feeds or just Ipkg for an idea of how to use this stuff.
Backup The Handheld
I was going to make a backup of the handheld but I would have to rebuild the kernel (at least, according to FamiliarBackupHowto) and I'm not there, yet. Okay, so I guess I'll fly blind for a little bit...
Get GpeSync Working
GpeSync is an add-on to the
MultiSync program (though, it seems that it may also work with
OpenSync, a newer program). This will install both MultiSync and GpeSync.
MultiSync Installation On Host
First, you want to get all the apps you need for the host.
host$ apt-get install multisync libmultisync-plugin-all libmimedir-gnome0 libmimedir-gnome0-dev
Then, if you don't already have one, you'll want to generate a public key...
host$ ssh-keygen -t 1024 -t dsa
...and copy that key to the handheld. You'll have to Start PPP, then...
host$ scp ~/.ssh/id_dsa.pub <username>@<ip of PDA>:/tmp host$ ssh <username>@<ip of PDA>
...and, on the handheld, put the key in the right place...
ipaq$ mkdir ~/.ssh ipaq$ cat /tmp/id_dsa.pub >> ~/.ssh/authorized_keys
GPE-MultiSync Installation on Host
I got the download from http://handhelds.org/~florian/multisync/gpe-multisync.tar.gz and extracted it into a temp directory. I then copied those files (.../temp/*) into their ultimate locations (/*).
Then, you'll want to configure MultiSync. Bring-up MultiSync on the host from the menubar as follows:
Applications->Accessories->MultiSync
Then, do the following:
-
Hit the 'New' button.
-
For the first plugin, select 'GPE'.
-
Next to 'GPE', select 'Options'
-
Under 'HostName', enter the IP address of the handheld (for me, that was setup under PPP).
-
Under 'Log in as', enter the username
-
For the second plugin, select 'Backup'
-
Next to 'Backup', select 'Options'
-
Select the 'Options' tab
-
Under 'Backup to directory' enter a directory on the host computer
Installation On Handheld
Setup the IP connection (for me, that's done with PPP, but without starting a terminal). Then, do the following.
ipaq$ ipkg update ipaq$ ipkg install ipkg ipaq$ ipkg install nsqld
Using GpeMultisync
Bring-up MultiSync on the host from the menubar as follows:
Applications->Accessories->MultiSync
Then, hit the 'Sync' button.
Get an SDCard mounted
SdCardHowto and MountingSDandMMCon3900 describe mounting an SD card to /media/card:
ipaq$ modprobe mmc_asic3
Unmounting it is like this:
ipaq$ umount /media/card ipaq$ rmmod mmc_asic3
This all works fine for me.
Develop Software
According to the
X-client development HowTo and DevelopmentCompilation, the three choices for application development are (in preferential order).
-
Native on the iPaq. The DevelopOnFamiliar page is great at describing how to load gcc onto an SD Card and use it. There's similar information at DevelopmentByNfs. I'm still trying to figure out how to get GTK+ to work.,
-
Native using the SkiffCluster, and
-
Cross compilation. Check out PrebuiltToolchains or, if that doesn't work, BuildCrossToolchainHowto. Another way to do this is with
OpenEmbedded but I think that's really only used for kernel development. You can develop the kernel with Linux26ToolsAndSources.
The
GPE Documentation and
GPE Development Manual favor the cross compilation route.
Either way, Neal Walfield suggested (the really cool idea of) developing on and for a Linux box (see GpeNativeDevelopment) and, only after getting it working, do the ARM-targeted compile. So that's the route I'm taking.
gcc/GTK on Ubuntu
My current thought is to do nativehost$ sudo apt-get update host$ sudo apt-get install build-essential host$ sudo apt-get install libgtk2.0-dev
NOTE: I had considered developing with
wxWidgets (or wxGPE) but I thought the support for GTK programmers would be better. Besides, GTK has a Windows version so it's at least somewhat portable.
gcc/GTK on iPaq
Gcc is so big that you can't put it in flash. Since I've got a machine that handles and SD card, I decided to put it there. The card needs to be formatted with an ext2 partition and I was having a hard time doing this on the handheld. Therefore, I did the format on the host. To do this, I stick the SD card in the host's card reader and
host$ sudo umount /dev/sda1 host$ sudo mkfs -t ext2 /dev/sda1 host$ mount -l /dev/sda1 on /media/usbdisk type ext2 (rw,nosuid,nodev)
Now, I
-
stuffed the SD card in my handheld
-
mounted my SD card on my handheld
-
did everything it said at DevelopOnFamiliar
Next, I *THINK* I should PPP, then edit /etc/ipkg.conf. Add to the bottom of that file, the Familiar unstable feed...
------ iPaq file: /etc/ipkg.conf ------ ... src/gz unstable http://handhelds.org/distributions/familiar/feeds/unstable/packages/armv4l
...then add the gtk+ development system to the handheld:
ipaq$ ipkg update ipaq$ ipkg install -d card gtk+-dev
Next Steps
This is where I am, today. Going forward, I need to get the following done:
Basic Configuration
Move Stuff Over From the Palm
I decided to convert the databases via vCards as an intermediate format. I did this as follows:
-
Install
J-Pilot on the (Ubuntu) host
-
Sync my Palm via USB on the host
-
Export the databases into their own formats
-
Modify exported formats into the right input formats (if necessary)
-
Copy the input formatted files to the iPaq
-
Import the input files into the various applications
Install jpilot
J-Pilot is a replacement to Palm Desktop for Linux. You can install it under Ubuntu as follows:
host$ apt-get install jpilot
There's a web page over on
clasohm that explains configuring the USB port by creating a file named /etc/udev/rules.d/10-visor.rules that contains the following:
------ host file: /etc/udev/rules.d/10-visor.rules ------
BUS="usb", SYSFS{product}="Palm Handheld*", KERNEL="ttyUSB[13579]", SYMLINK="pilot"
I did this but I'm not sure it was necesary. The reason I say this is that the file was supposed to make the USB device available without pushing the hotsync button. I didn't see this effect. On the other hand, I did create the file and the USB sync did eventually work -- I never tried to connect without having installed this file.
Configure jpilot by:
-
Open a terminal on the host
-
In the terminal, type jpilot
-
Off the menubar, select File->Preferences
-
Select the 'Settings' tab
-
Under 'Serial Port', type /dev/ttyUSB1 (assuming that you just have the 1 USB device)
-
Click 'Okay'
Sync the Palm to the Host
Do the following:
-
Plug the Palm's USB sync cable into the Palm and into the host
-
Hit the hotsync button on the sync cable (this creates the /dev/ttyUSB1 special device file)
-
Bring-up jpilot if you haven't already done this
-
Hit the hotsync button in jpilot
Export the Databases
-
Bring-up jpilot (if you haven't already done this)
-
Select the datebook/address/todo/memo icon
-
Off the menubar, select File->Export
-
Select all the items in the menu
-
Select the iCalendar/vCard/iCalendar/text radio button
-
Pick a file and location
-
Select 'OK'
Import the Files into the Applications
NOTE: you may want to edit the files if they are large -- importing gigantic files can really honk-up your iPaq.
-
Bring-up PPP
-
In a terminal window on the Host, type scp <ical.file> <user>@<ipaq-ip>:/<dir>
-
On the iPaq, bring-up 'Calendar'
-
Click on the open folder and select the iCalendar file
-
Run XXX Perl script to separate the vCard into pieces and copy them to the iPaq
-
On the iPaq, bring-up 'Contacts'
-
(here's the messy part) for each vCard, click the open folder and select the vCard
learn how to use some apps
-
figure out Rosetta
-
figure out how to use plucker
-
download and mess with the RPN calculator (may need some work)
Specific Applications
Then, build some applications:-
port
Gnu Keyring to iPaq
-
port CombatAccountant
Other Stuff
For this, I *THINK* I should do an:
ipaq$ ipkg -d card install perl
CategoryHomepage