HowTo: bidirectional serial ports under Amiga Unix
Rich Skrenta
skrenta at amix.commodore.com
Fri Apr 12 01:44:26 AEST 1991
How to setup bidirectional serial ports under Amiga Unix SVR4
Disclaimer:
You may need to do more or less than what I describe depending
on what version of Amiga Unix you have.
First, check that you have the ttymon port monitor running. Issue the command
sacadm -l
You should see something like:
PMTAG PMTYPE FLGS RCNT STATUS COMMAND
inetd inetd - 0 ENABLED /usr/sbin/inetd
ttymon ttymon - 0 ENABLED /usr/lib/saf/ttymon
If you DON'T see the ttymon service listed, add it with the command
sacadm -a -p ttymon -t ttymon -c /usr/lib/saf/ttymon -v 1
You only need to do this once. The sacadm command will modify the file
/etc/saf/_sactab and alert the sac daemon that a new service has been added.
Now setup your ports. 1.1 system may already have some preconfigured port
monitors in place; I suggest removing them before adding your own.
Suppose we want to put a Telebit locked at 19200 baud on port #1 (couting
from zero) of the 7 port serial card (/dev/term/ql01).
First remove any port monitors that already exist on this port:
pmadm -r -p ttymon -s ql01
Now add your own with the command:
pmadm -a -p ttymon -s 1 -i root -fu -v`ttyadm -V` \
-m "`ttyadm -d /dev/term/ql01 -bhr0 -t150 -l 19200M -s /usr/bin/login \
-m ldterm -p \"ql01 login: \"`"
The pmamd commands to start port monitors are so long that I like to keep them
around in files, so I can just say "sh ql01", "sh ql05", etc. to start port
monitors. I suggest saving the above pmadm command in a file and editing
the baud rate, device, etc. as needed.
See the pmadm and ttyadm man pages for a full description of the flags.
The important ones: '-t150' is a timeout in seconds. '19200M' is the baud
rate cycling entry from /etc/ttydefs. '-bhr0' means "bidirectional, hangup,
r0 means wait for any one character before spitting out login:". r1 would
wait for one CR before putting out the login:, r2 would wait for two CRs, etc.
pmadm will modifiy the file /etc/saf/ttymon/_pmtab.
The complexity of the pmadm command may be daunting, but it's not much
trouble to maintain if you keep it in a file somewhere. And it's neat
to only have one daemon managing all of your logins.
--
skrenta at amix.commodore.com
More information about the Comp.unix.amiga
mailing list