From owner-freebsd-questions Mon Dec 21 04:24:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA16454 for freebsd-questions-outgoing; Mon, 21 Dec 1998 04:24:29 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from relay.kubsu.ru ([212.192.128.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA15926 for ; Mon, 21 Dec 1998 04:21:23 -0800 (PST) (envelope-from rzhevsky@fpm.kubsu.ru) Received: from fpm.kubsu.ru (ic138.kubsu.ru [212.192.128.138]) by relay.kubsu.ru (8.8.5-IC/NETRA) with ESMTP id PAA28070 for ; Mon, 21 Dec 1998 15:20:37 +0300 (GMT) Message-ID: <367E3CA3.8014A48F@fpm.kubsu.ru> Date: Mon, 21 Dec 1998 15:18:43 +0300 From: Dmitriy Agaphonov X-Mailer: Mozilla 4.06 [en] (WinNT; I) MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG Subject: RS-232 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dear Tech Support, I've got a problem about communicating to APC UPS via RS-232. I have to perform control for DCD, TXD and other pins of RS-232. After my program does int fd = open("/dev/cuaa1", O_RDWR, 0); .... int st; int rc = ioctl(fd, TIOCMGET, &st); rc becomes -1 and errno becomes 25 (it means "inappropriate ioctl for device"). It happends too when file name of device is "/dev/cuaia1", "/dev/ttyd1" and so on. Could you tell me what do I do on the wrong way? How can I perform control for RS-232 pins? Best Regards, Dmitriy Agaphonov. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message