Next Previous Contents

2. Preparations on your host

This chapter describes the preparations, that have to be done on your host before starting the installation of your iPAQ.The chapter Configuration of minicom should at least be read before start. The other chapters describe aspects used later in the installation process. So you can read them, when required.

There are also some subchapters regarding the network connection between host and iPAQ. Both posibbilities (ethernet via PCMCIA and PPP via serial cradle) are described.As I dont own an iPAQ with USB cradle, I can not describe it. But is should be possible to use the ppp to.

2.1 Configuration of minicom

Minicom can be called with different configurationfiles by entering minicom interface, where interface is the extension of the file /etc/minirc. E.g. /etc/minirc.ipaq0 allows me to access my iPAQ. If your iPAQ-cradle is connected to your "com1" interface, you can use my file ipaq0 and modify to your requirements (e.g. PATH-names). Here it is ..

        # Machine-generated file - use "minicom -s" to change parameters.
        pr port             /dev/ttyS0
        pu baudrate         115200
        pu minit            ^M
        pu mreset
        pu updir            /usr2/sc1/downloads/familiar-0.5
        pu downdir          /usr2/sc1/ipaqscripts
        pu rtscts           No
        

The file-transfer-method rzsz

To transfer files from and to the iPAQ, the familiar installation uses the xmodem method minicom provides. To transfer your personal files, you should use the zmodem method. This section describes, how that works.

Advise !!!
The xmodem method works the same way, than zmodem, but uses a different protocol. You can use this section as a documentation for xmodem either.

To transfer data from/to the iPAQ, the download-path and upload-path should be configured correctly to your hosts requirements.

To transfer data from your iPAQ, just enter sz filename, The file is transfered to the download directory.

Attention !!!, if the destination file already exists, the transfer is not done, you get an error. So remove files from your download-directory, before using sz.

To transfer files from your host to the iPAQ (rz-method), follow the steps described below:

Attention !!!, if the destination file already exists, the transfer is not done, you get an error. So remove files from your ipaq-directory, before using rz.

Load files or missing packages from your own host

If the network is not yet up, you can use the rzsz-method to load files from and to your host. This section describes, howto install packages from your host.

This is necessary, when you have a running system, but no network access (e.g. in familiar-0.5 the XIRCOM PCMCIA driver is missing in the standard package). In this case you have to install it manual, to get network access.

Load the required package from the internet to your host and send it to the iPAQ via rzsz method using the zmodem protocol. Once there, install it using ipkg install any-package-abc.ipk. The .ipk extension is important.

2.2 Network preparations on your host

This section describes, howto prepare your host for external network access. This feature is needed as long as your iPAQ has no direct network access (via a modem card, etc ...). As this is normal, the host has to allow access via the hosts internet connection.

This can be done by using either a PCMCIA network card or by using the ppp protocol. Both methods are described in the following sections.

How to connect your iPAQ to the host via PCMCIA-network

First of all your host should have a network card with the appropriate network medium (cables, hub, accesspoint, e.g.). Your host should have the ipaq entered into the /etc/hosts file. I use the host-name "ipaq".

Follow the advises in PCMCIA-installation on the iPAQ, to setup your iPAQ.

How to connect your iPAQ to the host via PPP-network

If you dont have a PCMCIA-possiblility (Backpaq missing, no running PCMCIA-card), you will need an alternative method. You are lucky to be able to use a ppp connection as if you had an ethernet. This paragraph describes how to setup the hosts as well as the iPAQ for ppp connections.

Download the ppp-ipkg to your iPAQ using the rzsz method and install it. From Kernel 2.4.7 on, you also need to install the kernel ppp-modules (ipk). (I dont know on which kernel this was used as modules. Maybe you have to load this ipkg also for older kernels).

Enter the iPAQ via minicom and follow the instructions below.

Log off the iPAQ and prepare things on the host.

Now you should be able to connect to the iPAQ. For this make sure, that the minicom and all other serial connections to the iPAQ are terminated, become root and enter pppd call ipaq.
A successful connection will report local and remote IP Addresses.

Try to ping the ipaq using ping ipaqs where ipaqs is the hostname in your /etc/hosts file with the IP-address 192.168.76.2.

I hope you have success !!. If yes, you can use all network commands supportet by the ipaq like ssh, scp, etc... using the ipaqs address.

How to setup your host as a timeserver for the iPAQ

Edit your /etc/rc.config file and set START_XNTPD to yes. After your host is restarted, the timeserver is up and can be used from the ipaq.

You can synchronise your hosts time with ntpdate clepsydra.research.compaq.com when the ntpdate package is installed and the host is connected to the internet.

As long as the ntpdate package is installed on the iPAQ, the time can be set by calling ntpdate yourhost on the ipaq.

NOTE!
this should be done as soon as possible during the installation process, to have the correct time set for the installed files.

Use your host as a http server for ipaq

It is also nice to download the packages to your host and load them from there using the http protocol (ipkg install). In this case, you dont have to pay the internet connection, when you have to reinstall your iPAQ (This will happen, believe me :( ). To load a ipkg-page completely to your host see Grab ipkgs

Your host has to run e.g. an apache httpd-server. The installation works out of the box with the SuSE system.

Restart the server using /usr/sbin/apachectl restart as superuser. Try with your internet-browser "http://localhost/". The Server shows you an example page (localted in /usr/local/httpd/htdocs/index.html).

If you want to run your server only for the iPAQ usage, you can change the following entry in the /etc/httpd/httpd.conf file.

DocumentRoot="/where/your/download/directory/is"
<Directory "/where/your/download/directory/is">

In this case the standard directory of your apache is the DocumentRoot directory. Make sure, that the complete path (e.g. to /home/your/downloads) has execution rights for user, group and others. Otherwise, you will have an error 403 (permission denied) when accessing the download dir.

Your browser request "http://localhost/" should now show you the index.html file found in the directory, or the list of available files and directories.

Try "cd /tmp;wget http://localhost/anyfile" in your terminal now. You should see the wget transfer printout and the result should be a copy of /where/your/download/directory/is/anyfile in the /tmp directory (of course anyfile has to exist).

If that runs, everything is fine. You can follow the advises in the next chapter to setup the iPAQ correctly.

If you want to start the apache at boot-time edit the /etc/rc.config-file and set START_HTTPD to yes.

Extend your hosts apache server for ipaq and others

In case you wnat to extend the existing apache server adding directories to your DocumentRoot (see above), you can set symlinks to that dirs into the existing DocumentRoot dir. Additionally, you have to allow SymLinks to be followed.

Assuming you have the standard SuSE apache installation, you will find the following entries.

DocumentRoot="/usr/local/httpd/htdocs"
<Directory "/usr/local/httpd/htdocs">

Change directory to there and create a symlink (e.g. my download dir)

ln -s /home/sc1/downloads downloads"

there. Make sure, that either /home as well as sc1 and downloads have min. execution flags set chmod 711 (or 755) for user, group and others. Change the http.conf file line (next to <Directory "/usr/local/httpd/htdocs"> from

Options Indexes -FollowSymLinks +Includes MultiViews
to
Options Indexes FollowSymLinks +Includes MultiViews

This allows apache to follow symlinks from the Document root dir. Restart the server using /usr/sbin/apachectl restart as superuser.

Your browser request "http://localhost/downloads" should now show you the index.html file found in the directory, or the list of available files and directories.

Try "cd /tmp;wget http://localhost/downloads/anyfile" in your terminal now. You should see the wget transfer printout and the result should be a copy of /home/sc1/downloads/anyfile in the /tmp directory (of course anyfile has to exist).

If that runs, everything is fine. You can follow the advises in the next chapter to setup the iPAQ correctly.

If you want to start the apache at boot-time edit the /etc/rc.config-file and set START_HTTPD to yes.

Security warning

Attention
You should use a firewall resticted to nearly no possiblities on your external network. Otherwise the apache is running as a www-server also for the internet. If someone gets your hosts IP-address, he can do bad things on your host.

Grab a complete ipkg-directory from the internet

As the ipkgs are stored on a http page and wget does not support wildcards on http files, I have written a shell- and a perl-script that allow to download a complete ipkg page. Both can be found in the script download tarball in directory grab.

I will explain the scripts using and example. We want to download all package files from qpe.sourceforge.net/packages/ipaq/unstable.

The script gtallipk.rc takes three arguments and executes the perl-script. The arguments are

The script gets the file PFILE via wget and starts the perl-script, which creates a new scriptfile getall.rc by filtering the filenames out of the Packages-file and adding the required commands around. In a third step this new script is executed. All files are transfered from the internet.


Next Previous Contents