Discussion:
CTS and RTS
(too old to reply)
Christopher Fowler
2006-04-20 18:42:01 UTC
Permalink
I'm using mgetty on a Linux console and have it attached to a multi-port
board that has no CTS or RTS pins. mgetty is not "seeing" the user
running minicom on the muti-port board. I assume it is because there is
no CTS/RTS.


Here is my mgetty.config entry:

port ttyS0
speed 9600
direct yes
blocking yes
term vt100
data-flow soft


I still want the ability for the tty to hangup when DTR is dropped on
the multi-port board but I want mgetty to use DTR/DCD instead of DTR/DCD
+RTS/CTS to determine if something is connected.

Is there a config setting I need to use?

Thanks,
Chris



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Gert Doering
2006-04-20 19:50:33 UTC
Permalink
Hi,
Post by Christopher Fowler
I'm using mgetty on a Linux console and have it attached to a multi-port
board that has no CTS or RTS pins. mgetty is not "seeing" the user
running minicom on the muti-port board. I assume it is because there is
no CTS/RTS.
Unlikely. Mgetty doesn't look at the signalling lines to detect
"activity", but (as you can see in the log file) waits via select() for
the kernel to tell it that there is "activity".

Some distributions can't keep themselves from patching the Linux kernel
enough to break things in funny ways - we have seen such behaviour on
some RedHat Linux version, a few years ago, and it completely disappeared
as soon as an unpatched "Linus" kernel was used.

gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany ***@greenie.muc.de
fax: +49-89-35655025 ***@net.informatik.tu-muenchen.de

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Christopher Fowler
2006-04-20 20:01:50 UTC
Permalink
Post by Gert Doering
Some distributions can't keep themselves from patching the Linux kernel
enough to break things in funny ways - we have seen such behaviour on
some RedHat Linux version, a few years ago, and it completely
disappeared
as soon as an unpatched "Linus" kernel was used.
I use a standard 2.4.24 kernel off of
ftp.funet.fi:/pub/linux/kernel/v2.4

What is strange is that if I strace the mgetty process it is setting at
read(). On the multi-port I can hit enter and strace shows mgetty
sending "Username:" but I see nothing on the multiport



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Gert Doering
2006-04-20 20:47:09 UTC
Permalink
Hi,
Post by Christopher Fowler
I use a standard 2.4.24 kernel off of
ftp.funet.fi:/pub/linux/kernel/v2.4
OK, so that's a different thing.
Post by Christopher Fowler
What is strange is that if I strace the mgetty process it is setting at
read(). On the multi-port I can hit enter and strace shows mgetty
sending "Username:" but I see nothing on the multiport
This could be a flow control issue (mgetty setting hardware flow control,
and the non-existing RTS line seen as "flow control stop").

Try running mgetty with #define DATA_FLOW FLOW_SOFT in policy.h

gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany ***@greenie.muc.de
fax: +49-89-35655025 ***@net.informatik.tu-muenchen.de

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Christopher Fowler
2006-04-20 21:29:40 UTC
Permalink
Post by Gert Doering
This could be a flow control issue (mgetty setting hardware flow control,
and the non-existing RTS line seen as "flow control stop").
Try running mgetty with #define DATA_FLOW FLOW_SOFT in policy.h
Did I not tell mgetty to use soft via the "data-flow" option?

[***@merc01]# cat /etc/mgetty.config
issue-file !/sbin/version -e
port ttyS0
speed 9600
direct yes
blocking yes
term vt100
--> data-flow soft
port tty1
direct yes
blocking yes
term linux
login-conf-file /etc/login.config


There is no stty but I guess I could see what the termios settings are
And I think you be right :)

[***@localhost]# stty -aF /dev/ttyS0
speed 9600 baud; rows 0; columns 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase =
^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal --> crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -
ixon
-ixoff -iuclc -ixany -imaxbel
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0
bs0 vt0
ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop
-echoprt -echoctl -echoke


Now why does mgetty ignore the "data-flow soft" in the config? Did I
screw that up?
Post by Gert Doering
gert
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Christopher Fowler
2006-04-20 21:38:10 UTC
Permalink
Here is my mgetty version:

char * mgetty_version = "experimental test release 1.1.26-Apr16";
Post by Gert Doering
Hi,
Post by Christopher Fowler
I use a standard 2.4.24 kernel off of
ftp.funet.fi:/pub/linux/kernel/v2.4
OK, so that's a different thing.
Post by Christopher Fowler
What is strange is that if I strace the mgetty process it is setting at
read(). On the multi-port I can hit enter and strace shows mgetty
sending "Username:" but I see nothing on the multiport
This could be a flow control issue (mgetty setting hardware flow control,
and the non-existing RTS line seen as "flow control stop").
Try running mgetty with #define DATA_FLOW FLOW_SOFT in policy.h
gert
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Gert Doering
2006-04-21 12:51:35 UTC
Permalink
Hi,
Post by Christopher Fowler
Post by Gert Doering
... which is quite antique as well... (current is 1.1.35).
I tend to not update anything unless it is broken. Consistency is
important on these machines.
http://www.crynwr.com/cgi-bin/ezmlm-cgi/2/13249
Thanks, this works.
Post by Christopher Fowler
I've implemented it and it works great.
Yes, this is about what needs to be done. I haven't done it yet, because
I was not sure whether I really want to include the config*.h stuff in
mg_m_init.c, and because it's a bit more tricky for the fax flow control
(because you need send/receive both in mgetty and sendfax, and the
config structure is different)

gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany ***@greenie.muc.de
fax: +49-89-35655025 ***@net.informatik.tu-muenchen.de

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Christopher Fowler
2006-04-20 21:54:44 UTC
Permalink
Gert,

Thanks for pointing out DATA_FLOW in policy.h. I did a quick goole and
found
http://www.crynwr.com/cgi-bin/ezmlm-
cgi?:mss:13249:200204:ngdcinagnlohomplnbmj

After modifying the code by hand and recompiling it is now respecting
the data-flow argument in mgetty.config
Post by Gert Doering
Hi,
Post by Christopher Fowler
I use a standard 2.4.24 kernel off of
ftp.funet.fi:/pub/linux/kernel/v2.4
OK, so that's a different thing.
Post by Christopher Fowler
What is strange is that if I strace the mgetty process it is setting at
read(). On the multi-port I can hit enter and strace shows mgetty
sending "Username:" but I see nothing on the multiport
This could be a flow control issue (mgetty setting hardware flow control,
and the non-existing RTS line seen as "flow control stop").
Try running mgetty with #define DATA_FLOW FLOW_SOFT in policy.h
gert
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Gert Doering
2006-04-21 06:41:20 UTC
Permalink
Hi,
Post by Christopher Fowler
Post by Gert Doering
This could be a flow control issue (mgetty setting hardware flow control,
and the non-existing RTS line seen as "flow control stop").
Try running mgetty with #define DATA_FLOW FLOW_SOFT in policy.h
Did I not tell mgetty to use soft via the "data-flow" option?
Actually this option has never been implemented... (it's there, but the
code doesn't use it). Sorry.
Post by Christopher Fowler
char * mgetty_version = "experimental test release 1.1.26-Apr16";
... which is quite antique as well... (current is 1.1.35).
Post by Christopher Fowler
Thanks for pointing out DATA_FLOW in policy.h. I did a quick goole and
found
http://www.crynwr.com/cgi-bin/ezmlm-cgi?:mss:13249:200204:ngdcinagnlohomplnbmj
Hmmm, something must be wrong with that link - it points me to a
discussion about Oracle on Linux? however...
Post by Christopher Fowler
After modifying the code by hand and recompiling it is now respecting
the data-flow argument in mgetty.config
Now that code modification sounds like something I *want* to see :-)

gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany ***@greenie.muc.de
fax: +49-89-35655025 ***@net.informatik.tu-muenchen.de

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Christopher Fowler
2006-04-21 12:35:36 UTC
Permalink
Post by Gert Doering
... which is quite antique as well... (current is 1.1.35).
I tend to not update anything unless it is broken. Consistency is
important on these machines.

Sorry about the link. Try this one:

http://www.crynwr.com/cgi-bin/ezmlm-cgi/2/13249

I've implemented it and it works great.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...