From owner-freebsd-hackers Tue Apr 25 11:51:39 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.internet.dk (ns.internet.dk [194.19.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 74E7837B5C3 for ; Tue, 25 Apr 2000 11:51:33 -0700 (PDT) (envelope-from leifn@neland.dk) Received: (from uucp@localhost) by ns.internet.dk (8.9.2/8.9.3) with UUCP id UAA51701 for freebsd-hackers@FreeBSD.ORG; Tue, 25 Apr 2000 20:51:30 +0200 (CEST) (envelope-from leifn@neland.dk) Received: from gina (gina.neland.dk [192.168.0.14]) by arnold.neland.dk (8.9.3/8.9.3) with SMTP id UAA99943 for ; Tue, 25 Apr 2000 20:50:58 +0200 (CEST) (envelope-from leifn@neland.dk) Message-ID: <00b901bfaee7$55da1fe0$0e00a8c0@neland.dk> Reply-To: "Leif Neland" From: "Leif Neland" To: Subject: Turning on a relay. Date: Tue, 25 Apr 2000 20:51:14 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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