From owner-freebsd-questions Wed Jun 28 20:38:07 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id UAA05988 for questions-outgoing; Wed, 28 Jun 1995 20:38:07 -0700 Received: from utacnvx.uta.edu (utacnvx.uta.edu [129.107.1.5]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id UAA05982 for ; Wed, 28 Jun 1995 20:38:03 -0700 Received: (from xxnguyen@localhost) by utacnvx.uta.edu (8.6.12/8.6.12) id VAA22022 for freebsd-questions@FreeBSD.ORG; Wed, 28 Jun 1995 21:42:48 -0500 From: "Mr. TR Nguyen" Message-Id: <199506290242.VAA22022@utacnvx.uta.edu> Subject: APC Backups 400 && ups daemon To: freebsd-questions@FreeBSD.ORG (freebsd-questions) Date: Wed, 28 Jun 95 21:42:48 CDT X-Mailer: ELM [version 2.3 PL11] Sender: questions-owner@FreeBSD.ORG Precedence: bulk I think hackers would be a more appropriate forum, but it's kind of swamped for the time being. Anyways, I have an A.P.C. Back-UPS 400 with a serial connection to my FreeBSD 2.0.5R's comm port 3. I've unsuccessfully tried to write a simple program to read a single byte from this port (/dev/tty02) and check whether or not the "POWER-FAIL" bit has been raised (pin #4, according to the Owner's Manual) Here's what the simplistic logic looks like: open() "/dev/tty2" # comm 3 LOOP FOREVER: read() a single byte check to see if bit #4 has been set ..... END LOOP Anyone with examples/tips to share with this stumped-abuser? Thankx so much, TR Nguyen