SUMMARY:OS limitation on modem control port

From: Andy J. Stefancik 206-234-3049 (ajs6143@eerpf001.boeing.com)
Date: Fri Sep 04 1992 - 09:00:06 CDT


My original query,

> Hi,
> I've installed some UPS monitor software called powermon from
> Systems Enhancement corporation. The problem this this Installation note:
>
> Attention IBM RT and SUN 4.1.1 users: Due to operating system limitations,
> low battery may not be available.
>
> I can get "on battery backup" using a non-modem control serial port" or
> a modem control port. However, to get the software to monitor for
> "battery low" I need to use a modem control port. however when I ground
> "battery low" the software exits with the following message:
>
> Unable to open device ttyb, exiting"
>
> Using trace on the power_mon daemon the error is ENXIO. -
> The file is a character special or block
> special file, and the associated device
> does not exist.
> This error is returned when it tries to do an open on ttyb although it
> successfully does this same open for the "on battery backup" condition,
> several times.
>
> Does anyone know what this 4.1.1 operating system limitation is. We are
> very interested in "battery low".

I sure got a lot of responses on this one. Many people requesting the
solution and contributing ideas. Unfortunately, we missed the boat, as the
design is finalized. We are having our facilities add temperature sensing to
"on battery", and wanted to add and emergy off switch (through a delay relay)
to "battery low", So if "battery low" ever does work we will have to reconfigure
the port, as I don't really want the daemon dying on it. I am going to
configure the powermon daemon with cable type 1 (non-modem control). In
this mode "battery low" will not be monitored.

Most people suggested the "remote" entry in /etc/ttytab and running
ttysoftcar on the port, which I had done most of the suggested things.
This is the entry I used from the ttytab. Then ran ttysoftcar so software
carrier detection was turned off.

ttyb none unknown off remote secure

The UPS end is a relay board provided for this purpose by exide. I had the
cable and was just grounding the 2 labeled signal wires to the common wire
to test the configuration of the software. There really was no connection
to the UPS, but was easy to test this way. So I really don't know much about
modem ports, but from what I've learned this is a hardware flow control, I
guess!!!

One person said his powermon daemon says it will monitor "battery low" on
4.1.2. That's the problem though, when you configure the modem control port
and configure the powermon software it "says" it will be monitoring "battery
low", which it does, and it does catch it, but then dies instead of causing
and immediate shutdown. However they had never actually "tested" for battery
low and are currently doing that.
        I did get "battery low" to cause an immediate shutdown using one
of those led boxes, and grounding pin 4. Trouble is I couldn't leave it
grounded, I had to have it ungrounded to bring up the software and give it
"on battery" then ground pin 4 to ground, THEN give it the battery low by
grounding the UPS end of the cable to the wire labeled battery low. I suspect
this is where the problem is, Although I don't know what to do about it. I
included a couple of responses below that seems to sum up everything I received.

Another person said they had version 1.3 7/92 and although it had the IBM RT
warning, sunOS was not mentioned in the installation manual. I will check with
powermon about this athough I talked with them several times already and got
no mention of this. The version I have is version 1.3 6/92.

-----------------
>From Hal Stern - stern@sunne.East.Sun.COM

i assume the battery low signal is raising DCD when it is
active, so that your open() on that port will complete
when the signal goes high. this is the usual way to
detect a change-of-state from a serial device.
 
if so, make sure you put "remote" in the /etc/ttytab file
for ttyb, instead of "local" -- this turns on the DCD hardware
carrier detect.
 
check out sunworld magazine, /sys.admin, april 1992 for
details

--hal
--------------------

>From Timothy G. Smith - tgsmith@spdev.East.Sun.COM

Your message does not give enough information to figure things out but
I would suspect that the problem has to do with the modem control
lines on the serial port.
 
You need to find out how the UPS handles the modem control lines. It
may be that the UPS indicates that the battery is low by dropping the
signal on one of the modem control pins. You would get ENXIO on an
open of a serial port if you have software carrier detect turned off
and the device was not asserting CD. This is a known feature of the
SunOS tty code.
 
If you have source code for the daemon and the manual for UPS I would
suggest you take a look at both as well as the termio(4) manual page
and see if you can't get things working.
---------------------------

You don't get source with the powermon UPS monitor daemon. I can't solve
this and can't spend any more time on it, as I'm losing my test cable
(it gets put into the ups and ceiling) and battery at our current 25%
load is 2 hours. If I do hear of any fix I will post it. Thanks to
everyone.

Andy Stefancik Internet: as6143@eerpf001.ca.boeing.com
Boeing Commercial Airplane G. UUCP: ...!uunet!bcstec!eerpf001!as6143
P.O. Box 3707 MS 64-25 Phone: (206) 234-3049
Seattle, WA 98124-2207



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:49 CDT