[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [JOAQUIN HERRADA <jherrada@cirsa.com>] (fwd)
- To: rtl@rtlinux.org
- Subject: BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [JOAQUIN HERRADA <jherrada@cirsa.com>] (fwd)
- From: Der Herr Hofrat <der.herr@hofr.at>
- Date: Thu, 24 May 2001 08:51:34 +0200 (CEST)
>From owner-rtl Thu May 24 01:23:18 2001
Received: from ntdes.cirsa.com ([195.77.234.5])
by hq.fsmlabs.com (8.11.2/8.11.2) with SMTP id f4O7NHP13741
for <rtl@rtlinux.org>; Thu, 24 May 2001 01:23:17 -0600
Received: from iamcw40_jherrad ([192.168.254.104]) by ntdes.cirsa.com (Lotus SMTP MTA v4.6.5 (863.2 5-20-1999)) with SMTP id C1256A56.002814A3; Thu, 24 May 2001 09:17:47 +0200
Received: by localhost with Microsoft MAPI; Thu, 24 May 2001 09:19:19 +0200
Message-ID: <01C0E432.9CBF89F0.jherrada@cirsa.com>
From: JOAQUIN HERRADA <jherrada@cirsa.com>
To: "'rtl@rtlinux.org'" <rtl@rtlinux.org>
Subject: RE: [rtl] off-topic: ctrl-alt-delete
Date: Thu, 24 May 2001 09:19:18 +0200
Organization: IAMC
X-Mailer: Correo electronico de Internet de Microsoft/MAPI - 8.0.0.4211
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
You're lucky. You only need a free parallel port, a DB25 connector, 2
pieces of wire, and a switch.
You should try to build a loadable module (or a program with root access to
ports) that scans the
"printer status register".
Look your BIOS about the address of the parallel port (if it's 0x378, the
status register is the next one 0x379)
You can connect a switch between the pins 10 (Ack) or 11 (Busy) and
a pin with GND (i.e. 25). Then using a (inb(0x379) & mask) you can read the
status of the switch and if you want,
you can call the shutdown -t now when the switch is turned on. That's all.
Take care about the electrical noise, you'd better make a few scans before
shutting down the system (;>
Parallel Printer Port
Port 3BC printer data output (readable)
|7|6|5|4|3|2|1|0| ports 278, 378, 3BC
| | | | | | | +---- data bit 0, hardware pin 2
| | | | | | +----- data bit 1, hardware pin 3
| | | | | +------ data bit 2, hardware pin 4
| | | | +------- data bit 3, hardware pin 5
| | | +-------- data bit 4, hardware pin 6
| | +--------- data bit 5, hardware pin 7
| +---------- data bit 6, hardware pin 8
+----------- data bit 7, hardware pin 9
Port 3BD printer status register (Parallel Printer Port)
|7|6|5|4|3|2|1|0| ports 279, 379, 3BD
| | | | | | | +---- 1 = time-out
| | | | | +------- unused
| | | | +-------- 1 = error, pin 15
| | | +--------- 1 = on-line, pin 13
| | +---------- 1 = out of paper, pin 12
| +----------- 0 = Acknowledge, pin 10
+------------ 0 = busy, pin 11
Port 3BE printer control register (Parallel Printer Port)
|7|6|5|4|3|2|1|0| ports 27A, 37A, 3BE
| | | | | | | +---- 1 = output data to printer, (pin 1)
| | | | | | +----- 1 = auto line feed, (pin 14)
| | | | | +------ 0 = initialize printer, (pin 16)
| | | | +------- 1 = printer reads output, (pin 17)
| | | +-------- 0 = IRQ disable,1=IRQ enable for ACK
+------------- unused
-----Mensaje original-----
De: Ken Teh [SMTP:teh@phy.anl.gov]
Enviado el: jueves 24 de mayo de 2001 3:11
Para: Real Time Linux
Asunto: [rtl] off-topic: ctrl-alt-delete
I have a rackmount PC with a hard disk, no monitor, no keyboard, which I
would like to be able to run shutdown properly at the push of a button.
Right now I'm using a keyboard to push ctrl-alt-delete to do this, but I
was
wondering if anyone knows of something more elegant. A keyboard is a
mighty
big switch :)
Thanks!