We have a few automated fax machines that accept input from a serial port,
process the info, and fax it out. Currently, we have two of these machines
hooked to the serial ports of a SCO box with a printcap similar to the
following, and they work fine :
nvidi:\
:lp=/dev/tty1a:sd=/usr/spool/lpd/nvidi
I am trying to get one of these machines to work on an Alpha (through a
Digi-Board) with the following printcap :
sapvidi:\
:br#9600:\
:ct=dev:\
:lf=/usr/adm/sapvidi.err:\
:lp=/dev/ttya05s:\
:mx#0:\
:sd=/usr/spool/lp/sapvidi:\
:sh:
The problem is, when sent through the DEC box, the faxes are sent
double-spaced (blank line in between each line of text), and it causes them
to come out very (for lack of a better term) 'messy-looking'. I think I may
have tracked the problem down to differences in the stty settings between
the ports.
Here are the setting on the serial port on the SCO Box (where faxes go out
normally) :
/usr/alex
SCOBox_$ stty -a < /dev/tty1a
speed 9600 baud; ispeed 9600 baud; ospeed 9600 baud;
line = 0; intr = DEL; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = ^_at_;
swtch <undef>;susp <undef>;start = ^Q;stop = ^S;
-parenb -parodd cs8 -cstopb hupcl cread clocal -loblk -ortsfl -ctsflow
-rtsflow
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -iuclc
-ixon -ixany -ixoff
-isig -icanon min = 4 time = 0 -xcase -echo -echoe -echok -echonl -noflsh
-iexten -tostop -xclude
-opost -olcuc -onlcr -ocrnl -onocr -onlret -ofill -ofdel
-isscancode
...And, on the DEC Box :
/usr/users/alex
[alex_at_DECBox]> stty -a < /dev/ttya05s
#2 disc;speed 9600 baud; 0 rows; 0 columns
erase = ^H; werase = <undef>; kill = ^U; intr = ^C; quit = ^\
susp = ^Z; dsusp = <undef>; eof = ^D; eol = <undef>; eol2 = <undef>
stop = ^S; start = ^Q; lnext = <undef>; discard = <undef>; reprint = <undef>
status = <undef>; time = 0; min = 1
-parenb -parodd cs8 -cstopb hupcl cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff -imaxbel
isig icanon -xcase echo -echoe -echok -echonl -noflsh -mdmbuf -nohang
-tostop -echoctl -echoprt -echoke -altwerase -iexten -nokerninfo
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tabs -onoeot
dtr = on; dsr = off; rts = on; cts = on; dcd = on
The most notable differences that I would guess would affect it are :
On DECBox, eol = <undef>, whereas on SCOBox, eol = ^_at_ (Null
Character)
On DECBox, icrnl is set (Map carriage-return to newline on input).
On DECBox, onlcr is set (Maps newline characters to
carriage-return/newline characters).
However, any attempts to change these settings on the DECBox, i.e. :
stty -icrnl -onlcr eol ^_at_ < /dev/ttya05s
-or-
stty -f /dev/ttya05s -icrnl -onlcr eol ^_at_
...fail to do anything, unless I am already connected (using cu) to
/dev/ttya05s from another terminal. Then, when I dis-connect from the port,
the settings change back to the originals. Does anybody know enough about
stty and/or termcap settings to tell me how to change the default settings
on this port????
If there's no way to do it this way, can I add some sort of filter to the
printcap file that will open the serial port, change the stty settings, and
THEN pump the data through?
If you've read all the way to the end of this message, thanks for your
patience!
Alex Nord
Systems Admin
Jabil Circuit
alex_nord_at_jabil.com
Received on Tue May 19 1998 - 19:15:00 NZST