home *** CD-ROM | disk | FTP | other *** search
- INTRO
- This package lets you mount the psion drives on your unix workstation
- over a serial cable. You can access all the files from the psion with
- the usual commands like tar, cp, vi & co.
-
- The Psion client is capable of terminal emulation (vt100/vt220 with
- function key support) and it is fully functional without the Unix daemon.
- New in Version 4.3:
- - Fix for Linux 1.3.99
- - Function key support for the terminal emulator.
- In fact you can remap all your keys.
-
- License: GNU General Public Licence (Version 2)
-
- You have to be root in order to start the Unix program because it uses
- the mount systemcall.
- The current version was tested on SunOS 4.1.3, 4.1.4, 5.5, Irix 5.3 and
- Linux 1.2.13, 1.3.99
-
- Author: Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de)
- Linux port by Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de),
- with help from Lee McLoughlin and others.
- Many thx to N.N., who returned test reports faster than we could compile.
- IRIX port and many changes by Michael Schroeder. He is not (yet?) a Psion
- owner.
-
- CORRECTION:
- p3nfsd is not really an nfs daemon. You can't mount the psion from
- another workstation, only from the one, where it is attached to via
- the serial cable. I used nfs, beause it is a portable way to capture
- filesystem operations in a program. The daemon talks to the opl/c
- program on the psion through a simple protocol.
-
- COMPILING / INSTALLING:
- First:
- Make sure you know which operating system you are using:
- % uname -a
-
- As the program depends on hardware flow control, you may need OS patches.
- It's quite sure that won't get a correct transmission without proper
- hardware flow control.
-
- Please check out the following list and verify, that you have the patch
- installed. It is a good idea to search for newer patches.
-
- Supported Architectures:
-
- - SunOS 4.1.3
- jumbo-tty patch from Nov 93, id 100513-4 is needed.
- - SunOS 4.1.3_U1:
- kernel patch 101621-02 'Jumbo tty patch',
- available at the archive under pointer
- http://src.doc.ic.ac.uk/sun/sun_fixes/sunos4.1.3_U1/101621-02.tar.Z
- (reported by Oliver Meis (eedolm@aachen.ericsson.se))
- - SunOS 4.1.4
- I don't remember patching my machine, and it works quite well.
- - Solaris 2.3/2.4/2.5
- Use showrev -p to show the patches installed.
- Solaris 2.3: patch 102028-01 (Sept. 94) for RTS/CTS is needed.
- (If somebody needs the patch, and has NO other way to
- find it, ask caronni@tik.ethz.ch)
- Solaris 2.4: patch 102029-01 _or_ 102845-02 (both of them fix RTS/CTS)
- 102029 should work, not tested
- 102845 is newer, the README confused me, but works (tested)
- Solaris 2.5: You don't need any patches, as the RTS/CTS patch was finally
- included
- - Linux works without patches
- - IRIX 5.3 should work without patches
-
- Compile nfsd
- % cd nfsd
- Uncomment the appropriate Makefile settings:
- % vi Makefile (you can use other editors too :-)
- If you don't see any lines for your OS, then you can go now to
- the chapter PORTING, or free up some disk space.
- Next check if you like the defaults
- % vi ../include/config.h
- and compile it
- % make
- If you want to run it as non-root:
- # chown root /usr/local/bin/p3nfsd
- # chmod 4711 /usr/local/bin/p3nfsd
- It should be safe to run p3nfsd 4.2 as setuid root, unlike the previous
- versions.
-
- nfsc4
- Note for S3 owners: I only tested it on my S3a in compatibility mode.
- Some menu entries use shifted accelarators, this entries can only
- called via the accelarators.
- - If you have the Psion C SDK
- In the nfsc directory, from the dos prompt:
- C:\SIBOSDK\NFSC> makeshd nfsc
- C:\SIBOSDK\NFSC> tsc /m nfsc
- C:\SIBOSDK\NFSC> ren nfsc4.img nfsc4.app
- - If you don't have the SDK you have to use the supplied nfsc4.app or
- use the opl versions.
- - If you do not need the terminal emulator, you can use nfscnovt.app,
- it's only 9k instead of 19k.
-
- nfsc.opl
- The opl programs are in the nfsc directory.
- Note: there is an S3 version with no uadd in it.
- Translate it on your psion. (Psion T in the Program editor)
- A big advantage of the opl version that you can't set the serial
- line parameters, and its 2k compiled instead of 17k.
-
- Setting up the mount directory:
- # mkdir /psion.stand
- # mkdir /psion.stand/mnt
- # cd /psion
- # ln -s mnt/loc::a: a
- # ln -s mnt/loc::b: b
- # ln -s mnt/loc::m: m
-
- BOOTSTRAPPING:
- (i.e copying nfsc.opl or nfsc4.app the first time to your psion)
- You are here on your own.
- You either have to use an existing method (PC, old nfsc, your friends SSD)
- or you have to type in the opl program. (If somebody done the last one,
- should mail me, she/he receives a free copy of p3nfsd :-)
-
- STARTING IT:
- First: Make sure the Serial Link is connected both to your unix machine
- and to your psion.
-
- There are two basic ways of starting it, with or without the unix
- getty/login occupying the serial line.
-
- 1.Without the getty/login:
- Make sure there is no getty running on the port:
- SunOs 4.x: edit /etc/ttytab, set status to "off", wake up init: kill -1 1
- Verify that the serial port has the softcarrier enabled. See
- man ttysoftcar(1). This is only important if you plan to (or
- not plan to but do) start the p3nfsd without a psion attached.
- Solaris 2.x: disable the port with the admintool/serial port manager
-
- If using nfsc4, start it and set following parameters:
- Serial Line->Parameters: Baudrate: 19200
- Databits: 8
- Stopbits: 1
- Parity: none
- Ignore parity: no
- Serial Line->Handshaking: Hardware
- Nfsc->Nfsd support: Terminal + New p3nfsd
- If using the opl client: You can't confuse anything on the opl client,
- so just start it.
-
- On the unix machine type:
- % p3nfsd -h (to see the options you can choose from)
- % p3nfsd
- or if using an opl client
- % p3nfsd -oldnfsc
-
- 2.With the getty
- Make sure the getty is running. SunOs: the softcarrier has to be enabled
- here too. IRIX: Please use ttyf? instead of ttyd? for flow-control.
- a. Log in.
- Start nfsc, and set the correct serial line parameters:
- Following works for a SunOs 4.x (Solaris 2.x) default setting.
- Serial Line->Parameters: Baudrate: 9600
- Databits: 7 (8 for Solaris 2.x)
- Stopbits: 1
- Parity: even (none for Solaris 2.x)
- Ignore parity: yes
- b.We now have to set the correct parameters for the nfsc/nfsd communication.
- Each parameter is to set both on the psion and the unix host!
- Following settings are required:
-
- change the baudrate if you wish:
- unix: stty <baudrate>; nfsc Serial Line->Parameters->Baudrate
- no parity unix: stty -parenb; nfsc Serial Line->Parameters->Parity:none
- 1 stopbit unix: stty -cstopb; nfsc Serial Line->Parameters->Stopbits: 1
- 8 databits unix: stty cs8; nfsc Serial Line->Parameters->Databits: 7
- Hardware flow control
- unix: stty crtscts,
- nfsc Serial Line->Handshaking: Hardware
- This changes are better made in the "Terminal only" mode, then switch
- back to "Nfsc->Nfsd support:Terminal + New p3nfsd".
- Now we can start the p3nfsd:
- % p3nfsd -shell $SHELL -
- You should get a new prompt, and the emulator should be faster.
- WARNING: Do NOT use the -tty option with the getty running.
-
- If you wish to exit the nfsd type "ls <mntdir>/exit"
-
- TESTING:
- Try ls <mntdir>, if works ls -l <mntdir>.
-
- FEATURES / TIPS:
- - type p3nfsd -help to see all options.
- - nfsc4 has a builtin terminal emulator (vt100/vt220),
- and verifies a crc when reading or writing files to the nfsd.
- The terminal emulator supports the 8 Standard fonts on the S3a
- (Size 8 / 11 / 13 / 16, Swiss and Roman) plus the mini font
- to allow for more than 20 (actually 27) lines. The last one can
- only selected via psion z/Z and not from the fonts dialog.
- If used with the nfsd -shell option, the resize is reported to the
- application (SIGWINCH)
- The alternate charset font is not complete, but boxes of any kind
- should work.
- The emulator is capable to display various vt100 animations.
- Jumpscroll and charset conversion (ISO8859-1 <-> ibm codepage 850)
- can be configured.
- XYmodem was tested with the only Zmodem package I found for UNIX.
- Xmodem works, Ymodem has a problem: the receiver won't terminate cleanly
- after a file was sent. I think the Psion driver and the Unix program
- behave differently here.
- The emulator supports "Function Keys": i.e: you can specify a string
- to be sent when pressing a key.
- WARNING: It is possible to redefine each key received by the application.
- There is a "novt" version of nfsc.app, which is about 10k smaller.
-
- - break. As there is no p_break() function or the like, the break is
- generated as a series of 0 bytes sent at 50 baud. This can work, but
- is not guaranteed, as the definition of break is 0 for at least 250ms
- and this method generates more 200ms pieces. It works on SunOs, but not
- on Solaris.
- - there is a termcap entry / terminfo source file in the etc directory
- which describes most capabilities, but vt100 or ansi should work.
- - If you are using the C client as a terminal emulator only, please
- switch it in the "Terminal only" mode: it is faster as the default
- combined mode, which is for use with the p3nfsd -shell option.
- - nfsd converts automatically all filenames from charset ibm850 (psion)
- to iso8859-1. Only characters > 127 are effected.
- - nfsc.opl: if you want to see the rom and the C drive on the psion,
- change the maxdev% variable in the opl program, and comment in the
- specific dv$ lines.
- nfsc4 users have a dialog for this purpose.
- - The opl program prints a character for each request it receives.
- - If you want to enable the "automatic wakeup on demand" feature, you
- have to turn the switch in the LINK cable and start p3nfsd with the
- -wakeup option. This option enabled causes a delay of some seconds
- before an error is reported if the psion is not attached.
- - You can specify a UN*X program which is called each time the psion
- is connected or disconnected. (nfsd -connect / -disconnect)
- - ls <mntdir>/debug, SIGUSR1, and the option -v increases the p3nfsd debug
- level (there are 4 levels, from 0 to 3).
-
- KNOWN PROBLEMS:
- - If you have a dialog open for nfsc4, the program can't respond to any
- serial line requests.
- - As nfs caches data, you may see an empty main directory even after
- _re_attaching the psion. Just go to your desired directory:
- cd /psion.stand/m/wrd
- - While nfsc.opl is transferring data, please avoid any activity on
- the psion AND SWITCH TO THE NFSC APPLICATION TO GET MORE PRIORITY !!!!
- (especially if writing on ssd), as such activity can lead to malfunc-
- tioning of the hardware flow-control :-(
- The C program (an s3a feature) raises its priority to the maximum.
- - It is not recommended to mount the psion on top of an nfs
- mounted directory (problems with df). Affects mostly diskless clients.
- - setattribute only partially implemented ->
- - tar may report problems after unpacking each file
- - you can't delete read-only files from the unix-side
- - please close all open files before doing a backup, as the files are
- opened exclusively by most programs (not nfsc.opl) and so they can't
- be read by anybody else.
-
-
- - I encountered some problems on HP-UX, with writing files on the psion.
- The problem is that the kernel and each of the biod's are trying to
- send the nfs packets, in order to get a better performance. If the file
- is bigger than 3 times BLOCKSIZE, I receive following blocks:
- 1. the last one(!)
- 2. the first one
- 3. the second one
- Here comes a timeout of about 1 minute, I'd like to know why.
- 4. ... (the remaining blocks)
- Since the psion doesn't support writes behind the end of the file, I
- drop blocks not yet written to the psion (with a warning message) after
- a timeout of currently 2 seconds.
- A workaround for this is to kill all biods :-( -> reads from other nfs
- servers becomes possibly slower.
-
- PORTING:
- To port p3nfsd to another architecture, take a look at:
-
- mp_serial.c for the serial drives setting
- mp_mount.c for the nfs mount (The amd source could help you)
- config.h for the defaults
- pty.h for the pseudo tty stuff.
-
- Content of the files (should not have to be changed by a port):
- mp.h: Various defines
- mp_inode.c: the inode routines and the read/write cache routines.
- mp_main.c
- mp_mount.c: nfs mount & rpc service start
- mp_pfs_ops.c: the nfs routines
- mp_serial.c: tty settings
- mp_xmit.c description of protocol used between the psion and the
- workstation; receive & send routines
- crc.c crc routines.
- nfs_*: all generated from nfs.x via rpcgen, withsome of them
- slightly modified to satiate the compiler warnings
-
- nfsc:
- nfsc.opl the opl program for the psion (S3a)
- nfsc_s3.opl the same for the S3
- nfsc4.c C client (protocol and window routines)
- vt100.c C client (terminal emulator stuff)
- xymodem.c C client (X/Y modem support)
-
- AT LAST:
- This as a reminder for those who want to check for a newer version of
- the nfsd, but have forgotten the address:
- ftp.uni-erlangen.de:/pub/psion/local
-