by Gregor N. Purdy
2002-01-17
I have an iPAQ model 3630 (p/n 170294-002) with the PCMCIA sleeve (p/n 173396-001. In the sleeve I have an IBM 340 MB CF+ Type II microdrive (model DMDM-10340; p/n 22L0046) docked to a PC Card Adapter for IBM microdrives (p/n 31L9315).
I already had a version of the boot loader (bootldr) running on my iPAQ, so I didn't have to back up WinCE and do the initial bootldr install.
I followed the installation guide for the initial setup.
As root, I set up a minicom session named 'ipaq' with all the modem commands removed, and configured to talk through /dev/ttyS0. This is the session I used for all the work that follows.
I installed the latest version of bootldr at the time, bootldr-2.17.18.bin.
The basic bootstrap root doesn't include some important things, such as an editor (vim or otherwise) and SSH. Therefore, its best to do the bare minimium work on the iPAQ until more stuff is set up.
The rest of this document details what I did to get a reasonable environment working. The first thing I needed to do was do stty erase ^H, since my backspace key wasn't functioning, and I tend to use that key a lot.
Since the initial install isn't very interesting, I set up USB networking next, following Oleg Drokin's instructions (with a few tweaks of my own). I have tried to get PPP working a number of times, with no luck. So, I finally tried USB Networking, and it worked much better.
Happily, both minicom and the default installation of Familiar support zmodem. So, I used minicom's zmodem send command to send a script to the iPAQ that writes the /etc/init.d/usbnet file and invokes it to get USB Networking up and running. I ran the script and noted that the usbf interface was up and running. The script prompts you for the interface configuration, with defaults that worked nicely for me.
Another happy aspect of the default config is that clocal is set on /dev/ttySA0 (the login tty). You can see this by running stty -a. This means that you can have your terminal emulator running and be talking to the iPAQ that way, disconnect the serial cable, do some other stuff, reconnect the serial cable, and be right were you left off (still logged in and everything). Try it. We'll make use of this in a moment.
Now, back on the host computer, we need to do a little setup to get its side of the network connection working. I used another script to set that up. It must be run as root. The script prompts you to connect the iPAQ to USB at the appropriate time. Once the script is done, you should be able to ping the iPAQ, but nothing else. We have to do a little more before we can log into the iPAQ via the network.
Depending upon your network configuration, you may have a little more work to do. For example, you may need to add a route on your Internet gateway box to get traffic back through your host to your iPAQ. I had to do route add -n 172.17.7.0 netmask 255.255.255.0 gw 172.17.5.2, where 172.17.5.2 is the main IP address of my host.
One of the first things that should be done is to set the time... TODO Remember timezone stuff.
Since the default setup doesn't come with SSH, we can't connect to the iPAQ via USB Networking, which pretty much defeats the purpose. We'll need to use some trickery to install ssh while USB Networking is up, since we have to communicate with the iPAQ via the serial connection. The solution will be to write a command that sleeps for a few seconds before kicking off the ipkg command, so you have time to connect the iPAQ to USB.
You can run tcpdump -i usb0 on the host computer to watch the network traffic. When it dies down for a while, you can try to talk to the iPAQ via ssh, since ipkg automatically starts the daemon once the package is installed.
Note: the ipkg.log file shows there is some trouble with the host key.
Copyright © 2008 Gregor N. Purdy. All rights reserved.