USB device Remote Wakeup

Hi,

I am implementing remote wakeup fearture for the USB device.
As I understand there are two ways to get remote wakeup notifications and these are:

  1. Using set_feature command with REMOTE_WAKEUP feature selector
  2. Using IRP_MN_WAIT_WAKE

Can anyone tell me which is the fast and preferred way to do the same?
I dont have any UI to communicate with driver, kernel space have to handle it on its own.

Which is the preferred way to achieve the same? Also if possible how?

Thanks,
Polk J.


Get your free Email ID at www.zapakmail.com now!

You should send the IRP_MN_WAIT_WAKE. The core stack will ensure that the device is armed for wake. If you were to just send the SetFeature control transfer, then the controller may not be armed for wake itself.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@zapak.com
Sent: Wednesday, October 31, 2007 1:13 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB device Remote Wakeup

Hi,

I am implementing remote wakeup fearture for the USB device.
As I understand there are two ways to get remote wakeup notifications and these are:

  1. Using set_feature command with REMOTE_WAKEUP feature selector
  2. Using IRP_MN_WAIT_WAKE

Can anyone tell me which is the fast and preferred way to do the same?
I dont have any UI to communicate with driver, kernel space have to handle it on its own.

Which is the preferred way to achieve the same? Also if possible how?

Thanks,
Polk J.


Get your free Email ID at www.zapakmail.com now!


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi,

Yes, I completely agree on this.

After sending a control command for the remote wakeup is there a way to know from lower layers that some device has issued remote wakeup?

Another question is on IRP_MN_WAIT_WAKE, if I do not have any user interface to invoke such feature and at some particular place in code I am sure that device is in D0 state, so can I issue this IRP to PDO and will that be sufficient? What are the extra care at FDO we need to take in such case? Same for ther return path, in callback?

After going through IRP way I have observed that bus driver doesnt send REMOTE_WAKE since I dont see any such USB commands in CATC analyzer.

Please suggest your comments,

Thanks for the response,

Polk J.

-------------------------------------- Original Message --------------------------------------

From: xxxxx@windows.microsoft.com

Date: Oct 31, 2007 19:48:31

Subject: RE: [ntdev] USB device Remote Wakeup

You should send the IRP_MN_WAIT_WAKE. The core stack will ensure that the device is armed for wake. If you were to just send the SetFeature control transfer, then the controller may not be armed for wake itself.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@zapak.com
Sent: Wednesday, October 31, 2007 1:13 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB device Remote Wakeup

Hi,

I am implementing remote wakeup fearture for the USB device.
As I understand there are two ways to get remote wakeup notifications and these are:

  1. Using set_feature command with REMOTE_WAKEUP feature selector
  2. Using IRP_MN_WAIT_WAKE

Can anyone tell me which is the fast and preferred way to do the same?
I dont have any UI to communicate with driver, kernel space have to handle it on its own.

Which is the preferred way to achieve the same? Also if possible how?

Thanks,
Polk J.


Get your free Email ID at www.zapakmail.com now!


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Get your free Email ID at www.zapakmail.com now!

Not only must you send the wait wake irp, you must also send a Dx irp and put your device into a low power state.

d

Sent using my smartphone, apologies forany typos

-----Original Message-----
From: “xxxxx@zapak.com
To: “Windows System Software Devs Interest List”
Sent: 11/01/07 1:02 AM
Subject: Re: RE: [ntdev] USB device Remote Wakeup

Hi,

Yes, I completely agree on this.

After sending a control command for the remote wakeup is there a way to know from lower layers that some device has issued remote wakeup?

Another question is on IRP_MN_WAIT_WAKE, if I do not have any user interface to invoke such feature and at some particular place in code I am sure that device is in D0 state, so can I issue this IRP to PDO and will that be sufficient? What are the extra care at FDO we need to take in such case? Same for ther return path, in callback?

After going through IRP way I have observed that bus driver doesnt send REMOTE_WAKE since I dont see any such USB commands in CATC analyzer.

Please suggest your comments,

Thanks for the response,

Polk J.

-------------------------------------- Original Message --------------------------------------

From: xxxxx@windows.microsoft.com

Date: Oct 31, 2007 19:48:31

Subject: RE: [ntdev] USB device Remote Wakeup

You should send the IRP_MN_WAIT_WAKE. The core stack will ensure that the device is armed for wake. If you were to just send the SetFeature control transfer, then the controller may not be armed for wake itself.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@zapak.com
Sent: Wednesday, October 31, 2007 1:13 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB device Remote Wakeup

Hi,

I am implementing remote wakeup fearture for the USB device.
As I understand there are two ways to get remote wakeup notifications and these are:
1. Using set_feature command with REMOTE_WAKEUP feature selector
2. Using IRP_MN_WAIT_WAKE

Can anyone tell me which is the fast and preferred way to do the same?
I dont have any UI to communicate with driver, kernel space have to handle it on its own.

Which is the preferred way to achieve the same? Also if possible how?

Thanks,
Polk J.

-----------------------------------------------------------------
Get your free Email ID at www.zapakmail.com now!


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

-----------------------------------------------------------------
Get your free Email ID at www.zapakmail.com now!


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I believe all your questions are sufficiently answered in WDK docs. What about reading it?

After sending a control command for the remote wakeup is there a way to know from lower layers that some device has issued remote wakeup?

Forget about it. IRP_MN_WAIT_WAKE is supported way to go. I guess the answer to above questions is “no”.

Another question is on IRP_MN_WAIT_WAKE, if I do not have any user interface to invoke such feature and at some particular place in code I am sure that device is in D0 state, so can I issue this IRP to PDO and will that be sufficient? What are the extra care at FDO we need to take in such case? Same for ther return path, in callback?

In addition, you need to suspend your device. Read about selective suspend. For Vista and above, it may be better to send Dx IRP directly.

After going through IRP way I have observed that bus driver doesnt send REMOTE_WAKE since I dont see any such USB commands in CATC analyzer.

Sure. There is nothing to do if the device is in D0. You’d see setting remote wakeup feature just before OS suspends the device. It is your driver which has to instruct OS to suspend it.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]