From owner-freebsd-hackers Tue Apr 25 11:58: 8 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from staff.accessus.net (staff.accessus.net [209.145.151.3]) by hub.freebsd.org (Postfix) with ESMTP id E9AF637BDF2 for ; Tue, 25 Apr 2000 11:58:03 -0700 (PDT) (envelope-from jyoung@accessus.net) Received: by staff.accessus.net with Internet Mail Service (5.5.2650.21) id ; Tue, 25 Apr 2000 13:57:52 -0500 Message-ID: From: Jason Young To: 'Leif Neland' , freebsd-hackers@FreeBSD.ORG Subject: RE: Turning on a relay. Date: Tue, 25 Apr 2000 13:57:48 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I think you need to have a fd open on /dev/io to do inb/outb. Jason Young Access US(tm) Chief Network Engineer > -----Original Message----- > From: Leif Neland [mailto:leifn@neland.dk] > Sent: Tuesday, April 25, 2000 1:51 PM > To: freebsd-hackers@FreeBSD.ORG > Subject: Turning on a relay. > > > I'd like to turn on a relay to the power for my laserprinter > 3 rooms away > where the server is located. > > I have an i/o board with a 8255 24 bit i/o port.(IIRC) > > So I wrote a simple userland program to do inb/outb, but it > dumped core with > BUSERR, I presume because userland is not supposed to do i/o to the > hardware. > > I guess I have these options: > A: write a driver/kernel module to access the port. > B: use an extra parallel port. (I use 2 at the moment) > C: use a serial port; I have 3-4 available. > > What would be the simplest to interface from a shellscript, > i.e. the spooler > to turn on and off the printer? (The relay has a turn-off > delay, so I don't > have to worry about turning off the power after everything > has been sent, > but the printer not finished, or turning off/on between printjobs) > > Leif > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message