David MacKay
.






Connecting to a linux laptop

OK, I've been a happy p3nfs user for two years now; can I get it to work on linux? (Linux 2.0.27 running on an IBM thinkpad.)

I got p3nfs-5.3f and installed it.

Several things seem to be different in linux.

What the serial port is called.
I found the following hints in a linux manual:
 COM1 is usually called /dev/ttyS0 if you are using it as an input
 and /dev/cua0 if as an output. If getting a tty, try these settings:
 9600, no parity, 8 bit, 1 stop bit. See the linux serial-HOWTO.

> I need to know that correct device name for the 9-pin serial port.
> My guess is that it is /dev/ttyS0 or /dev/ttyS1, but I would like
> to know how to find out for sure (because neither is working yet).

The best(?) way to tell is to go into your computer's BIOS setup and
look
for the serial port settings.  If that doesn't tell you, then in DOS use

"debug" to query the i/o ports with an "i " command.  It is most
likely COM1 or COM2, and the chart below shows the pertinent info.

DOS
name    port addr    irq    linux name

COM1    3F8-3FF    IRQ4    /dev/ttyS0
COM2    2F8-2FF    IRQ3    /dev/ttyS1

When in debug, if "i 3f8" returns FF and "i 2f8" returns something else,

then your serial port is /dev/ttyS1.  If it is the other way around, you

have /dev/ttyS0.  If they both return FF, then your serial port is
either
disabled or broken.  If they both return something else, then you have
two serial ports - probably an internal modem.  In that case, use any
terminal/communications program and type AT.  The one that sends
back OK is the modem.

More helpful advice: ls -lisa /dev/modem shows where the modem is.

Where /etc/ttytab is --- /etc/inittab
I reckon that for normal use of p3nfs the serial line entry
s1:12345:respawn:/sbin/agetty 19200 ttyS0 vt100
needs to be disabled.
Here was the initial result
I am using the nfsc.app from version 5.1 on my psion. (psion 3a) When I type p3nfsd (with the default tty being ttyS0) I get the message
 select:timeout
and no symbols appear on the psion, which is running nfsc. I try ls /psion...m/wrd and get the same 'select:timeout' message. I am pretty sure that no getty is running on the port. The 'serial link active' symbol on the psion system screen comes on when I run nfsc.app but it never 'moves'. And the "cts dsr" symbols in the status line are lower case, not upper case (which is how they are when it is working). (REASON: the 9-pin port was disabled)

Then when I exit p3nfsd using 'ls /psion.stand/mnt/exit', and try to restart it, I get 'ttyS0: device busy'. This above story happens even if the psion is never connected to the machine.

If I try p3nfsd -tty /dev/ttyS1 I get slightly different behaviour. There are no timeout messages, and ls /psion.stand/m immediately returns the list containing one file only, the symbolic link.

Rudi (E026390@Vereinsbank.de) advises:

Please enable more debugging on the psion and on the UNIX side,
and tell me what you see.
On the UNIX: -v -v -v
On the Psion: switch on the status line, and tell me if the RTS/CTS
lines are changing...
This is a typical case of cable not really connected, but we'll see

Terminal only mode

I edited /etc/inittab to allow tty access, and switched the p3a to terminal only. To restart the tty's without restarting linux, you type
/sbin/telinit 5
This didn't work either.
end joke
By the way, RedHat is porting Linux to Psion 5, so soon you may be able to mount your psion3a as a hard drive of your psion5!

Remaining questions

  • How to avoid having files full of ctrl-M's (the usual PC problem) when they are transferred to the unix machine. My present solution:
    perl -pi -e 's///g' 
    or
           perl -e 's///g'  
    To replace pounds symbol by something (here, |):
           perl -pi -e 's//\|/g;' 
    See this further advice.

Site last modified Tue Dec 27 09:27:43 GMT 2011