I am attempting to customize the behavior of our device. Based on the
state of an Event we want to have two different behaviors for the power
button. 1) Function as normal (On-Suspend) 2) Go to a fake suspend
state. My understanding is that unattended mode has this
characteristic. Right now my keypad driver issues the following
commands -
SetSystemPowerState(NULL, POWER_STATE_SUSPEND, POWER_FORCE);
SetSystemPowerState(NULL, POWER_STATE_ON, POWER_FORCE);

The problem is that when I issue the call
PowerPolicyNotify(PPN_UNATTENDEDMODE, TRUE); the screen does not blank
and all the buttons quit responding even the power button! There is a
post from David Liao (MS) that says to use the PPN_POWERBUTTONPRESSED
but there is no documentation of this and I did not understand his
post?

I have two paths I need to take:

1- Pwr Button -> unattended mode
Device Driver -> Suspend
Device Driver -> On

2- Pwr Button -> unattended mode
Pwr Button -> On

Any help would be appreciated as the documentation is extremely brief.

Gerrit

Re: PowerPolicyNotify and PPN_UNATTENDEDMODE by Chris

Chris
Thu Sep 29 20:42:10 CDT 2005

So is your platform's PM PDD based on a sample from the PUBLIC\COMMON
tree - if so, which sample? The requests end up going into your PDD, so
you'd need to track the PPN_UNATTENDED into there and then see what
IOCTLs get set to your device drivers. One thing to make sure of is
that the device drivers involved all support the PM IOCTLs and register
for them (IOCTL_SET_POWER, etc.).

-Chris


Re: PowerPolicyNotify and PPN_UNATTENDEDMODE by David

David
Sun Oct 02 01:50:06 CDT 2005

PowerPolicyNotify(PPN_UNATTENDEDMODE, TRUE) is only working for PDA version
of PM. Are you building PDA device? I don't believe Windows Mobile allow you
modify PM.DLL.

If you are building Windows CE based device, you still could use PDA version
of PM by setting SYSGEN_PM_PDA to 1. But, it behaves different from default
Windows CE PM.

David Liao

"gerrit" <google@gerritk.com> wrote in message
news:1128011637.546951.186480@g49g2000cwa.googlegroups.com...
>I am attempting to customize the behavior of our device. Based on the
> state of an Event we want to have two different behaviors for the power
> button. 1) Function as normal (On-Suspend) 2) Go to a fake suspend
> state. My understanding is that unattended mode has this
> characteristic. Right now my keypad driver issues the following
> commands -
> SetSystemPowerState(NULL, POWER_STATE_SUSPEND, POWER_FORCE);
> SetSystemPowerState(NULL, POWER_STATE_ON, POWER_FORCE);
>
> The problem is that when I issue the call
> PowerPolicyNotify(PPN_UNATTENDEDMODE, TRUE); the screen does not blank
> and all the buttons quit responding even the power button! There is a
> post from David Liao (MS) that says to use the PPN_POWERBUTTONPRESSED
> but there is no documentation of this and I did not understand his
> post?
>
> I have two paths I need to take:
>
> 1- Pwr Button -> unattended mode
> Device Driver -> Suspend
> Device Driver -> On
>
> 2- Pwr Button -> unattended mode
> Pwr Button -> On
>
> Any help would be appreciated as the documentation is extremely brief.
>
> Gerrit
>



Re: PowerPolicyNotify and PPN_UNATTENDEDMODE by gerrit

gerrit
Mon Oct 03 15:41:27 CDT 2005

Because I have included the Standard Shell component the Power
Management (Full) catalog item is pulled in as a dependency. When I
expand it I can see the MDD, common PDD and two sample power manager
PDD. With the debugger I verified that it is using the default not
the PDA PDD. Where/how do I set the SYSGEN_PM_PDA to 1? What other
consequences will there be? The PDD code is pretty involved and so I
have been trying to avoid modifying it. To get a fake off state maybe
I should just create another system power state in the registry with a
default power level of D4 except for the the keypad (and I need the
serial driver) Then when serial traffic stops do my transition to
sleep, or if the user presses the power button transition back to on?
The problem is I am not using any of the timeouts and so I don't
transition through the other power states (SystemIdle, UserIdle).


Re: PowerPolicyNotify and PPN_UNATTENDEDMODE by gerrit

gerrit
Thu Oct 06 14:17:44 CDT 2005

Let me be more specific. Where do I set SYSGEN_PM_PDA to 1 in order to
use the PDA Power Manager PDD?


Re: PowerPolicyNotify and PPN_UNATTENDEDMODE by Bruce

Bruce
Thu Oct 06 15:07:15 CDT 2005

PB menu Platform\Settings\Environment

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member


"gerrit" <google@gerritk.com> wrote in message
news:1128626264.850996.279630@g47g2000cwa.googlegroups.com...
> Let me be more specific. Where do I set SYSGEN_PM_PDA to 1 in order to
> use the PDA Power Manager PDD?
>



Re: PowerPolicyNotify and PPN_UNATTENDEDMODE by gerrit

gerrit
Thu Oct 06 15:22:15 CDT 2005

Thanks Bruce.