Next Previous Contents

9. Using Your New System

9.1 Mounting /proc and Compactflash Partitions

9.2 The Keyboard and Setting Keys

9.3 Setting the Font

9.4 Setting Framebuffer Depth

9.5 Pointers and Things that Work

    RESET. The screen can be refreshed by typing "reset". A "reset" can sometimes be very effective at curing what ails your psion.

    BC/DC. bc is a simple line calculator type thing - try man bc. dc is similar, but more reverse polish like. Calculate pi to arbitrary many decimals; if that isn't useful, what is?

    EDITORS. In the editor department, PsiLinux is still rather limited. vi (vim) certainly works, as does zile, a slimmed-down emacs clone (emacs itself could be installed, if you wanted to use the diskspace for it). However, the touchscreen is does not work for any of the console editors, so you can't point and click your way along with an editor. X is now supported supported, however, together with the touchscreen and all of the X applications, including more advanced editors.

    COMPILERS. The *.deb files for the compilers gcc, g77 can be installed and they work o.k., although a little slowly. You need available disk space to install these.

    REBOOTING. One can now easily reboot the psion without having to use the paper clip to press the secret button for a hard reset. "Ctrl Menu Del" or shutdown -r now will both probably work, and properly (maybe... at least it can be set up to work properly) shutdown the linux system. NOTE that you will lose everything from memory on the EPOC side of things - all of your set up parameters, serial port settings, the date and time, etc.

    USING LYNX. lynx, a simple terminal-based web browser, seems to be set up to use colors which are not available for the psion. I tried to set things up in /etc/lynx.conf so that the colors are black and white. You can also change the frame buffer color depth to "mono" using fbset -a mono. lynx may work better with mono. You can browse www.nytimes.com and download a package or two from ftp.debian.org. Also check out: The BBC News PDA Page. Also check out the browsers that work in X.

    X. The X window system can now be installed on the 5MX - see the section on this installation. Installation of X brings with it all of the X applications.

    PRINTING. There is nothing to stop you from installing the lpr package, setting up the PPP network connection to the desktop computer (see below), and then setting up network printing through the desktop. This will require running the lpd printer daemon, and setting up the /etc/printcap file. With this you can print from your psion to the printers that are connected (local or network) to your desktop computer.

    However, a simpler way to print a file is: dd if=filename | rsh desktop 'lpr -'.
    Perhaps better for a 115200 baud connection: gzip -c filename | rsh desktop 'gunzip -c | lpr -'
    Or perhaps gzip -c filename | rsh desktop 'gunzip -c | enscript --filter-stdin=-' (and so forth...).

9.6 Serial Connections: Wire and Infrared

    Connections to both a modem using PPP, or to the desktop computer using minicom, seem to work fine (115200 baud). The serial port is /dev/ttyAM1; it works just like any other serial port.

    The IR serial port also works; one can communicate back and forth via minicom, and set up a PPP connection over this port to e.g., a notebook computer. You can then rcp files back and forth out of thin air! Woohoo! There seems to be some confusion about which port the IR is - I was successful only when using /dev/ircomm0. 115200 baud is, of course, preferred.

    The PPP configuration can be made following the description of PPP given below.

    To enable the infrared connection, one executes irattach /dev/ttyAM0 -s 1 on the psion, and irattach /dev/ttyS1 -s 1 on the other machine (if ttyS1 was recognized at boot up of the notebook computer as the IR device). There is also likely to be a /etc/init.d/irda startup script on the notebook computer that you could use. The -s 1 flag enables system logging. Even though ttyAM0 or ttyS1 are used to make the IR attachment, /dev/ircomm0 is still the serial port to use on either notebook computer or psion. The command irdadump, which is a standard tool, can help in debugging the connection - it will show, at the lowest level, when the remote IR signal is picked up or not. NOTE that the use of IR is meant to consume a considerable amount of power; turn it off by killing the irattach process when it is not in use.

    The serial connections, PPP, and rsh involve running a getty on the serial ports, either on the notebook or on the psion. getty 115200 /dev/ttyAM1 or getty 115200 /dev/ircomm0 on the psion, or agetty 115200 /dev/ttyS0 or agetty 115200 /dev/ircomm0 on the remote computer. These getty's are probably best started up in the /etc/inittab file, because they need to be "respawned". You can restart init so that it rereads this file without rebooting by "init q".

    Some distributions come with gsmlib, that allows you to send SMS and manipulate your cell phone phone book. For more information about gsmlib see: http://www.pxh.de/fs/gsmlib/.

    For real amusement, it may be possible that the IR and normal serial connections can be bound together as one in order to double the bandwidth of the serial connection. See the IR HOWTO (and let us know if you got this to work!).

9.7 Setting up PPP

    This subsection contains two sub-subsections on
    1. CONNECTING THE PSION TO THE DESKTOP
    2. CONNECTING THE PSION TO THE INTERNET USING AN EXTERNAL MODEM.
    Read the Linux PPP howto: http://www.linux.org/docs/ldp/howto/PPP-HOWTO/index.html.

    There is also helpful documentation about Ipaq PPP at: http://ipaq.secret.org.uk/.

    1. CONNECTING THE PSION TO THE DESKTOP

    As an example, PPP can be configured with telnetd. However, rsh may be preferable to telnet, because then you can efficiently copy things between the psion and desktop using rcp. Install the rsh client and servers if you want rsh; rsh is preferable to ssh for psion-computer connections because it does not have the overhead of ssh encryption. [NOTE: installing packages with shells, daemons and so on with dpkg, will sometimes make a directory /etc/pam.d; you are to delete this directory, because if it exists you will not be able to login!! Boot to single user mode if you forget, and delete the directory.]

    To connect your Psion to your computer:

    Have something like this for the /etc/ppp/options file on the Psion:

      -detach
      defaultroute
      noauth
      nocrtscts
      lock
      lcp-echo-interval 5
      lcp-echo-failure 3
      /dev/ttyAM1
      115200

    (or use /dev/ircomm0 for IRDA)

    Then add the ppp user to your Psion's /etc/passwd file:
    echo "ppp:*:101:101:PPP User:/etc/ppp:/usr/sbin/pppd" >> /etc/passwd

    And make sure pppd is executable for user ppp:
    chmod a+x /etc/sbin/pppd

    To get telnetd running, add the required entry to the /etc/passwd file:
    echo "telnetd:*:101:101::/usr/lib/telnetd:/bin/false" >> /etc/passwd

    Then add the telnetd entry to the /etc/inetd.conf file:
    echo "telnet stream tcp nowait telnetd.telnetd /usr/sbin/tcpd \
          /usr/sbin/in.telnetd" >> /etc/inetd.conf

    You will need to run a getty on e.g., /dev/ttyAM1 to enable logins to the Psion by telnet or ppp. The getty gives you the login prompt when you connect over the serial port. The command getty 115200 /dev/ttyAM1 - or /dev/ircomm0 - will start a getty on the serial port. It may be preferrable to start the getty on the serial port in the /etc/inittab file.

    Finally add your computer's PPP IP address to /etc/hosts on the Psion to make telnet login happen faster:
    echo "# This makes the telnet login to psion faster
    192.168.1.100 gateway" >> /etc/hosts


    On your desktop computer have something like this for a /etc/ppp/peers/psion file:
      -detach
      noauth
      nocrtscts
      lock
      local
      connect '/usr/sbin/chat -v -t3 ogin--ogin: ppp'
      /dev/ttyS0
      115200
      192.168.1.100:192.168.1.101

    Then just type pppd call psion on your computer to connect to Psion. [You may prefer to start up the ppp connection from the psion, rather than from the desktop computer - but that might not be a security risk you want to take.]

    To access the internet from your Psion through the desktop computer, you need to add routing, masquerading, and NAT [I don't know what these are either...but it works, so who am I to complain?] to your desktop:
    echo 1 > /proc/sys/net/ipv4/ip_forward
    iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE

    then you can browse the internet from your psion using dillo or lynx. Be aware that your desktop kernel must be compiled to support these things; default RedHat kernels support this.

    2. CONNECTING THE PSION TO THE INTERNET USING AN EXTERNAL MODEM

    Either a standard external modem or an external infrared modem (e.g., Psion's nifty external travel modem - the Diamond Mako travel modems are apparently identical to the Psion travel modems) will work for using your psion to connect to the internet over the telephone lines.

    With its installation via dpkg (or ipkg?), PPP is pretty much all set up and ready to go with an external telephone modem. Edit the files /etc/chatscripts/provider, /etc/ppp/peers/provider, and /etc/ppp/pap-secrets to include your own ppp information, or run the script pppconfig, which should come with PPP. PPP is started and stopped using pon and poff. (I made a script "ppp-on" that starts pon, dumps its messages to /dev/null, and puts it in the background.) You may also need to modify the /etc/resolv.conf file, to give your nameserver IP numbers. You might be able to pick up an infrared Psion (or Diamond Mako) travel modem from ebay.com for US$55-US$70); it works just fine in PsiLinux with very little fuss - relink /dev/modem to /dev/ircomm0 and use baud rate 115200.

9.8 /etc Adjustments

    Most of the configuration of linux is set up in the /etc directory. Be sure the /etc/pam.d directory does not exist, or you will have to use a password. Check out your /etc/rc.d and /etc/inittab files. Also cron files are there; cron works fine, assuming your clock is set correctly. You may also have a /etc/halt file that gives to procedure for shutting down the system.

9.9 Keeping Time between Reboots

    N.B.: This section is made out of date with the later kernels that support the hardware rtc.

    The resetting of the clock with every reboot is particularly annoying. With every reboot the psion's time get sets back to 1 January 1999 at 5 pm. There might be a way of writing the time to a file that would be written at shutdown and read at boot up by both the psion and linux; you might lose a few seconds with every reboot, but that would not be too bad. Work is in progress on this issue. You can read some notes on this subject, including a crude system for keeping track of the time when rebooting between EPOC and linux at this timekeeping page. The page includes a couple of OPL programs for writing system time to a file in EPOC, as well as setting the system time from a file. There is also an awk script that will let you set the linux system time interactively, rather than try to remember the esoteric date format.

9.10 Installing New Packages

    New *arm.deb or *.ipk packages can be installed on your psion, depending on if your system is based on dpkg or ipkg. So if you want to install the package mdate_1.0.1-3.deb [a utility for reporting Mayan dates] first get the package from debian.org, making sure it is an ARM binary, copy it to the psion, and execute dpkg -i mdate_1.0.1-3.deb. Remove it by dpkg -r mdate. In some cases, the distribution builder has hacked out large elements of the dpkg system to better compact the distribution, and dpkg will complain, sometimes failing to install things altogether, or installing the binaries but failing to configure things. In the former case, you can manually make whatever file or directories are missing and try to procede that way (i.e., put on your hacking cap.) In the latter case, you have probably successfully installed the binaries, so what are you complaining about? dpkg will also install a great deal of metadata - you may want to find this stuff and delete it to save on disk space.

    Distributions based on "Debian Woody" are also "testing" distributions, and so some installations will fail because elements of the distribution (e.g., the libc library) are old. In that case, you have to go about installing or updating the missing elements. Updating can be like a plate of spaghetti. But it also may be a piece of cake.

    In most cases, however, new packages will install with little trouble.

9.11 Sound support

    The psilinux kernel now supports a minimal sound support, although it seems to need some additional development. The development is needed either in the driver for sound or in other aspects of the kernel (floating point?). Sound can be played on the psion, and it will be recognizable/audible/ discernable, but there seems to be considerable distortion. The sound device is /dev/dsp. Ordinary *.au files can be played by "cat file.au > /dev/dsp". The use of a mixer is not yet supported.

    Recording is not yet supported (except in EPOC, of course).

    A better bet for playing sound is to install the sox package, which has the command "play", so that "play file.au" will play the file. The psion's sound system is rather limited, of course, only supporting sampling of up to 8kHz. Sound files native to the psion can also be played - they are "*.al" files, so that "play -t al psionsoundfile" will play them. So you could record sound under EPOC, and then play them back under psilinux without trouble. Presumably, once recording is working in psilinux, the "rec" command from sox will allow recording of sound.

    There seems to be some problem with sound files having to do with either the processing capabilities of the psion cpu or the floating point emulation. Technically one should be able to play *.wav files, for example, with "play file.wav". However, the psion seems to be incapable of doing the conversion of *.wav files to play them. Further, "sox file.wav file.au" will fail to convert the *wav file to *.au file, even for very small *.wav files - the psion will go into overload trying to do the conversion ad infinitum (or until ^C is hit). Thus, some of the problems with psilinux sound may not be entirely due to the sound driver.

    The psilinux kernel is very close, if not there, to being able to be put in sleep mode and having a daemon running (an ipaqalarm/uschedule system) that will cause the psion to wake up and play a sound, e.g., for a morning alarm.



Next Previous Contents