BACK
Apmd
Echos
Index
Latitude
Lifebook
Lifebook2
Linux
Revo
Swsusp
Psion Revo connecting with Linux

Connectiong a Psion Revo+ with Linux

As usual, the following informations are provided as is, with no warranty of any kind. Use this at your own risk.

I have a new computer in my family: a Psion Revo... This page describes how I make this handheld device dialoguing with my linux box. It covers both infrared and serial communication.

I will continue to maintain this page if I discover improvements in linux configuration.

The following should also work with other Psion devices. Some ideas may also work with other handhelds such as Palm, Visor, Ipaq, etc...

Preparing the hardware

For serial connection, be sure that it is physically established. If you have dual boot, try to synchronize with the Psion (it may be even more difficult to configure as linux ;-) or at least check that the green led on the psion lights up when on docking station with AC adaptator plugged into the serial socket.

You must be absolutely certain of the serial devices you use while connecting your Psion to the linux box. Do NOT trust windows if you have dual boot on your computer, since linux can configure the serial ports in a different way. For instance, on my new laptop I have windows that use port COM4 where linux configures it as /dev/ttyS0. Type dmesg and see what serial devices are configured. On a laptop you will probably have the serial port configured on the first serial device and the second one on the infrared device.

Serial connection

I use the plptools package. There is another project with similar functionnalities called psilin that should also work, but as it is developped on Psion3 target, I haven't tested it.

I use SuSE 7.2 and a plptools package is included. It works but I have downloaded the 0.10 version as a binary rpm from this page. As I don't use kde, I got only the plptools-0.10-1.i386.rpm package. This rpm is packaged for a redhat distribution and I use SuSE 7.2. Hence, the startup script "psion" was inserted in /etc/rc.d/init.d and was not functionning. So I wrote one and added some configuration variables in /etc/rc.config:

#
# The variable START_PSION launches the nfs-like psion server
#
START_PSION=no
#
# The variable PSION_USER can be set to a username if the files
# must be mounted with this user
PSION_DEVICE=/dev/ttyS0
#
# The variable PSION_USER can be set to a username if the files
# must be mounted with this user
PSION_USER=florent
If you want the script to be run automatically at boot time, you'll have to set START_PSION to yes and put in /etc/rc.d/rc3.d and /etc/rc.d/rc5.d symbolic links to psion script.
cd /etc/rc.d/rc3.d
ln -s ../psion S99psion
ln -s ../psion K01psion
cd ../rc5.d
ln -s ../psion S99psion
ln -s ../psion K01psion
You now have to create a /mnt/psion directory.

On the revo now, don't forget to enable the connection by cable. As I have a french version of the revo, I only guessed the corresponding translations but you should find the related configuration panel in the System (Système) application. Use the Tools (Outils) menu, "Distant link" (Liaison distante) item and make link setting to "Cable" (Câble) and speed to 115200 (don't forget to click OK like me :-). This must be done almost everytime since an internet connection turn this to disabled.

After that, it should work...

root:~ # /etc/init.d/psion start
Starting psion: Owner set to florent.users
                                                                     done
root:~ # df /mnt/psion
Filesystem           1k-blocks      Used Available Use% Mounted on
localhost:/psion         20476     14556      5920  72% /mnt/psion
root:~ # ls -al /mnt/psion
total 6
dr-x------    5 florent  users         512 Nov 25 18:43 .
drwxr-xr-x    4 root     root         4096 Nov 23 23:40 ..
drwx------    8 florent  users         512 Nov 25 18:43 C:
dr-x------    3 florent  users         512 Nov 25 18:43 Z:
drwx------   13 florent  users         512 Nov 25 18:43 proc
root:~ # /etc/init.d/psion stop
Shutting down psion                                                  done
root:~ # ls -al /mnt/psion
total 8
drwxr-xr-x    2 root     root         4096 Nov 23 23:40 .
drwxr-xr-x    4 root     root         4096 Nov 23 23:40 ..
If it doesn't work, try to check the following:
  1. The ncpd daemon simulates an nfs server, so you must have nfsd enabled in your kernel or loadable as a module.
  2. NFS needs portmap to run, so you should set START_PORTMAP="yes" in the /etc/rc.config file or start portmap manually /etc/init.d/portmap start.

When mounted, your Psion is seen as a filesystem. You can copy files from or to the Revo, unzip files directly in the Revo, etc.

Infrared connection

With SuSE comes an irda package that includes an irpsion5 utility. Once the infrared device properly configured you will be able to beam files in the psion by "irpsion5 -s file" and retrieve file from the psion by "irpsion5 -r". This will work whatever you have sent (e-mail, contact...) but will be saved as a file.

Connecting a Psion to the internet through a linux box

Principle

The Psion is designed to connect directly to the internet using an external modem. But you may as well connect it directly through your network. In order to do this, you will need to have your linux box act as a router for your Revo as shown below. Your linux box will receive packets from the REVO and masquerade them so that the REVO will be invisible from the outer LAN. In order to do this you must have advanced routing features enabled in your kernel.

Setting the serial connection

Configuring the Revo

This is the easy part of the stuff. The most difficult thing is to obtain that the Revo doesn't try to dial a phone number :-(

You should use the System (Système) application, Tools (Outils) menu, Configuration item. Launch the Internet configuration wizard and follow these steps:

  1. Create a new internet service by presing the New (Nouv.) button.
  2. Base your new service on standard parameters (Paramètres standard).
  3. Service:
    • Choose a name.
    • Select direct (Directe) connection.
  4. Account (Compte): select manual connection (Connexion manuelle)
  5. Adresses:
    • Check the automatic IP configuration (Obtenir adresse IP du serveur).
    • Uncheck the automatic DNS configuration (Obtenir adresse DNS du serveur) and manually set the IP adress of your DNS. You can find it in the /etc/resolv.conf file.
  6. Connection:
    • Check the use script (Utiliser script) option.
    • Edit script as follows:
      ! Generic script for direct connection to internet
      start:
      success:
          EXIT
      

Configuring the linux box

There is only one command to run as root:
pppd /dev/ttyS0 115200 192.168.5.1:192.168.5.2 local noauth
But if the access rights on the device are set accordingly, you can also type as user:
pppd /dev/ttyS0 115200 192.168.5.1:192.168.5.2 local
Of course, you have to put the right name as serial device. You should see something as follows (if debugging mode is enabled):
user:~ # pppd /dev/ttyS0 115200 192.168.5.1:192.168.5.2 local debug nodetach
Perms of /dev/ttyS0 are ok, no 'mesg n' neccesary.
using channel 8
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS0
sent [LCP ConfReq id=0x1    ]
sent [LCP ConfReq id=0x1    ]
sent [LCP ConfReq id=0x1    ]
sent [LCP ConfReq id=0x1    ]
sent [LCP ConfReq id=0x1    ]

Testing the link

In order to test the link you can use apache on your linux box. Launch it by /etc/init.d/apache start if it isn't running.

Now run your EPOC preferred web browser Opera and try yo open http://192.168.5.1/ The internet connection window should pop up. Choose the internet service you have just configured and click on OK. On the linux box you should now see the connection establishing

sent [LCP ConfReq id=0x1    ]
sent [LCP ConfReq id=0x1    ]
sent [LCP ConfReq id=0x1    ]
rcvd [LCP ConfReq id=0x1    ]
sent [LCP ConfAck id=0x1    ]
sent [LCP ConfReq id=0x1    ]
rcvd [LCP ConfAck id=0x1    ]
sent [LCP EchoReq id=0x0 magic=0xc452eb08]
cbcp_lowerup
want: 2
sent [IPCP ConfReq id=0x1  ]
rcvd [LCP EchoRep id=0x0 magic=0x640702fd]
rcvd [IPCP ConfReq id=0x1     ]
sent [IPCP ConfRej id=0x1    ]
rcvd [IPCP ConfRej id=0x1 ]
sent [IPCP ConfReq id=0x2 ]
rcvd [IPCP ConfReq id=0x2 ]
sent [IPCP ConfNak id=0x2 ]
rcvd [IPCP ConfAck id=0x2 ]
rcvd [IPCP ConfReq id=0x3 ]
sent [IPCP ConfAck id=0x3 ]
local  IP address 192.168.5.1
remote IP address 192.168.5.2
Script /etc/ppp/ip-up started (pid 4887)
Script /etc/ppp/ip-up finished (pid 4887), status = 0x0
sent [LCP EchoReq id=0x1 magic=0xc452eb08]
rcvd [LCP EchoRep id=0x1 magic=0x640702fd]
sent [LCP EchoReq id=0x2 magic=0xc452eb08]
On your Psion the homepage of apache should appear. On the linux box typing ifconfig should show a ppp section like this one:
ppp0      Lien encap:Protocole Point-%/1€Œiso8859-15à-Point  
          inet adr:192.168.5.1  P-t-P:192.168.5.2  Masque:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:71 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:3 
          RX bytes:4083 (3.9 Kb)  TX bytes:67587 (66.0 Kb)
And the routing table will have a line liket this:
192.168.5.2     *               255.255.255.255 UH    0      0        0 ppp0
Don't try to surf at this point, as the apache server will return its true IP adress and you will not be able to get pages before the following step.

If you can't establish the connexion, double-check that your connexion link is not activated in System : menu Tools/Connexion link (Système : Outils/Liaison Distante).

Setting the router

This is the easier part of the whole stuff ;-)

Although I use a 2.4 kernel with iptables new routing command, I prefer to explain the masquerading stuff using old 2.2 ipchains rules. This way, 2.2 users will be able to configure their box, and 2.4 users can load the ipchains backward compatibility module.

To test the configuration, one can use the gfcc program (sec section for SuSE) which is able to interact with routing chains in the kernel. If you have already a personal firewall runing, then you must be careful with chains managing, but you should know what to do :)

The first thing is to enable IPv4 forwarding on the linux box:

echo 1 > /proc/sys/net/ipv4/ip_forward
By default, all chains should be in accept mode, so that the following commands should not be necessary:
ipchains -F input
ipchains -P input ACCEPT
ipchains -F forward
ipchains -P forward ACCEPT
ipchains -F output
ipchains -P output ACCEPT
To mascarade your Psion IP packets to the out world, just type
ipchains -A forward -i eth0 -s 192.168.5.2 -d 0.0.0.0/0 -j MASQ
This means to mascarade all packets with source destination from 192.168.5.2 IP address that are to go outside by the eth0 interface. Of course, if your outside connection is by modem, you probably have to put ppp1 or ppp0 instead of eth0.

If you are behind a firewall, the connection may or may not be established, because masquerading changes the emission port to something above 61000. If your firewall does not allow such connection from the inside world, it will be impossible for you to use this method. In such a case, you will have to reconfigure your personal firewall.

Using infrared connection

All this stuff works with infrared connection by changing the serial device to infrared one /dev/ircomm0 in the pppd command. On the Revo you have to select mobile phone connection instead of direct cable.

TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones

BACK
Apmd
Echos
Index
Latitude
Lifebook
Lifebook2
Linux
Revo
Swsusp

Florent Chabaud
E-mail: florent.chabaud@m4x.org
GPG key: KEY