From owner-freebsd-questions Wed Oct 31 0:49:19 2001 Delivered-To: freebsd-questions@freebsd.org Received: from pib.etel.dn.ua (pib.etel.dn.ua [194.44.16.73]) by hub.freebsd.org (Postfix) with ESMTP id 883F137B403 for ; Wed, 31 Oct 2001 00:48:47 -0800 (PST) Received: from rupib.donetsk.ua (pibsrv.pib.donetsk.ua [192.168.1.1]) by pib.etel.dn.ua (8.12.0/8.12.0) with ESMTP id f9V6KTVr050445 for ; Wed, 31 Oct 2001 08:20:34 +0200 (EET) Received: from angel.dn.pib.com.ua (root@[192.168.1.9]) by rupib.donetsk.ua (8.8.5/8.8.5) with ESMTP id TAA21804 for ; Tue, 30 Oct 2001 19:35:15 +0200 (EET) From: lixu@mail.com Received: (from root@localhost) by angel.dn.pib.com.ua (8.9.3/8.9.3) id TAA05341 for questions@FreeBSD.ORG.AVP; Tue, 30 Oct 2001 19:25:31 +0200 Received: from udao.dn.pib.com.ua (ns.udao.dn.pib.com.ua [10.25.7.27]) by angel.dn.pib.com.ua (8.9.3/8.9.3) with ESMTP id TAA05333 for ; Tue, 30 Oct 2001 19:25:30 +0200 Received: from mail.com (ran.udao.dn.pib.com.ua [10.25.6.11]) by udao.dn.pib.com.ua (8.10.0/8.10.0) with ESMTP id f9UHHHG01477 for ; Tue, 30 Oct 2001 19:17:18 +0200 Message-ID: <3BDEE289.9030109@mail.com> Date: Tue, 30 Oct 2001 19:25:29 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20010913 X-Accept-Language: en-us, ru, uk MIME-Version: 1.0 To: questions@FreeBSD.ORG Subject: control RTS & RTS Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, All! I have try to control RTS and DTR signal on my /dev/cuaa0. I use this code from gnokii.org-> ----------------------------------------------------------------------------------------------- int port_setdtrrts(int fd, int dtr, int rts) { unsigned int flags; flags = TIOCM_DTR; if ( !dtr ) if( ioctl( fd, TIOCMBIS, &flags) == -1 ) { perror("port_setdtrrts: ioctl\n"); return -1; } else if( ioctl( fd, TIOCMBIC, &flags) == -1 ) { perror("port_setdtrrts: ioctl\n"); return -1; } flags = TIOCM_RTS; if ( !rts) if( ioctl( fd, TIOCMBIS, &flags) == -1 ) { perror("port_setdtrrts: ioctl\n"); return -1; } else if( ioctl( fd, TIOCMBIC, &flags) == -1 ) { perror("port_setdtrrts: ioctl\n"); return -1; } return 0; }// port_setdtrrts ------------------------------------------------------------------ but it seems it is don't work right, anybody have experience in serial port programming? i need advise, where is may be a bug ??? in my case when i do port_setdtrrts( port, 1, 0) i have: DTR= CTS or DSR; RTS= CTS or DSR; so the DTR&RTS is depend from CTS&DSR, but i expect a DTR= 1;(+12V) RTS= 0; (-12V) Where are exist a programm for manual control of DTR & RTS ??? any suggestion To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message