Installation history

2005-06-29: Third bootloader flash and Opie installation

Familiar 0.8.2 is out and I installed it, following the 0.8 .2 instructions. As before, I used the serial cable from the beginning; all the software got replaced.

Familiar 0.8.2 release notes (wiki) are extremely useful.

First I downloaded the latest "unstable" tarball bootopie-h3600.tar to /vc/software/PDA -- the download is fast:

tar xf bootopie-h3600.tar
That creates a directory h3600 with these files
BootBlaster_1.19.exe
bootldr-sa-2.21.12.bin
bootldr-sa-2.21.12.bin.gz
md5sums
opie-image-h3600-20050407124742.rootfs.jffs2
reflash.ctl
So the bootblaster is same old, but the bootloader is new.

As root on spello, I run,
minicom -s

and get a configuration menu:

  • Under "filenames and paths" I set /vc/software/PDA/h3600/ to upload and download directory
  • Under "file transfer protocols" I leave everything as is -- ymodem is defined as /usr/bin/sb
  • Under "serial port setup" I leave these settings (known to work):
    • "serial device : /dev/ttyS0"
    • "Bps/Par/Bits : 115200 8N1"
    • "Hardware Flow Control : No"
  • I select Save setup as dfl and get the receipt that the setup is saved.
  • I select "Exit" (but not "Exit from Minicom") and minicom starts

I reset the ipaq, holding down the joypad and switching the reset button, so that only the bootloader boots. The penguin boot screen shows up on the ipaq. I then press the Calendar button (labeled "Serial bootloader") and return to minicom on spello's monitor.

Minicom now shows the boot> prompt on the ipaq. I enter

load bootldr
and get a prompt to receive via ymodem. Press ctrl-a-s (for send) and select ymodem protocol in minicom, then pick the bootldr-sa- 2.21.12.bin.gz file (use the spacebar). This starts to transfer; it takes a few seconds. 

If you have transfer difficulties, exit minicom (ctrl-a-x) and restart it -- the commands must be entered cleanly for the transfer to work correctly. You get a "Sending: <file name>" receipt when things are working.

File transferred, it says "programming flash..." and returns to the boot prompt -- this worked.  You now have a new bootloader.

Next, manually reset the unit once more, holding down the joypad and switching the reset button; the penguin boot screen shows up, then press the Calendar button (labeled "Serial bootloader") and return to minicom. This loads the new bootloader you just installed. Get ready to install the new kernel and Opie:
load root
Press ctrl-a-s, select ymodem, and then the file opie-image-h3600-20050407124742.rootfs.jffs2.  This takes ten to fifteen minutes -- 14MB of compressed software, the Linux kernel and Opie together. I finally get "Bytes Sent:14417920" and "READY: press any key to continue..." The new software is written to flash memory sector by sector.

When it's done, type

boot
at the boot> prompt and Linux and then Opie loads; see the first bootlog. I can log in as root and give commands as usual, but the ipaq is now ready for ssh so let's switch. Exit minicom.

Next, connect using this first ppp script as root from spello:

/usr/sbin/pppd /dev/ttyS0 115200 128.97.221.33:192.168.0.202 nodetach local noauth nocrtscts lock user ppp connect "/usr/sbin/chat -v -t3 ogin--ogin: ppp"
This connects to the IP address the iPaq has by default. 

Use a different konsole window and verify you can log into the iPaq with

ssh 192.168.0.202
Create a password for the root user with
passwd

Then run these commands from spello:

  • ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.0.202
  • scp /share/data/systems/ucla/ipaq/hosts 192.168.0.202:/etc
  • scp /share/data/systems/ucla/ipaq/resolv.conf 192.168.0.202:/etc
  • scp /share/data/systems/ucla/ipaq/interfaces 192.168.0.202:/etc/network
This gives you the basic configuration files.

You can now connect using ppp -- use the script in spello:/root

./ipaq&
Then from trevi, add rsa keys of network machines:
scp /root/.ssh/authorized_keys ipaq:/home/root/.ssh
Log in as root and run these commands:
ntpdate spello (or ntpdate -b time.handhelds.org)
ln -sf /usr/bin/ipkg /usr/bin/just
just update
I get "Updated list of available packages in /usr/lib/ipkg/lists/".
just upgrade
Netbase and a couple of other packages install.
Check for the targus stowaway keyboard support:
# just list | grep stow
kernel-module-h3600-stowaway-2.4.19-rmk6-pxa1-hh37 -
    2.4.19-rmk6-pxa1-hh37.4-r5 - h3600-stowaway kernel module; Compaq iPAQ stowaway keyboard driver
opie-sh-stowawayctrl - 1.2.0-r0 - A QDialog shell frontend
# just status kernel-module-h3600-stowaway-2.4.19-rmk6-pxa1-hh37
Provides: kernel-module-h3600-stowaway
Status: install ok installed
Maintainer: Rene Wagner <reenoo@gmx.de>
# just install opie-sh-stowawayctrl
Configuring opie-sh-stowawayctrl
# just install nano (also installs ncurses)
# ln /usr/bin/nano /usr/bin/pico
Note that you can use
just status <package>    ==> to see the equivalent of "just show"
just list   ==> to get a list of all available packages
just info nano
The kernel modules are in /lib/modules/2.4.19-rmk6-pxa1-hh37/kernel --
modprobe h3600_stowaway
works!  Edit the modules to be loaded in /etc/modutils and run update-modules. I did this:
In ircomm-tty commented out ircomm-tty
In sa1100_ir.conf commented out alias irda0 sa1100_ir
nano stowaway entered alias stowaway h3600_stowaway
In orinoco_cs.conf commented out options orinoco_cs ignore_cis_vcc=1
And then lots of bluetooth stuff:
In l2cap.conf commented out alias bt-proto-0 l2cap
In rfcomm.conf commented out alias bt-proto-3 rfcomm
In bnep.conf commented out #alias bt-proto-4 bnep
In sco.conf commented out #alias bt-proto-2 sco
In hci_uart.conf commented out #alias tty-ldisc-15 hci_uart
However, the stowaway module doesn't load automatically.

Space:
# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root                32512     16096     16416  50% /
tmpfs                    31688        56     31632   0% /var
tmpfs                    31688         0     31688   0% /media/ram

That sets up the basics. I then installed a patched version of fbvncserver, as the release notes recommends:

# wget http://unc.dl.sourceforge.net/sourceforge/fbvncserver/fbvncserver_0.0.7-001_arm.ipk
This is the version from 2005-05-12, more recent than any of the mainstream packages (which have wrong orientation on ipaqs).
# just install *ipk
Installing fbvncserver (0.0.7-001) to root...
iPAQ 3600 family device present ...
Configuring fbvncserver
 -> create link to start-up script
 [I]: start-up script for 3600 linked.
 -> creating link to vnc-server stop-script
 -> creating re-direction pipes
 [I]: Please reboot your PDA ...

      When the reboot is complete, calibrate the VNC touchscreen emulation daemon.
      Do this calibration by tapping the four corners of the display.
      Don't worry if Qtopia or OPIE reacts to your tappings,
      as it does not know that you are doing a calibration.
Well, maybe I shouldn't have installed the package, as I don't really want to use it right now.

2004-04-05: VNC

I installed dasher -- it gets a sigsev. I tried

just install -force-overwrite   opie-dasher-english
but it sigsevs and reports not being installed.

VNC server on the ipaq: the wiki claims it is built in!

Following the instructions on the opie wiki, I issued this on the ipaq:

export QWS_DISPLAY=VNC:0

No response. Then kill all qpe processes:
ps -aux | grep qpe
-- there were none anyway. Then start qpe like this:
qpe -qws
That produced a storm of stuff, starting with this:
QVNCServer created
Now, that confirms there's a VNC server built in! Then lots of protests (dupes removed):
QGfx buffer unaligned: 4083740b
QServerSocket: failed to bind or listen to the socket
ODevice::setDisplayStatus(1)
QDir::readDirEntries: Cannot read the directory: ../apps
QPixmap::convertFromImage: Cannot convert a null image
/proc/sys/ts/suspend_button_mode: No such file or directory
QDir::readDirEntries: Cannot read the directory: ../plugins/applets
QDir::readDirEntries: Cannot read the directory: ../plugins/inputmethods
QPixmap::convertFromImage: Cannot convert a null image
QDir::readDirEntries: Cannot read the directory: ../plugins/applets
QGfx buffer unaligned: 4083740b
QPixmap::convertFromImage: Cannot convert a null image
TaskBar::resize event
inserting Documents at -1
New Mode 2 2
QDir::readDirEntries: Cannot read the directory: ../plugins/obex
could not load IR plugin
QuickLauncher running
Registered QPE/QuickLauncher-1916
You should now be able to use a vncviewer on your PC. I issue
$ xtightvncviewer ipaq
and it works!!!!
VNC server supports protocol version 3.3 (viewer 3.3)
No authentication needed
Desktop name "Qt/Embedded VNC Server"
Connected to VNC server, using protocol version 3.3
However, I now see an application I have no interest in -- and I can't really see what it even is (qws?). I do a search on Qt/Embedded VNC server and find Trolltech's own page at http://doc.trolltech.com/3.0/emb-vnc.html. They say to run
application -display VNC:0
and then a vncviewer --
By default, Qt/Embedded will create a 640 by 480 pixel display. You can change this by setting the environment variable to another size, e.g. QWS_SIZEQWS_SIZE=240x320.
The Qt Virtual Framebuffer is an alternative technique. It uses shared memory and thus is much faster and smoother, but it does not operate over a network.
Well, that might work on Spello and be just the ticket! So I first reset the display:
export QWS_DISPLAY=0:0
Then I tried to locate the solitaire game -- first, find the package name on ipkgfind, then issue
just files opie-solitaire | more
Seems to be /opt/QtPalmtop/bin/patience. So I issue
which patience
and get the same thing. Next,
patience -display VNC:0
Well -- I get this:
QSocket::writeBlock: Socket is not open
No Qt/Embedded server appears to be running.
If you want to run this program as a server,
add the "-qws" command-line option.
I try again:
patience -qws -display VNC:0
So, that seems similar to what I just did. This time I get,
QVNCServer created
QGfx buffer unaligned: 4083740b
QServerSocket: failed to bind or listen to the socket
QuickLauncher invoked as: patience
Could not create application main window
I try again,
export QWS_DISPLAY=VNC:0
patience -qws
But no dice:
0 driver cannot connect
This does look moderately promising, however.  Interestingly, this works:
embeddedkonsole -qws
I get a real console, with icons. But it crashes when I try to use it. After that, I get
QServerSocket: failed to bind or listen to the socket
So that's the built-in VNC server -- not very useful.

Now, at Qt/Embedded Overview it says, "Most Qt applications can be ported to Qt/Embedded with a simple recompile and screen re-size." This suggests most Qt applications can be ported to i386 with a simple recompile.

See also IPAQ and Zaurus Development using QPE -- it contains compiling instructions and this may well be the way to go.

See also Qt/Embedded Virtual Framebuffer -- this is a method developers to use their desktop to develop Qt/Embedded applications.

qt-embedded-interest
is a mailing list where Lorn hangs out.

A package that should work on your ipaq 3765 (source):
Package: iPAQ3870_fbvncserver
Version: 0.0.2
Depends: libc6
Architecture: arm
Maintainer: Patrik Gfeller <gfellerpatrik@gmx.net>
MD5Sum: 120e69a656fd7fe3fe02b36ee68cdf93
Size: 135682
Filename: iPAQ3870_fbvncserver.ipk
Description: This package contains a frame buffer VNC server for iPAQ3870 & 3765.
Hard to tell if this will work -- or where it is. You could ask on the maillist, or the maintainer.

2004-03-24: Reinstalling Familiar 0.7.2 and Opie 1.0.2 from scratch

I got some erratic behavior on the ipaq after the upgrade and decided to reinstall from scratch; the results are truly excellent. Logging out now works again, and the teeclub game is snappier; there is also a contextual menu in the file manager, so I can view pictures, open apps, and delete files directly.

When installing the bootloader I ran into some trouble that was cured by rebooting lilo. Installing the root package didn't complete to boot> but this seems not to have mattered -- I guess it was close enough. I had to reissue the bridge command on spello for the ipaq to be able to update. I didn't run upgrade, though I probably could do so safely now -- the problem with the update from 0.7 is that the bootloader needed to be upgraded.

2004-03-23: Installing games and reinstalling tinylogin

After installing some extra games, a snapshot package (!), and issuing "just upgrade", I may have got some trouble with tinylogin -- Opie wouldn't log out, which is alarming because it needs to log out to create a serial connection. I finally managed to force a reinstallation of Opie by issuing:

  • just install -force-overwrite tinylogin
Note that -force-reinstall didn't work.

2004-03-16: Upgrading to Familiar 0.7.2 and Opie 1.0.3

On 16 March 2004, I followed instructions at http://familiar.handhelds.org/familiar/releases/v0.7.2/. I connected to the ipaq as detailed in configuration, then opened vi and modified /etc/ipkg.conf to read

src base http://familiar.handhelds.org/releases/v0.7.2/base/armv4l

dest root /
dest ram /mnt/ramfs
dest ext /mnt/hda

However, the installation process (below) changed this so that /etc/ipkg.conf now reads:
# ipkg looks in /etc/ipkg for .conf files with feeds in them.

dest root /
dest ram /mnt/ramfs
dest ext /mnt/hda

I changed and /etc/dpkg/opie.conf to read

src opie http://opie.handhelds.org/feed/ipaq/1.0.3
After the update (below), I added the file /etc/ipkg/familiar.conf with this line:
src base http://familiar.handhelds.org/releases/v0.7.2/base/armv4l
On issuing "just update" I got this:

Downloading http://familiar.handhelds.org/releases/v0.7.2/base/armv4l/Packages
Downloading http://opie.handhelds.org/feed/ipaq/1.0.3/Packages

The packages are downloaded to /tmp and then moved to /usr/lib/ipkg/lists.

Next, I issued

just upgrade
and got lots of stuff along these lines:
Downloading http://familiar.handhelds.org/releases/v0.7.2/base/armv4l/kernel-modules_2.4.19-rmk6-pxa1-hh30_ipaqsa.ipk
Downloading http://familiar.handhelds.org/releases/v0.7.2/base/armv4l/familiar-base_5.0-38_arm.ipk
Downloading http://opie.handhelds.org/feed/ipaq/1.0.3/libqte2_2.3.7-5_arm.ipk
and then this:
Package tinylogin wants to install file /bin/addgroup
        But that file is already provided by package <no package>
Please move this file out of the way and try again.
I guess I'll try a force on tinylogin. I also got this one:
ERROR: Package opie-keytabs (parent opie-keytabs) is not available from any configured src.
Failed to download opie-keytabs. Perhaps you need to run 'ipkg update'?
In fact, however, the package is available, but may be misnamed:
http://opie.handhelds.org/feed/ipaq/1.0.3/opie-keytabs_0.6-_arm.ipk
The teeclub game is in this package:
http://opie.handhelds.org/feed/ipaq/1.0.3/opie-solitaire_1.0.3_arm.ipk
I then got a hang on this package -- likely my fault for responding too fast:
http://familiar.handhelds.org/releases/v0.7.2/base/armv4l/sysvinit_2.85-fam1_arm.ipk
I tried to resume, got the same tinylogin and opie-keytabs errors as above, and then this:
Package=ipkg-arch, 3 matching providers
Please select one with ipkg install or ipkg flag prefer
ERROR: Cannot satisfy the following dependencies for task-bootstrap:
         ipkg-arch
ERROR: Package task-opie-today (parent task-opie-today) is not available from any configured src
Finally I get this:
Do not forget aliases:
  /dev/ppp => ppp_generic
  tty-ldisc-3 => ppp_async
  char-major-108 => ppp_generic
in /etc/modules.conf (not setting them),
then putting ppp_generic in /etc/modules does the trick for me.
Now, the attempt to tidy up. I issued ipkg -h to see options:
ipkg version 0.99.105
usage: ipkg [options...] sub-command [arguments...]
where sub-command is one of:

Package Manipulation:
        update                  Update list of available packages
        upgrade                 Upgrade all installed packages to latest version
        install <pkg>           Download and install <pkg> (and dependencies)
        install <file.ipk>      Install package <file.ipk>
        configure [<pkg>]       Configure unpacked packages
        remove <pkg>            Remove package <pkg>
        flag <flags> <pkg> ...  Flag package(s) <pkg>
         <flags>=hold,noprune,user,ok

Informational Commands:
        list                    List available packages and descriptions
        files <pkg>             List all files belonging to <pkg>
        search <file>           Search for a package providing <file>
        info [pkg [<field>]]    Display all/some info fields for <pkg> or all
        status [pkg [<field>]]  Display all/some status fields for <pkg> or all
        download <pkg>          Download <pkg> to current directory.
        compare_versions <v1> <op> <v2>
                                  compare versions using <= < > >= = << >>
        print_architecture      prints the architecture.
        print_installation_architecture
        whatdepends [-A] [pkgname|pat]+
        whatdependsrec [-A] [pkgname|pat]+
        whatprovides [-A] [pkgname|pat]+
        whatconflicts [-A] [pkgname|pat]+
        whatreplaces [-A] [pkgname|pat]+
                                prints the installation architecture.

Options:
        -A                      Query all packages with whatdepends, whatprovides, whatreplaces, whatconflicts
        -V <level>               Set verbosity level to <level>. If no value is
        --verbosity <level>      provided increase verbosity by one. Verbosity levels:
                                 0 errors only
                                 1 normal messages (default)
                                 2 informative messages
                                 3 debug output
        -f <conf_file>          Use <conf_file> as the ipkg configuration file
        -conf <conf_file>       Default configuration file location
                                is /etc/ipkg.conf
        -d <dest_name>          Use <dest_name> as the the root directory for
        -dest <dest_name>       package installation, removal, upgrading.
                                <dest_name> should be a defined dest name from
                                the configuration file, (but can also be a
                                directory name in a pinch).
        -o <offline_root>       Use <offline_root> as the root directory for
        -offline <offline_root> offline installation of packages.
        -verbose_wget           more wget messages
        Force Options (use when ipkg is too smart for its own good):
        -force-depends          Make dependency checks warnings instead of errors
                                        Install/remove package in spite of failed dependences
        -force-defaults         Use default options for questions asked by ipkg.
                                (no prompts). Note that this will not prevent
                                package installation scripts from prompting.
        -force-reinstall        Allow ipkg to reinstall a package.
        -force-overwrite        Allow ipkg to overwrite files from another package during an install.
        -force-removal-of-dependent-packages
        -force_space            Install even if there does not seem to be enough space.
        -noaction               No action -- test only
        -nodeps                 Do not follow dependences
        -recursive              Allow ipkg to remove package and all that depend on it.
        -test                   No action -- test only
        -t                      Specify tmp-dir.
        --tmp-dir               Specify tmp-dir.
I issued:
ipkg install -force-reinstall http://familiar.handhelds.org/releases/v0.7.2/base/armv4l/sysvinit_2.85-fam1_arm.ipk
and got lots of errors indicating everything was already installed. I then tried,
ipkg install http://opie.handhelds.org/feed/ipaq/1.0.3/opie-keytabs_0.6-_arm.ipk
and something just went through -- no errors, no receipt. But issuing
just status opie-keytabs
shows me that version "0.6-" (there's the hyphen) has in fact been installed. Next,
just list | grep ipkg-arch

ipkg-arch-ipaqpxa - Contains /etc/ipkg/*-arch.conf
ipkg-arch-ipaqsa - Contains /etc/ipkg/*-arch.conf
ipkg-arch-skiff - Contains /etc/ipkg/*-arch.conf
I find online that you can issue this to find out "what architecture/machine-types ipkg is configured for" -- essentially this command just reads the contents of the file /etc/ipkg/ipaqarch.conf:
ipkg print_architecture

arch arm 10
arch armv4l 20
arch ipaqsa 30
arch all 1
arch any 1
arch noarch 1
For my 3750, from familiar's perspective functionally identical to 3600, I need ipaqsa. So I issue
just install ipkg-arch-ipaqsa
I now get a new response to the architecture query:
ipkg print_architecture

arch all 1
arch any 1
arch noarch 1
arch arm 10
arch armv4l 20
arch ipaqsa 30
arch arm 10
arch armv4l 20
arch ipaqsa 30
arch all 1
arch any 1
arch noarch 1
Then I try to get tinylogin installed:
just install tinylogin
This time tinylogin claims that tinylogin is already providing the packages, so I imagine I'm fine.

Next, task-opie-today. I searched for it using ipkfind (http://ipkgfind.handhelds.org) and found an unstable version at http://opie.handhelds.org/feed/ipaq/unstable/task-opie-today_0.5-20040313_arm.ipk -- then the regular stable version at http://opie.handhelds.org/feed/ipaq/1.0.3/task-opie-today_0.5-_arm.ipk (note the naming error again) and installed it. I told the mailing list at opie@handhelds.org about the two misnamed packages. That should do the trick.

Finally, the comment at the end about ppp:
Do not forget aliases:
  /dev/ppp => ppp_generic
  tty-ldisc-3 => ppp_async
  char-major-108 => ppp_generic
in /etc/modules.conf (not setting them),
then putting ppp_generic in /etc/modules does the trick for me.
I have no idea about /dev/ppp -- you can't just turn that into a symlink. The file /etc/modutils/ppp-modules.conf has this:
alias tty-ldisc-3 ppp_async
alias tty-ldisc-4 ppp_synctty
alias ppp0 ppp_async
So that handles the second suggestion in the note above. ppp_generic is listed in /etc/modutils/familiar-base.conf with the line
alias char-major-108 ppp_generic
That takes care of the third line of the note above. As for char-major-108, /dev/ppp is indeec char major 108 and minor 0 -- but I don't want to ruin the device node by turning it into a symlink. (The advice sounds like it might be coming from someone who is not using update-modules -- /etc/modules shouldn't be edited.)

I then commented out these modules in /etc/modutils/bluetooth-modules:
#hci_uart
#l2cap
#bnep
#bluez
and ran update-modules. I also removed the modules from the running kernel with rmmod -- worked fine.

Then some new packages:
diff (note that diff generates input for patch).
alsa-modules
alsa-utils
opie-mediaplayer2
opie-mediaplayer2-codecs
opie-mediaplayer2-skin-default-landscape
opie-mindbreaker
opie-minesweep
opie-volumeapplet
Not sure it was a good idea to install alsa -- the sound-modules already install may be using oss (snd-pcm-oss snd-mixer-oss).

There is a portmapper -- I wonder if you can mount drives? A gig on your opie? ttf-bitstream-vera -- I think a small version is already installed. There's all kinds of bluetooth and wireless stuff.

I now have two sets of modules in /lib/modules:
2.4.19-rmk6-pxa1-hh30
2.4.19-rmk6-pxa1-hh13
Will the more recent one -- hh30 -- automatically be chosen?

2003-07-16: Second bootloader flash and Opie installation

Familiar 0.7 is out and I installed it, following the 0.7 instructions. This time I used the serial cable from the beginning; all the software got replaced.

First I downloaded the latest tarball to /vc/software/iPaq and untarred it -- the download is slow:
wget http://familiar.handhelds.org/familiar/releases/v0.7/install/bootopie-v0.7-h3600.tar

Second I reset the unit while holding down the joypad, so that only the bootloader boots. I then connect to the unit using minicom -- this time I had no problems, as all the correct settings were retained from last time. At the boot> prompt (on Spello's screen, but really on the iPaq) I entered "load bootldr" and got a prompt to receive via ymodem. Press ctrl-A-z-s and select ymodem protocol in minicom, then pick the bootldr-sa- 2.20.4.bin.gz file. This starts to transfer; it takes a couple of minutes.

This is the most crucial step, as you're replacing the ability to boot itself. If you don't get error messages, type "reset" at the boot> prompt. If you do get errors, don't disconnect the unit -- just leave it connected and powered and seek help on irc!

Third, I had some trouble preventing it from booting Linux and Opie -- you have to hold the joypad while you reset. The minicom connection just stays. Again from the boot> prompt type "load root" and again press ctrl-A-z-s and select ymodem protocol in minicom, then pick the jffs2 file -- that's the Linux kernel and Opie together. It takes ten to fifteen minutes to download over the minicom connection. Once it's done, you'll see all kinds of registers rewritten -- scary stuff, but it works fine. When it's done, type "boot" and the boot> prompt and Linux and then Opie loads.

You may not need the following: I logged in and started sshd -- it was likely already running. You may have to reboot; then leave the iPaq at the Opie login screen, serial cable all the time connected.

Fourth, quit minicom and send this first ppp connection script: /usr/sbin/pppd /dev/ttyS0 115200 192.168.0.1:192.168.0.202 nodetach local noauth nocrtscts lock user ppp connect "/usr/sbin/chat -v -t3 ogin--ogin: ppp". I put it in zppp. This connects to the IP address the iPaq has by default.

Fifth, use a different konsole window to log in to the iPaq with ssh 192.168.0.202. Then run these commands from spello:

scp /vc/systems/ucla/ipaq/hosts 192.168.0.202:/etc
scp /vc/systems/ucla/ipaq/resolv.conf 192.168.0.202:/etc
scp /vc/systems/ucla/ipaq/interfaces 192.168.0.202:/etc/network

This gives you the basic configuration files. Now disconnect your ppp connection and establish this second one instead: /usr/sbin/pppd /dev/ttyS0 115200 128.97.184.94:128.97.184.92 nodetach local noauth nocrtscts lock user ppp connect "/usr/sbin/chat -v -t3 ogin--ogin: ppp"

The iPaq is now on the network, so change the password. Log in by name and run these commands:
ntpdate spello
ln -sf /usr/bin/ipkg /usr/bin/just
just update
just upgrade
just install ssh

Note that the default Opie feed is now 0.99pre; there was nothing to upgrade, so that's what I'm running I take it. There are a couple of other things you could do:
just install stowaway-modules opie-sh-stowawayctrl
cd /
./postinst  (this installs MS fonts)
I didn't, this first evening -- last time the stowaway couldn't be made to work, and the MS fonts didn't show up. Note that you can use
just status <package>    ==> to see the equivalent of "just show"
just list   ==> to get a list of all available packages
ipkg info nano

I don't see a way of listing all installed packages, except by looking at the cache...

Summary: This looks like a pretty robust upgrade procedure. It's very easy to keep copies of the main files on spello and just copy them over after a reinstallation. What isn't quite there yet is getting the calendar files from korganizer and kaddressbook across. Remember you have rsync if you need it.

It looks like this release is a better one, with a number of bugs fixed; you could probably just start using it. Still, I'm OK with just having learned how to do the whole thing -- how to install a complete replacement bootloader and OS. It shouldn't take you more than half an hour next time.

2003-06-09: First bootloader flash

The new Familiar 0.7 is released in an advanced release candidate state. I used the 0.7 instructions to pick up the bootloader tarball from somewhere (not sure where now), placed it in /fuma/Software/PDA/Linux, and untarred it -- and don't gunzip the bootldr! I then booted into WinXP and moved the following files into the default directory, in this case My device \ My documents::

  • BootBlaster_1.19.exe
  • bootldr-sa-2.20.1.bin (eventually I ended up with the 2.20.3 bootloader)

Click on Start on the iPaq and select File Explorer; click on BootBlaster -- it runs! I followed the instruction:

  1. Save the "bootloader segment" to the file \My documents\saved_bootldr.gz
    1. Copy the backed up bootloader to your desktop machine (no real need to do this as you just put the first version there!)
  2. Save the WinCE bootloader to \My documents\wince_image.gz
    1. This saves the Pocket PC executable image (takes 2-3 minutes -- let it run until the complete message appears)
    2. It came to 16.7MB and I copied to to the desktop (/fuma/Software/PDA/Linux)
  3. Next, select "Program" to flash the new bootloader
    1. You'll be prompted for a file to flash -- select bootldr-sa-2.20.1.bin
    2. It says "Protecting WinCE Partitions, Erasing Flash, Programming Flash"
    3. "You appear to have a valid OHH Bootloader 2.20.1 in flash. To access this Bootloader on the serial port, hold the joypad center and reset"
    4. This last message is the result of the "Verify" command -- you can rerun it from the menu

Now, that was the first part. You have now flashed your iPaq -- using ActiveSync over USB. I reset the unit and --- tada! -- the bootloader works! Lots of options -- when I just leave it alone it boots back into WinCE. So the first mission is accomplished.

Note that you can also reflash the bootloader from the bootloader prompt: "press the center button while you press reset, this will put you in the bootloader prompt. then reflash the rom." I've not tested this.

2003-07-03: Continued installation -- no serial console

I'm now looking at the installation instructions for the Familiar 0.7 release, Installing Familiar 0.7 with a serial line. I've got a "hotsync cable" serial line hooked up to the iPaq and to Spello, currently running Linux. I verify that the terminal program minicom is installed (version 2.1-2), along with the lrzsz package, which provides "an external y-modem program". Spello's dmesg shows:

Serial driver version 5.05c (2001-07-08)
    with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
I then turn to minicom. First I run "man minicom" and find there's a setup flag, -s. I run minicom -s and get a configuration menu.
  • Under "filenames and paths" I set /vc/software/iPaq to upload and download directory
  • Under "file transfer protocols" I leave everything as is -- ymodem is defined as /usr/bin/sb
  • Under "serial port setup" I find
    • "serial device : /dev/ttyS3". An "l /dev/ttyS*" shows that I have four ttyS device nodes, from ttyS0 through ttyS3. Above, dmesg found ttyS00 and ttyS01, but /dev shows ttyS0 and ttyS1 -- one digit less. I try various; it turns out later ttyS0 is the correct setting.
    • "Bps/Par/Bits : 38400 8N1". Here I need 115200 8N1 and change the speed, successfully.
    • "Hardware Flow Control : Yes". Here I need "no flow control" so I change that to "No".
    • I don't see anything about "hardware handshaking", which I'm not supposed to use
  • I select Save setup as dfl and get the receipt that the setup is saved.
  • I select "Exit" (but not "Exit from Minicom") and minicom starts

I plug the power into the iPaq -- I was depleted -- and reset it, holding down the joypad and pushing the reset button. It boots fine to the ARM Bootloader, and I press the Calendar button for the "Serial Bootloader Console" -- the text flashes inverse. I don't know what I'm looking for -- shouldn't I be seeing a boot prompt on the iPaq? Of course not, but I only find that out later...

2003-07-04: Continued installation -- serial console success

I read in the discussion list that some people have had trouble with the 2.20.1 bootloader, so I got bootldr-2.20.3.bin.gz from ftp://familiar.handhelds.org/feeds/bootldr. I flash both that and the most recent bootldr-sa-2.20.4.bin.gz, but none of them give me a console. I ask on the mailing list for advice. On IRC's #handhelds.org, "nefs" tells me that the iPaq doesn't show a console -- you only see the console on the PC's minicom. I try again -- boot into Win98 to try HyperTerminal, but the OS is so buggy I get nowhere. When I boot back into Linux and use the /dev/ttyS0 setting (I had tried it once or twice before), it suddenly works!

There's a boot> prompt -- on spello, of course, not on the iPaq -- and typing "help" gives me oodles of text. I continue with the instructions:

First I download this file:

http://familiar.handhelds.org/familiar/releases/v0.7/install/bootopie-v0.7-rc3-h3600.tar
I put it in /vc/software/iPaq and untar it. I get these files:
bootopie-v0.7-rc3-h3600.jffs2
bootldr-sa-2.20.1.bin.gz
BootBlaster_1.19.exe
md5sums
reflash.ctl
The bootldr and BootBlaster I no longer need. I'll now copy the *jffs2 file to the iPaq!
I paste this into minicom's console:
load root
-- which gives me this:
partition root is a jffs2 partition:
 expecting .jffs2 or wince_image.gz.
 After receiving file, will automatically uncompress .gz images
loading flash region root
using ymodem
ready for YMODEM transfer...
I  initiate the file transfer from minicom:
With minicom, use the key sequence: ctrl-A-z-s Then select xmodem and the name of the file to send. Transfer->Send File to activate the Send File dialog. With this dialog, select the name of the file to send, choose the Xmodem protocol, and then Send.
I do this, and get Sending: bootopie-v0.7-rc3-h3600.jffs2. It works fine; the transfer is slow by current standards, taking several minutes to get the 11,534KB across. Yeah! I'm booting Linux! Opie, too -- this new system seems to be a lot simpler than what came before. I'm glad minicom is working -- I don't know what the initial problem was, other than that I didn't stick with /dev/ttyS0 all the time.

The new boot image loaded fine, erasing the old flash and writing itself in. I typed "boot" and booted into Linux -- into Opie! The date reset window wouldn't load, but everything else was working.

2003-07-04: Establishing a USB connection -- failure

I used this Wiki how to establish a USB networking connection -- you can't quite trust it, so see the notes below.

To communicate with the iPaq over a USB cable -- such as the cradle it comes with -- you need to activate usbnet functionality in the kernel. Specifically, you need the usbnet.o module, which my 2.5.69 kernel had not selected. For details, see USB Host-to-Host Networking on GNU/Linux. I reconfigure the kernel and select "Host-to-host networking for cables and smart devices" with an M. The help screen says this (abbreviated):

CONFIG_USB_USBNET:
This driver supports several kinds of network links over USB. Typically, these links involves only two network hosts.  The host runs "usbnet", and the other end of the link might be [...] an intelligent USB gadget, such as ipaq. The link will appear with a name like "usb0", when the link is a two-node link. Those two-node links are most easily managed with Ethernet Bridging (CONFIG_BRIDGE) instead of routing. For more information see http://www.linux-usb.org/usbnet/. The module will be called usbnet.
Under Networking | Networking options, I found "802.1d Ethernet Bridging":
CONFIG_BRIDGE:
In order to use the ethernet bridging functionality you'll need these userspace tools. The tarball  contains extensive documentation, but if you still have questions, don't hesitate to post to the mailing list). You can also mail me at Lennert Buytenhek <buytenh@gnu.org>. Please read the Bridge mini-HOWTO for more information. The module will be called bridge.
Reading the testimonials, I discover there's a Debian package called "bridge-utils" -- turns out I have it installed already. It's the origin of the following files:
/etc/network/if-pre-up.d/bridge
/etc/network/if-post-down.d/bridge
In addition, there's a man page and quite a bit of documentation.

Back under USB, you need the "Embedded ARM Linux links (iPaq, ...)".  This has the following help menu:

CONFIG_USB_ARMLINUX:
Choose this option to support the "usb-eth" networking driver used by most of the ARM Linux community with device controllers such as the SA-11x0 and PXA-25x UDCs.

Note that for the Zaurus, you need the "Sharp Zaurus (stock ROMs)" (tell Tord), and for Palms you need "USB Serial Converter support" (tell Derek).

I selected these:

CONFIG_USB_USBNET (m = usbnet)
CONFIG_BRIDGE (m = bridge)
CONFIG_USB_ARMLINUX (y)

In addition, I need some advanced networking features, namely iptables and masquerading. Under Networking support | Networking options, I needed these:

CONFIG_PACKET (m = af_packet) -- already present
CONFIG_NETFILTER (y)
Then, further down under IP: Netfilter Configuration, I added these:
CONFIG_IP_NF_CONNTRACK (m = ip_conntrack) -- required for masq/NAT
CONFIG_IP_NF_IPTABLES (m = ip_tables) -- required for masq/NAT
CONFIG_IP_NF_FILTER (m = iptable_filter) -- defines the table 'filter'
CONFIG_IP_NF_NAT (m = iptable_nat) -- defines the table 'nat'
CONFIG_IP_NF_TARGET_MASQUERADE (m  = ipt_MASQUERADE)
That's all -- I defined the lot of them in netfilter as modules, to avoid having to recompile, but these five are all I need.  I then recompiled and rebooted. While compiling, I discovered there's a Debian package called iptables that was installed already. 

On reboot, I found this:

  • the usbnet module loaded automatically
  • the ipaq was detected by lsusb at Bus 002 Device 002:
    ID 049f:505a Compaq Computer Corp. SA-11x0 based Linux Device, or Itsy
  • usbview shows it as "SA1100 USB NIC" and "Speed: 12Mb/s (full)"
  • I loaded the bridge module and got "NET4: Ethernet Bridge 008 for NET4.0"
  • I loaded ip_tables and ip_conntrack -- they loaded iptable_nat

That seems to me all quite nice. Turning to the iPaq, I continued with the Wiki instructions how to establish a USB networking connection. I may be simplest to do it while you're still on the minicom, but I did it in konsole on the ipaq directly. Here's what you do on the ipaq:

modprobe usb-eth
This actually works! The sa1100usb_core.o module loads, along with the usb-eth.o module. So I have what it takes on the ipaq. I do an lsmod and see lots of modules I don't need. I should unload them once I have a connection.

Next, I'm supposed to set up an ethernet connection, configuring the iPaq like this:
ifconfig usbf up 1.1.1.1 netmask 255.255.255.0
route add default gw 1.1.1.2
Note that the ifconfig will work only when the iPaq is in the cradle and connected to the laptop -- so that's a good sign! I then create an /etc/resolv.conf file with two nameservers. I then try this:
modprobe uhci
modprobe usbnet
Smooth -- no response on either one. I remove it from the cradle and put it back in.

Back on the laptop, I do this:
ifconfig usb0 1.1.1.2 netmask 255.255.255.0
# this is for iPAQ to be able to communicate with others,
# besides my
PC host
iptables -t nat -I POSTROUTING -j MASQUERADE -s 1.1.1.1/32
# You may need to allow forwarding on this interface
iptables -I FORWARD -s 1.1.1.1/32 -j ACCEPT
iptables -I FORWARD -d 1.1.1.1/32 -j ACCEPT
# You may need to enable IP Forwarding:
echo 1 > /proc/sys/net/ipv4/ip_forward

All of these went through without comments (once I had the right modules). I optimistically tried to issue a ping on  the ipaq, which promptly froze. However, a reset just takes me back to where I was -- even the changed files were retained.

I play around with it -- even manage to set the time, so I'm all set.

On Sigillo, I get this:
#iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             1.1.1.1
ACCEPT     all  --  1.1.1.1              anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

So this is the quick and dirty -- accept forward from all.

More suggestions -- there's really no straightforward set of instructions anywhere -- this is really rather chaotic. On this first attempt, I'm unable to establish a network connection using the USB cradle.

2003-07-05 Establishing a PPP connection -- success

Here's the line that made the logon work -- the first IP address is what gets assigned to the host, and the second is the iPaq's as given in /etc/network/interfaces:
/usr/sbin/pppd /dev/ttyS0 115200 192.168.0.1:192.168.0.202 nodetach local noauth nocrtscts lock user ppp connect "/usr/sbin/chat -v -t3 ogin--ogin: ppp"
I got this in response:
Serial connection established.
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS0
Cannot determine ethernet address for proxy ARP
local  IP address 192.168.0.1
remote IP address 192.168.0.202
Not sure about the proxy ARP, we'll leave that for later.

I issued this earlier, on spello:
echo 1 > /proc/sys/net/ipv4/ip_forward
I should finally have network connection on the ipaq.

Now, what this serial connection is is simply a PPP link from Spello to the iPaq. I should now log into the ipaq with ssh! I can do that from Sigillo.

Wow, it works -- I'm on.

I can now treat the iPaq as a networked machine, off of Spello. I added it's IP address to Spello's host. I can run remote-x from it, among other things. I move back to sigillo and can now control a networked ipaq from there -- as it were, from home base. Takes me a second to get used to how this stuff works. I could give Derek access to it. We could create an x-window session that runs the ipaq on the projector -- see details. Lots of fun stuff -- but first I need to get the basics working.

2003-07-05 Connecting to the Internet

The Familiar post-install instructions says I should run these:
ntpdate -b time.handhelds.org
ipkg update
ipkg upgrade
I try the first:
root@spello:~# ssh ipaq
root@ipaq's password:
~ # ntpdate -b time.handhelds.org
 5 Jul 19:58:08 ntpdate[647]: can't find host time.handhelds.org
 5 Jul 19:58:08 ntpdate[647]: no servers can be used, exiting
So it's not finding the Internet -- there may be a nameserver problem. Then I tried to update the time from Spello itself, which happens to be a time server too:
~ # ntpdate -b 192.168.0.1
 5 Jul 22:46:02 ntpdate[648]: step time server 192.168.0.1 offset 10037.005370 sec
It worked. I'm now at least on time, and can clearly connect. Problem: do I have an editor? There's a problem with the network connection still -- though I use etherape and see that the iPaq is in fact sending requests to the nameservers. However, there is no result -- lookup fails. This was also the problem with the USB connection, though here I may be a bit better off --

I'm referred to an IP Masquerading Howto. There I then learn that if you have a spare IP address on the network (which I do), I can use that! So I will assign a new IP to the iPaq:
128.97.184.92   steen8.sscnet.ucla.edu  ipaq
I'll give this a try -- disconnect the current connection, change the IP number, and reconnect. -- Well, that worked -- I now have a connection where the ipaq is on a recognized IP address.
/usr/sbin/pppd /dev/ttyS0 115200 192.168.0.1:128.97.184.92 nodetach local noauth nocrtscts lock user ppp connect "/usr/sbin/chat -v -t3 ogin--ogin: ppp"

Serial connection established.
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS0
found interface eth0 for proxy arp
local  IP address 192.168.0.1
remote IP address 128.97.184.92
And I'm pinging! I'm finally on the Internet. That took a while. So after all that I discover I don't really need any of the masquerading stuff, because I have a spare IP number!!
# uname -a
Linux familiar 2.4.19-rmk6-pxa1-hh13 #5 Mon May 12 12:06:37 EDT 2003 armv4l unknown
Ping speeds, incidentally, are worth monitoring --

2003-07-05 Configuring the system

I return to the tasks awaiting from the post-install instructions:
ntpdate -b time.handhelds.org
ipkg update
ipkg upgrade
The timeserver works -- and I check against spello to verify that we're keeping time accurate to less than one-tenth of a second.

I run ipkg update and get
Downloading http://familiar.handhelds.org/releases/v0.7/base/armv4l/Packages
Downloading http://opie.handhelds.org/feed/ipaq/0.9.3/Packages
On upgrading, I get
familiar-base_5.0-37_arm.ipk
sysvinit_2.78-4-fam11_arm.ipk
Perhaps unwisely, I say yes to replacing all the scripts and configuration files -- lots of them, including /etc/modules (moved to /etc/modules.ipkgold) and /etc/modules.conf (to /etc/modules.conf.ipkgold). I've not really used the system yet, apart from the network interface.

Those were the only updates. I then try:
ipkg install ssh
and get ssh_3.6p1-2_armv4l.ipk. It's not very verbose. Still, I can now ssh to cyberspace.ucla.edu -- I'm sitting on sigillo, recall, while ipaq is hooked up to spello via a serial cable, and I'm controlling the ipaq through sigillo's keyboard and screen to ssh to cyberspace. So now I'm controlling cyberspace through the ipaq, remotely from sigillo, through an ssh connection to spello, where the ipaq is in fact physically connected -- as if that mattered at this point.

Next, what do I want? No new opie packages? Setting the time didn't work, but then I've done that with ntpdate. I could move a timezone file over? Not sure that's set correctly on spello? I do these:
ipkg --help
ipkg info nano
ipkg status
ipkg list
The "ipkg list"  command is supposed to "List available packages and descriptions," but lists only opie-sh-hostlist and opie-today-todolistplugin. Later, when I log in again, I get the whole list -- see package list.

I issue "ipkg install nano" and get these:
libncurses5_5.3.20021109-2_arm.ipk (libncurses5 - Shared libraries for terminal handling, later removed, since I got the problems below)
nano_1.1.12-3_arm.ipk (later removed, because of problems below)
Not too bad. But when I issue "nano interfaces" I get "Error opening terminal: xterm." I try "ipkg install xterm", but it's not available. I then found that "echo $TERM" gives "xterm" and try setting
export TERM=vt100
When I now type "nano" I get "Error opening terminal: vt100", so it's clearly just looking for a valid terminal. I try leaving a blank in $TERM but get "Error opening terminal: unknown." I look around a bit, find the QTopia project, try installing bash:
bash_2.05b-5_arm.ipk (also later removed -- depends on libncurses5)
I type bash and get the bash prompt. Now, when I start a ping session, Ctrl-C doesn't work; I can't stop it. Actually, that's not the fault of bash -- I log in with another terminal and kill it. Don't know what happened to my ctrl-c there. Not sure I need bash -- all I want is a terminal editor! So it suddenly dawns on me -- vi is installed!

I make a version of /etc/hosts.ipaq and move it to the ipaq; I now have direct access to everything. I don't suppose I can mount drives :-)

I check my mail from the ipaq -- no problem. So I have vi for editing; I can probably live with that. I create a symlink from ipkg to just and issue some "just remove" -- bash, nano, libncurses5. Back to where we were, but wiser.

I get the vi Editor pocket reference out and learn ZZ is to save and exit -- I knew i was to edit. I'll be ok.

I issue "ssh-keygen -t rsa" and create RSA keys on ipaq, then copy the key manually to spello, and use ssh-copy-id -i ~/.ssh/id_rsa.pub ipaq to copy spello's key over. Note that ipaq's name is currently familiar.

I issue this:
just list rsync
opie-sh-rsynchelper - frontend to rsync
rsync - fast remote file copy program (like rcp)
If there's rsync, there might be a way of synchronizing contacts and dates. I leave it for now. I feel like trying the USB connection again.

After changing /etc/network/interfaces to one of my usual machines, and plugging it back into the usb cradle, I'm now seeing something new in Network Settings -- instead of disconnected, I now see an up-chevron and (usbf) 128.97.184.92 -- that looks promising.

However, when I try to ping, I still get a frozen ipaq. Everything just freezes. I'm still getting activity if I remove and reseat it:
Jul  5 18:23:18 sigillo kernel: usb0: register usbnet at usb-00:0b.0-1, Linux Device
So the usbnet is sort of working. I leave it for a while to see if it unlocks itself eventually.

Now, what I could do is this. Figure out which files are used for contacts, and just keep a separate list on sigillo or spello that is rsync'ed every so often. The USB is just a pain at the moment, but things may improve down the line.

Stowaway keyboard -- failure
/etc # just list | grep stowaway
opie-sh-stowawayctrl - frontend to start/stop Stowaway keyboard
stowaway-h3600 - Support for the iPAQ H3600 series Stowaway keyboard
stowaway-modules - stowaway modules for kernel 2.4.19-rmk6-pxa1-hh13
This looks promising. I now know that I can get hold of files on the ipaq, so I can also type into it. Let's get those. I get all three.

I do a modprobe h3600_stowaway, which inserts smoothly. However, I appear to have stuff from two kernels -- the module inserted to /lib/modules/2.4.19-rmk6-pxa1-hh13, while the stowaway-h3600 package appears to assume /lib/modules/2.4.3-rmk1-np2/. This package provides /usr/bin/stowd; it looks to me like I shouldn't be using it and decide to remove it.

In the /root directory I discover a postinst script; it points to another that downloads MS fonts. I ran it and got all the fonts -- I might now remove "ttf-bitstream-vera - Vera fonts.  http://gnome.org/fonts/" -- no, it's not installed.

2003-08-05 Opie 1.0, RSA, and KOrganizer

On 5 August I upgraded to the just-released Opie 1.0, which appears to be working well.

I found the KOrganizer ipkg and installed it and the alarm daemon -- so I have korganizer on the ipaq! It's just amazing how poorly documented this stuff is, and how hard it is to get the information -- the program has been available for the ipaq for a year or more already. I installed it by just downloading it to /vc , copying it to ipaq with
scp *ipk ipaq:/var/tmp
and installing it with
ipkg install korganizer_1.0.8_arm.ipk
ipkg install korganizer-alarm_1.0.8_arm.ipk
I also set up RSA keys with this command:
ssh-keygen -t rsa
and exchanged keys with sigillo and spello -- I had to do it manually from the ipaq, but used ssh-copy-id from sigillo and spello.

I then ran ./postinst to get the MS fonts -- andale32 (a monospaced font) and verdan32. Not sure how to get opie to use them.

The default name for the korganizer calendar is ~/Applications/korganizer/mycalendar.ics -- I copy the Calendar.ics file on sigillo to this default file name; it only takes up 3% of available memory.

To synchronize the calendar and the addressbook, use these scripts. I should have the calendar in place now! The rest I'll do later. Korganizer is 7 hours off, since ipaq is on UTC and sigillo is on Pacific time.

 

 

top

 

Debate
Evolution
CogSci

Maintained by Francis F. Steen, Communication Studies, University of California Los Angeles


CogWeb