MAILER-DAEMON@OCDIS01.AF.MIL (Mail Delivery Subsystem) (07/08/89)
A couple of questions... First, I have several Hayes-compatible modems on my system. I'd like to automatically program them whenever the system reboots. Question is, how do I talk to a modem from the backside? My only thought would be to try and write a nam script. I want to create a file which contains port numbers and comm parameters, and then have a script file stuff the params into the modems. It needs to be smart enuf to know whether or not the modems are answering (ie: if their working). Second, is it possible to monitor an incoming serial line by any means other than putting a printer on the port? Other operating systems that I have worked with allow you to "snoop" on a port's activity from the console or administrative account. Third, does anyone know how to keep login from printing BADTTYLOGIN messages to the console? I want them in my /usr/adm/badlog, but NOT on my console (it's a big waste of paper to the logging printer we've got set up). ------------------------------------------------------------------------- Bob Johnson, LOGDIS System Administrator | "..and I chose the road less Tinker Air Force Base, Oklahoma City | travelled by, and that has telnet: robjohn@ocdis01.af.mil | made all the difference." phone: (405) 739-5038 | H.D.T. -------------------------------------------------------------------------
csg@pyramid.pyramid.com (Carl S. Gutekunst) (07/08/89)
>I have several Hayes-compatible modems on my system. I'd like to automati- >cally program them whenever the system reboots. Question is, how do I talk >to a modem from the backside? I assume you mean a dialin modem. You would need to write a small C program that opens up the device and sets the parameters; I'm not aware of any off- the-shelf package that will do want you want. (Most programs that set up modems also want to *dial* the modem.) In addition, you'll have to use nlditp to override the modem's DCD line while your program runs. All of this could go into your /etc/brc, something like: nlditp -h 0x0003 /dev/itp40 /dev/ttyi00 /etc/mcode/i.out modem_setup /dev/ttyi00 modem_setup /dev/ttyi01 nlditp -h 0x0000 /dev/itp40 /dev/ttyi00 /etc/mcode/i.out We have in the lab a dialin/dialout tty driver, similar to what Sun has been shipping since SunOS 3.2. (OK, so we're a little slow, alright?) This will be available sometime after OSx 5.0, and it will eliminate the need to fiddle with nlditp. >Is it possible to monitor an incoming serial line by any means other than >putting a printer on the port? People have written various tools to do this, mostly involving rummaging about in /dev/kmem. There is no universally defined way. >Does anyone know how to keep login from printing BADTTYLOGIN messages to the >console? I want them in my /usr/adm/badlog, but NOT on my console. In OSx <= 4.4, no. It's wired into /bin/login. OSx 5.0 works like 4.3BSD; all these messages are controlled via syslogd(8), so you can route them wherever you want in /etc/syslog.conf. This assumes you run the BSD init/getty/login; there is no syslog in System VR3. <csg>