Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jul 2003 12:41:54 +0930
From:      Malcolm Kay <malcolm.kay@internode.on.net>
To:        "Daan Vreeken [PA4DAN]" <Danovitsch@Vitsch.net>, Mark <admin@asarian-host.net>
Cc:        FreeBSD-questions@freebsd.org
Subject:   Re: Writing to parallel port
Message-ID:  <200307261241.54059.malcolm.kay@internode.on.net>
In-Reply-To: <200307251942.54397.Danovitsch@Vitsch.net>
References:  <200307251722.H6PHMFRS032800@asarian-host.net> <200307251942.54397.Danovitsch@Vitsch.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307261241.54059.malcolm.kay>