From owner-freebsd-small Wed May 24 12:20:43 2000 Delivered-To: freebsd-small@freebsd.org Received: from hindenburg.eboai.org (hindenburg.eboai.org [205.181.254.190]) by hub.freebsd.org (Postfix) with ESMTP id 5DF0037BD57 for ; Wed, 24 May 2000 12:20:39 -0700 (PDT) (envelope-from chip@chocobo.cx) Received: by hindenburg.eboai.org (Postfix, from userid 1000) id BBAE73D5C; Wed, 24 May 2000 15:20:36 -0400 (EDT) Date: Wed, 24 May 2000 15:20:36 -0400 From: Chip Marshall To: freebsd-small@freebsd.org Subject: Flipping RTS on a serial port Message-ID: <20000524152036.A40893@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-small@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ok, I finally figured out what was wrong with my RS-485 communications problem. As it turns out, when my program opens the serial port and send out some data, the RS-485 port gets stuck into send mode, which causes all the other devices on the port to wait until it stops before sending their responces. Anyway, apparently to correct this behavior I need to force the flip the RTS bit in the handshake control register of the serial port. The problem is that I have no clue how to go about doing this. I tried setting crtscts on the serial port, but this just causes my program to lock when it tries to write (I think the CTS bit never goes high). Anyone know how I can do this either from the command line or in perl? -- 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-small" in the body of the message