PDA

View Full Version : Question for the PC guru's



Bruce
- 27th January 2008, 23:09
Is there a single pin/signal on a PC PCI bus I can toggle high or low to suspend PC operation without causing a re-boot?

We have a small relay card that waits to receive an IR code from someone wearing an IR badge. Once this code is received, the relays engage and connect the video, USB ports, PS2 for keyboard/mouse, etc.

This works great. If you don't have the IR badge, you can't use the PC. However, if I can control a pin on the PCI bus that suspends the CPU, I could really simplify the circuit.

Is this do-able?


Regards,

-Bruce

tenaja
- 27th January 2008, 23:50
I don't know about your specific hardware question, but why not use the badge as a password alternative, and have them log out when done. My laptop has a fingerprint reader... I'm sure you could replace the function with a badge reader.

Darrel Taylor
- 28th January 2008, 01:54
Because if they walk away without logging out, anyone can walk up and use it.

_

tenaja
- 28th January 2008, 01:59
Yes, that is an issue. You can set the screen saver at 1 min., but that is still enough time depending on the security needed.

There are programs that allow a one-key entry to the screen saver. Perhaps you could implement that when the badge is removed.

Darrel Taylor
- 28th January 2008, 02:13
I think this is for a busy environment, with busy/distracted people using the computer.

It has to "not work" when they walk away.

Bruce,

Stopping the cpu in midstream doesn't sound like a very good idea.
Especially with Windows.

Could be writing to disk or whatever at the time.

Just a thought ... You could simulate pressing the sleep button on a keyboard, to let the system enter stand-by when it doesn't see a badge. Then limit Mouse/Keyboard activity until it sees a badge again.

But that sounds difficult.

_

Acetronics2
- 28th January 2008, 08:31
Hi, Bruce

Why not simply "cut" the video signal at the input of the monitor ...

my monitor enters sleep mode when not receiving signals ...


did you ever try to work on a monitorless PC ...

Alain

Luciano
- 28th January 2008, 08:43
Hi Bruce,

Go to the Control Panel and select "Power options" "Advanced TAB".

http://img205.imageshack.us/img205/5561/powerbtk8.th.png (http://img205.imageshack.us/img205/5561/powerbtk8.png)
(Click to enlarge the picture)

See also the hibernate TAB in "Power options".
Search in the Windows XP help file "hibernate".

Understanding Differences Between Hibernate and Stand By:
http://www.timeatlas.com/mos/Term_to_Learn/General/Understanding_Differences_Between_Hibernate_and_St and_By/

* * *

Note that in the BIOS there is also an option to change the function
of the power button. (On/Off or Suspend).

Regardless of the selected function of the power button, if the power
switch (button) is pressed for more than four seconds, the computer is
powered off. (Same as when you unplug the AC power cable).

Best regards,

Luciano

* * *

EDIT

The idea is to control the PC only with the power switch.
The PC will be powered on or waked up with the same power switch.
Your IR badge relay will be connected in parallel to power switch.
(The power switch is the push button on the front of the PC).

Before you can do that you will have to unselect the check boxes
that let you wake up the PC with the keyboard and the mouse.

http://img165.imageshack.us/img165/9055/kbsblz3.th.png (http://img165.imageshack.us/img165/9055/kbsblz3.png)
(Click to enlarge the picture)

http://img254.imageshack.us/img254/1205/mousesbte0.th.png (http://img254.imageshack.us/img254/1205/mousesbte0.png)
(Click to enlarge the picture)

Bruce
- 28th January 2008, 13:25
Thanks for all the replies.

Alain;

We're already breaking video, PS2, and USB connections. It works great as-is, but I would like to simplify the hardware.

Luciano;

This one looks interesting. Thanks. The only problem I see with this approach is that a user could re-enable mouse/keyboard wakeup options once logged in. If there were some way to disable all input peripherals by controlling a bus signal, that would be perfect

Darrel;

Good points. Thanks. I'll look into what happens in suspend/hibernate. I wonder if networked PC's will drop-off the network in suspended or hibernate?

Luciano
- 28th January 2008, 14:02
The only problem I see with this approach is that a user could re-enable mouse/keyboard wakeup
options once logged in. If there were some way to disable all input peripherals by
controlling a bus signal, that would be perfect.

Are the users administrators???

skimask
- 28th January 2008, 14:07
Good points. Thanks. I'll look into what happens in suspend/hibernate. I wonder if networked PC's will drop-off the network in suspended or hibernate?
I've got a setting in my BIOS called 'WAKE ON LAN'. But, I'm not sure if that means 'WAKE up anytime you hear anything come across the RJ45 jack' or maybe 'WAKE whenever you see a packet with my MAC address come across', or what. Never tried it.
But I can tell you that my both of my laptop's, and 2 PC's (plus a Wii and 2 Axim's) maintain the same local IP on my local wireless using DHCP before and after using hibernate (memory dump to hard drive, system shut off) and/or standby (system shut off, but memory kept refreshed). But if I do a complete shutdown, yes, when they come back up, the IP is sometimes different than it was before.

I was thinking about the first post. You've got IR badges? I take it that they shoot out an IR signal at regular intervals? How about receiving that IR signal with a separate PIC and using that IR signal as a sort of 'CLEARWDT' in a program. The PIC doesn't get the IR signal and, if there is 5v on one of the hard drive power connectors, it kicks a relay which connects the power button, PC shuts down. Later, the IR signal returns, PIC sees it, check the 5v line on the power connector, kick the relay, PC powers up. Maybe 15 seconds before it shuts the PC down, it fires off a small beeper to warn that it's about to shut down the PC, in case the user is turned around talking to somebody or something like that.

Bruce
- 28th January 2008, 14:12
Not every user will have admin rights,, so on a system with admin options it would work fine, but not on older operating systems like ME, 98, etc.

Luciano
- 28th January 2008, 14:24
@skimask

If you enable 'WAKE ON LAN' the users on the network will be able to wake up other PCs.

Example of command line freeware:
http://www.matcode.com/wol.htm

Best regards,

Luciano

Bruce
- 28th January 2008, 14:33
You've got IR badges?
Yes.

I take it that they shoot out an IR signal at regular intervals?
Yes. The IR badge system works perfectly already. What I'm looking for is some way to
eliminate several mechanical relays. If we can interface to the PC bus via a PCI or ISA
card slot, and disconnect/disable input hardware, we can drop most of the relays.

Physically switching input devices & video works fine, but if there's an easier way, which
requires < hardware, I'm all ears...;o}

skimask
- 28th January 2008, 14:58
Yes. The IR badge system works perfectly already. What I'm looking for is some way to eliminate several mechanical relays. If we can interface to the PC bus via a PCI or ISA card slot, and disconnect/disable input hardware, we can drop most of the relays.

There has to be a way to send the 'Sleep' and 'Wakeup' keyboard commands over the USB port, if in fact the keyboards are USB. Heck, even PS/2 should work.

Bruce
- 28th January 2008, 15:11
This device is invisible to the operating system. There is no communications between it and the PC.

sayzer
- 28th January 2008, 15:53
This device is invisible to the operating system. There is no communications between it and the PC.

And I guess no software intervention is desired nor is planned then.

I was thinking; a small program works in background listening to an interrupt on PCI bus; and when it happens, the software disables the selected peripherals. As far as I know, there are 256 interrupt options. I might be wrong.

Wouldn't this be an easier way?

I am no PC guru BTW.

Luciano
- 28th January 2008, 17:12
Resume from hibernate will always require the use of the power button.
(The mouse or the keyboard will not wake the PC from hibernation).

Bruce
- 28th January 2008, 17:15
There are no communications pipes or connections between this hardware device & the PC, so there is no way for any software running on the PC to interact with it

Bruce
- 28th January 2008, 17:18
Resume from hibernate will always require the use of the power button.
(The mouse or the keyboard will not wake the PC from hibernation).
I wish that were true. I setup my Windows ME machine to enter hibernate on a quick press of the power button.

It works perfectly, but it will wake from hibernate on mouse movement or a key-press...;o}

ME does not provide options to disable wakeup via mouse or keyboard.

Luciano
- 28th January 2008, 17:37
The PC is probably not going to hibernation. The PC is powerd off when it goes to hibernation.

The hibernate feature saves everything in memory on disk, turns off your monitor and hard disk,
and then turns off the computer.

When you resume from hibernation the BIOS performs the typical Power On Self Test (POST),
and then reads the hibernation file, Hiberfil.sys, to restore the state of the computer.
Everything that was running when you put the computer in hibernation is restored.

Bruce
- 28th January 2008, 18:36
It definitely appears to be entering hibernate mode. Under Power Options Properties, Advanced, I have Hibernate selected when I press the power button.

I press the power button momentarily, and it does appear to enter hibernate mode. It takes a good while for it to wakeup.. But mouse movement, a key-press on the keyboard, or pressing the power button again will wake it up. Windows ME does not give the option to disable wakeup via mouse or keyboard activity.

It saves everything I had going prior to hibernate, just as explained on the link you posted, and it for sure does take longer with hibernate selected VS Stand By mode when it wakes up. Am i missing something?

skimask
- 28th January 2008, 18:56
If I remember right, when my PC's go into Hibernate (either by the option in one of the logoff menus or the power button if it's configured that way), I get a Progress bar on the screen both when it goes into and when it comes out of Hibernate. Keyboard, Mouse, doesn't power the system up, only the power button.

For standby, it goes straight to the logoff screen (but doesn't really logoff), stays for a couple of seconds, then shuts down. On power up (either by the keyboard, mouse, or power button if so configured), the screen just pops up the same as when I hit Standby.

Do you get the Progress bar along the bottom of the screen on Power up after the post?

Luciano
- 28th January 2008, 19:43
Hi Bruce,

At the end of the "hibernation" process, the PC is powered off and you can unplug
the AC power cable of your desktop computer or remove the battery/power supply
in case you are using a notebook.

In the help file of Windows 98SE you can read:

You cannot put your computer in hibernation if you have a FAT32 drive.

* * *

Do you see the BIOS perform the typical power on self test when you resume
from hibernation?

Best regards,

Luciano

Bruce
- 28th January 2008, 19:56
Ok here's what I've found. On a system that doesn't have sufficient hard drive space to stash the hibernate file, you're essentially screwed.

It will "appear" to enter hibernate mode, and auto-restart once it figures out there's not enough room to stash everything on your hard drive in this nifty hibernate file. Trial & error here.

I was moving the mouse or pressing a key on the keyboard long before it figured this out, so it "appeared" the system was re-starting due to my moving the mouse or pressing a key.

It just took a very long time for Windows to figure out there wasn't enough hard drive space to store this huge hibernate file.

Switched to an XP system, with a boat-load of hard drive space available, and bingo. It does indeed give me the progress bar thing when entering hibernate, and it won't resume without a press on the power button.

With stand by selected, it resumes as advertised with a mouse or key-press, but only if these are enabled in device manager.

This is great BUT, it's totally worthless if there's not enough space on a hard drive to store the silly (and incredibly HUGE) hibernate file before hibernate shutdown, so this option is essentially worthless for the application. We really have no idea if a PC this will be installed on has the resources for hibernate to work. It would be awesome if it wasn't limited to hard drive space available.

Huge bummer. It looked so easy.

Edit: Yes. It does go through the bios screen when restarting from hibernate. Then it resumes with everything on-screen just like it was before entering hibernate.

skimask
- 28th January 2008, 21:05
it's totally worthless if there's not enough space on a hard drive to store the silly (and incredibly HUGE) hibernate file

hibernat.sys should only be just a tad bigger than total memory installed (1GB mem = about 1.1GB hard drive space used).
Yes, it's huge, but it's also generally placed at the 'front' of the drive, behind the paging file, for quick access.
So, yes, if you're short on drive space, and don't have a lot of memory (and/or slow drives, etc), it'll begin to look pretty ugly pretty quick.