From owner-freebsd-questions@FreeBSD.ORG Fri Jul 25 20:12:18 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 254C137B401 for ; Fri, 25 Jul 2003 20:12:18 -0700 (PDT) Received: from smtp2.adl2.internode.on.net (smtp2.adl2.internode.on.net [203.16.214.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEA7443F3F for ; Fri, 25 Jul 2003 20:12:16 -0700 (PDT) (envelope-from malcolm.kay@internode.on.net) Received: from smtp2.adl2.internode.on.net (localhost [127.0.0.1]) h6Q3CE0l025375 for ; Sat, 26 Jul 2003 12:42:14 +0930 (CST) Received: (from mailnull@localhost)h6Q3CELE025371 for ; Sat, 26 Jul 2003 12:42:14 +0930 (CST) X-Authentication-Warning: smtp2.adl2.internode.on.net: mailnull set sender to using -f Received: from beta.home (ppp1884.sa.padsl.internode.on.net [150.101.26.91]) h6Q3Bs0l025220; Sat, 26 Jul 2003 12:42:14 +0930 Content-Type: text/plain; charset="windows-1252" From: Malcolm Kay Organization: At home To: "Daan Vreeken [PA4DAN]" , Mark Date: Sat, 26 Jul 2003 12:41:54 +0930 User-Agent: KMail/1.4.3 References: <200307251722.H6PHMFRS032800@asarian-host.net> <200307251942.54397.Danovitsch@Vitsch.net> In-Reply-To: <200307251942.54397.Danovitsch@Vitsch.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200307261241.54059.malcolm.kay@internode.on.net> X-Proc-As: FreeBSD-questions X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) 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: Sat, 26 Jul 2003 03:12:18 -0000 On Sat, 26 Jul 2003 03:12, Daan Vreeken [PA4DAN] wrote: > 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 freeb= sd > > 4.7? I installed Device::ParallelPort from CPAN (Perl 5.8.0), but tha= t > > does nothing (seems made for linux). > > > > Or if someone could point me to a little c-source, that would be help= ful > > 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 = LAN. > > Basically you need to open /dev/io to get io read/write permission, aft= er > that you are free to bang all IO-ports you want. > Generally you still need to be root or have root privilege to do this; bu= t=20 might vary with different FreeBSD releases. An alternative that may or may not suit your needs is ppi device access t= o parallel ports eg /dev/ppi0; try: # man ppi > grtz, > Daan Malcolm