From owner-freebsd-questions Thu May 25 8:30:16 2000 Delivered-To: freebsd-questions@freebsd.org Received: from hindenburg.eboai.org (hindenburg.eboai.org [205.181.254.190]) by hub.freebsd.org (Postfix) with ESMTP id 8199337C687 for ; Thu, 25 May 2000 08:30:10 -0700 (PDT) (envelope-from chip@chocobo.cx) Received: by hindenburg.eboai.org (Postfix, from userid 1000) id 460C43D5C; Thu, 25 May 2000 11:30:09 -0400 (EDT) Date: Thu, 25 May 2000 11:30:09 -0400 From: Chip Marshall To: freebsd-questions@freebsd.org Subject: RS-485 and setting RTS Message-ID: <20000525113009.A52865@setzer.chocobo.cx> Reply-To: chip@chocobo.cx Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.1.4i X-URL: http://www.chocobo.cx/chip/ X-OS: FreeBSD 3.4-RELEASE i386 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I am currently working on a project that involves using an Advantech PCM-4823 single board computer to talk to a bunch of devices over RS-485. One of the serial ports on the PCM-4823 can talk RS-485, but it requires that the RTS bit of the handshake control register be set high when sending and low when not. I've found that under FreeBSD 4.0-RELEASE, I can transmit information from the port just fine, however it seems that the port gets stuck in transmit mode, making it so none of the other devices on the 485 chain can talk. I think this is happening because the RTS bit never goes back to low when I'm done sending data. I've tried using stty to set crtscts on the serial port, but that causes my program to lock up when it goes to send anything. I think this happens because the CTS bit never gets set, but I'm not sure. Is there any way to manually set the RTS bit on a serial port? -- Chip Marshall http://www.chocobo.cx/chip/ Finger for PGP GCM/CS d+(-) s+:++ a18>? C++ UB++++$ P+++$ L- E--- W++ N+@ o K- w O M+ V-- PS PE Y? PGP++ t+@ 5 X R>+ tv+() b++>+++ DI++++ D(-) G++ e>++ h!>++ r-- y- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message