From: Kevin Cummings (cummings@bbird8.Prime.COM)
Date: 10/22/92


From: cummings@bbird8.Prime.COM (Kevin Cummings)
Subject: Re: Modem Probs... ttys1 or ttys2?
Date: Thu, 22 Oct 1992 15:39:08 GMT

In article <1992Oct22.010540.17100@newshub.ariel.yorku.ca>, cs911461@ariel.yorku.ca (C. D. ARMOUR) writes:
|> Problem: I cannot send AT commands to the modem. Commands such as:
|> $ echo "AT S0=5" > /dev/ttys2
|> don't cause the AA light to come on (Hayes). If I do it
|> under Kermit, it works fine but not from the command line.
|> What's going on? The modem is on (DOSspeak--->) "COM2".

The problem is that the echo command is appending a unix NL character
to the string you have asked to be sent. A unix NL is really an ASCII
LF (linefeed). Your modem wants it's input line to be terminated with
an ASCII CR (carriage return) character. You have two choices. You
can modify the S register which contains the EOL character (This might
be a chicken and egg problem unless you use KERMIT), or change the
string you send to include a \13 at the end so the modem gets the CR.

|> Problem: I would like it if the outside world could connect to my
|> machine. I've included the usual getty commands in
|> inittab and have turned off local echo with the command:
|> $ echo "AT E0 Q1" > /dev/ttys2
|> (note: this works but the S0=5 line above does not). Even
|> so, when we try connecting, the person logging on gets tons
|> of garbage and then a login prompt. After that, everything
|> is cool. Has anyone had this problem or can offer an
|> explanation / solution?

|> Problem: (Probably related to above problems) I notice that when I
|> do a 'ps', the getty for /dev/ttys2 is actually running on
|> /dev/ttys1. Is this unusual/dangerous?

That would depend on your naming convention. You can call the file in
/dev anything you want. It's the major and minor device numbers that
decide which device is being accessed. ps is probably re-interpreting
those numbers back into a device and using a different convention than
you are! ARe your serial ports numbers from ttys0 or from ttys1?

|> Phew! I'm in over my head here!
|>
|>
|> C. Armour-Kidson
|> cs911461@Ariel.yorku.ca
|>
|> Ps. I should mention that I am using the very latest Linux
|> kernel (v. 0.97, is it?) This would mean that when the
|> modem is on ttys2, it is really on COM3???

Uh, 0.98-pl2 is the latest, but a lot of us will stay on pl1 until
a few more problems get ironed out.

=================================================================
Kevin J. Cummings PrimeService
20 Briarwood Road A Computervision Company
Framingham, Mass. 500 Old Connecticut Path
                                        Framingham, Mass.
Work: cummings@primerd.Prime.COM
Home: cummings@kjc386.framingham.ma.us

Std. Disclaimer: "Mr. McKittrick, after careful consideration,
                  I've come to the conclusion that your new
                  defense system SUCKS..." -- War Games
=================================================================