Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jan 1996 12:14:59 +0100 (MET)
From:      Jaroslaw Bazydlo <jarekb@pap.waw.pl>
To:        freebsd-questions@freebsd.org
Cc:        jarekb@pap.waw.pl (Jaroslaw Bazydlo)
Subject:   How to make CUAA0 work with 8N1 settings!
Message-ID:  <199601301115.MAA02841@cergowa.pap.waw.pl>

next in thread | raw e-mail | index | archive | help
Hey,

I've got terrible problem with setting up /dev/cuaa0. I have simple app that
is listening to COM port and saving into disk file. Off course in a future
i'll expand it to smth else. When I had a direct connection there was no
problems. Everything worked just fine.

A few days ago I connected my port with a modem (Shrack MDS-25) but what I
got on a screen is just a kind of mess. 

This is my Init Script for the /dev/cuaa0:

#!/bin/sh
 
for i in $*
do 
        comcontrol /dev/ttyd$i dtrwait 100 drainwait 180
        stty </dev/ttyid$i crtscts -parenb cs8 -cstopb -clocal 1200 
        stty </dev/ttyld$i crtscts
        stty </dev/cuaia$i crtscts -parenb cs8 -cstopb -clocal 1200
        stty </dev/cuala$i crtscts
done

I did some modifications of /etc/rc.serial. It is suppose to be 1200 baud
8N1. So the meaning of given options are (as I understand):

crtscts		enable RTS/CTS flow control
-parenb		disable parity generation & detection
cs8		character size to 8 bits
-cstopb		use one bit stop
-clocal		assume a line with modem control
1200		speed is 1200 baud

After I call my script I get something like this:
green:~/src/papreceiver-0.01 {94} ./set.modem
green:~/src/papreceiver-0.01 {94} ./set.modem
green:~/src/papreceiver-0.01 {95} stty -a -f /dev/cuaa0
speed 1200 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
        -echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin
        -nokerninfo -extproc
iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel -ignbrk
        -brkint -inpck -ignpar -parmrk
oflags: -opost -onlcr -oxtabs
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb crtscts -dsrflow
        -dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
        eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
        min = 1; quit = ^\; reprint = ^R; start = ^Q; status = <undef>;
        stop = ^S; susp = ^Z; time = 0; werase = ^W;
green:~/src/papreceiver-0.01 {96} /sbin/dmesg | grep sio
sio0 at 0x3f8-0x3ff irq 4 on isa
sio0: type 16450
sio1 at 0x2f8-0x2ff irq 5 on isa
sio1: type 16550A
sio2 not found at 0x3e8
sio3 not found at 0x2e8
green:~/src/papreceiver-0.01 {97} ./paprec
WARNING: New logfile name is /home/staff/jarekb/src/papreceiver-0.01/.receiver/wtorek/1.txt
a(
:5T2R-

^^^^^ Here is some kind of mess instead of plain TXT file.

WHAT DID I DO WRONG ???? I check the line under DOS and TELIX and there was
no problems with reading files.

Greets
J.Bazydlo
--
     _       ____       ____  
    | | __ _|  _ \ __ _/ ___|        POLISH PRESS AGENCY - Warsaw 
 _  | |/ _` | |_) / _` \___ \  email: ............... jarekb@pap.waw.pl
| |_| | Jaroslaw Bazydlo __) | irc: McJARAS ...... on: #Polska #Gandalf
 \___/ \__,_|_| \_\__,_|____/. home-page: http://www.pap.waw.pl/~jarekb



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601301115.MAA02841>