From owner-freebsd-questions@FreeBSD.ORG Fri Jul 25 10:41:04 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DBCF37B401 for ; Fri, 25 Jul 2003 10:41:04 -0700 (PDT) Received: from Danovitsch.dnsq.org (b74143.upc-b.chello.nl [212.83.74.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 576E343F93 for ; Fri, 25 Jul 2003 10:41:02 -0700 (PDT) (envelope-from Danovitsch@Vitsch.net) Received: from FreeBSD.Danovitsch.LAN (b83007.upc-b.chello.nl [212.83.83.7]) by Danovitsch.dnsq.org (8.12.3p2/8.11.3) with ESMTP id h6PHYqak016779; Fri, 25 Jul 2003 19:34:53 +0200 (CEST) (envelope-from Danovitsch@Vitsch.net) Content-Type: text/plain; charset="windows-1252" From: "Daan Vreeken [PA4DAN]" To: Mark Date: Fri, 25 Jul 2003 19:42:54 +0200 User-Agent: KMail/1.4.3 References: <200307251722.H6PHMFRS032800@asarian-host.net> In-Reply-To: <200307251722.H6PHMFRS032800@asarian-host.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200307251942.54397.Danovitsch@Vitsch.net> cc: FreeBSD-questions@FreeBSD.org Subject: Re: Writing to parallel port X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2003 17:41:04 -0000 On Friday 25 July 2003 19:22, Mark wrote: > Hello, > > Has anyone an idea how to set/unset a bit on a parallel port in freebsd > 4.7? I installed Device::ParallelPort from CPAN (Perl 5.8.0), but that = does > nothing (seems made for linux). > > Or if someone could point me to a little c-source, that would be helpfu= l > too; all I need is to toggle a bit to switch a relay. Have a look at this piece of code if wrote : http://vitsch.net/cgi-bin/gpl/cat.cgi/lampd/v1.0?lampd.c It's a very small udp network daemon to control my roomlights over the LA= N. Basically you need to open /dev/io to get io read/write permission, after= that=20 you are free to bang all IO-ports you want. grtz, Daan