Malcolm: Thanks.  I set ttyd0 with ttyid0 and I am reading the output.
The problem I have is if I reboot the server I have to set the speed for
ttyd0 again.  I tried to configure ttys and rc.serial to get default port
settings without success.  Do you know how to change the default settings in
this case ttyd0?


-----Original Message-----
From: Malcolm Kay [mailto:[EMAIL PROTECTED]
Sent: Friday, August 29, 2003 3:38 AM
To: Marcelo Schmidt; [EMAIL PROTECTED]
Subject: Re: How do I change the speed on ttyd0?

On Fri, 29 Aug 2003 15:56, Marcelo Schmidt wrote:
> Hi,
> I need to read data from a temperature sensor (PIC12C509) that requires:
> serial data at 2400 baud, 8 bits, no parity, one or two stop bits.  I
> several things, tip, cu,
> Device-SerialPort-0.13, etc.  It seems to be the ttyd0 speed is locked in
> 9600:
> # stty -a -f /dev/ttyd0

Since you are calling out it is probably better to use /dev/cuaa0;
but must admit I don't fully understand the implications of cuaa0 vs ttyd0.

In any case you can set the default parameters on ttyd0 with ttyid0
or cuaa0 with cuaia0. This pseudo ports are for the sole purpose
of setting the defaults on ttyd0 and cuaa0.

So assuming you use /dev/cuaa0 then you want:
# stty -f /dev/cuaia0 speed 2400

You probably also want to set some other parameters such as:
# stty -f /dev/cuaia0 clocal

> speed 9600 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 -ocrnl -oxtabs -onocr -onlret
> cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
>         -dtrflow -mdmbuf
> cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
>         eol2 = <undef>; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U;
>         lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
>         status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;
> My /etc/ttys:
> ttyd0   "/usr/libexec/getty std.2400"   unknown off     secure  local
> I also got sometimes: /kernel: sio0: 26 more tty-level buffer overflows
> (total 8805).
> So how do I change the speed on ttyd0?

Malcolm Kay

[EMAIL PROTECTED] mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to