From owner-freebsd-questions Fri Nov 10 13:43:43 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA11680 for questions-outgoing; Fri, 10 Nov 1995 13:43:43 -0800 Received: from news.us.world.net (news.us.world.net [192.243.32.19]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id NAA11673 for ; Fri, 10 Nov 1995 13:43:34 -0800 Received: from merix.merix.com (merix.com [198.145.172.40]) by news.us.world.net (8.6.9/8.6.9) with SMTP id LAA28298; Fri, 10 Nov 1995 11:27:23 -0800 Received: from sandy.merix.com by merix.merix.com (4.1/1.1) id AA03068; Fri, 10 Nov 95 11:22:22 PST Received: by sandy.merix.com (4.1/8.0) id AA20185; Fri, 10 Nov 95 11:23:17 PST Date: Fri, 10 Nov 95 11:23:17 PST From: troyc@sandy.merix.com (Troy Curtiss) Message-Id: <9511101923.AA20185@sandy.merix.com> To: ahill@netspace.net.au, freebsd-questions@freebsd.org Subject: Re: modem lights Sender: owner-questions@freebsd.org Precedence: bulk > The status signals have nothing to do with AT commands or bit mapped > registers - nor can they be read from RS232. For internal modems (and > PCMCIA I belive) they CAN be read from the BUS. (I have seen Windows and > MSDOS programs that do this) I have never seen a UNIX program that does > though. (There is one called lights.zip for DOS) > > NO NO NO, all of this information is available not from the bus, but from the UART that manages your serial port (Usually onboard the internal modem, 16550 compatible in USRobotics types..). Just query the UART for the status of its control lines... Tear apart Seyon's code, all he does is a tcgetattr of the serial device and run some lights with it. I don't know if this function is accessible if the serial device is opened by someone else, though (in the case of implementing a system-wide modem status light watcher)...???