From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,6af414b05594c40e,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1995-01-23 13:35:22 PST Path: nntp.gmd.de!newsserver.jvnc.net!darwin.sura.net!news.dfn.de!scsing.switch.ch!news.rediris.es!news.uoregon.edu!netnews.nwnet.net!oracle.pnl.gov!osi-east2.es.net!lll-winken.llnl.gov!sol.ctr.columbia.edu!howland.reston.ans.net!pipex!uunet!holmes.sgate.com!holmes.sgate.com!not-for-mail From: matthewm@sgate.com (Michael Matthews) Newsgroups: comp.unix.osf.osf1 Subject: Monitoring serial port on 3000/400 OSF/1 3.0 Date: 23 Jan 1995 16:35:22 -0500 Organization: Southgate Internet Host Message-ID: <3g17eq$969@sgate.com> NNTP-Posting-Host: holmes.sgate.com I'm trying to get the upsd source (patch level 3, in comp.sources.unix volume 18) to work with our DEC 3000/400 OSF/1 3.0 machine. The UPS is an APC unit. The software basically just monitors the serial port, waiting for the UPS to raise DCD to indicate a power failure, and to lower DCD (or shut the machine down), depending on whether wall power is restored. My problem, basically, is that once upsd fires up it things it's gone to battery power. The problem seems to be the opening of the /dev/tty00 port does *not* block for the UPS to raise DCD, but rather it returns a valid file descriptor and sets errno to 22 (EINVAL). Since this open doesn't block, upsd assumes that DCD is high and goes off its merry way broadcasting that the power failed. Now, it may be that the cable is incorrectly configured, but DCD should be low by default in any event. Should I be opening this port to monitor it by some different name? Thanks for any help on this one.. Email replies would be appreciated, as I don't get to read news as often as I'd like. -- ------------------------------------------------------------------------------ Mike Matthews, Mike_Matthews@sgate.com (NeXTmail accepted)