From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 3 16:04:52 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 154EE16A4CE for ; Tue, 3 Aug 2004 16:04:52 +0000 (GMT) Received: from cactus.fi.uba.ar (cactus.fi.uba.ar [157.92.49.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E61243D4C for ; Tue, 3 Aug 2004 16:04:51 +0000 (GMT) (envelope-from fgleiser@cactus.fi.uba.ar) Received: from localhost (localhost [127.0.0.1]) by cactus.fi.uba.ar (8.12.11/8.12.11) with ESMTP id i73G4tP0007059 for ; Tue, 3 Aug 2004 13:04:55 -0300 (ART) (envelope-from fgleiser@cactus.fi.uba.ar) Date: Tue, 3 Aug 2004 13:04:55 -0300 (ART) From: Fernando Gleiser To: hackers@freebsd.org Message-ID: <20040803125019.O1361@cactus.fi.uba.ar> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -104.901 () BAYES_00,USER_IN_WHITELIST X-Scanned-By: MIMEDefang 2.42 Subject: Controlling external hardware via lpt0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2004 16:04:52 -0000 First, I apologize if this isn't the right place for asking this things I need to control some external hardware with a small program in FreeBSD. I thought about using the 8 data bits of the parallel port for sending the control bits to the hardware. The hardware is a very simple combinational logic, triggered by level, I don't need any flow control or such. The soft opens /dev/lpt0 and then writes whatever value is needed (i.e, if I need the 2 lsb to be high and the rest low, I write 0x3) The problem is, I can't even open the paralel port for writing, it always fails with EBUSY. on the parallel port I attached a DB-25 wired as a "dummy printer", that is: strobe->/ack, busy, paper end and select inh, wired together and then sent to pin 18 (GND). Is there anything I'm missing? Are there a "programming and using the parallel port in FreeBSD" guide? Thanks in advance Fer