Turn on/off a WiFi compact flash adapter.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I'm doing in C sharp a small library to turn on/off a WiFi compact flash
adapter on a Psion Workabout Pro C with Windows CE 4.2


To turn off I've been told I have to:

- Open the NDIS power device "NPW1:"

- Build up an NDISPWR_SAVEPOWERSTATE structure with the right adapter name
in it, along with the target state of D4 for disabled, and call
DeviceIoControl passing IOCTL_NPW_SAVE_POWER_STATE. Close the "NPW1:"
driver handle

- If NDIS supports power management, send it a SetDevicePower call with the
D4 state

- Send an IOCTL_NDIS_UNBIND_ADAPTER to the target adapter

- Send an IOCTL_NDIS_GET_ADAPTER_BINDINGS call to the adapter (you can tell
if it's bound by checking the returned string)


1. Before doing that Comm\NdisPower\<AdapterName> registry value must be set
or not to 0x00000004?

2. How to check if NDIS supports power management?

3. I've done SetDevicePower(adapterName, POWER_NAME,
CEDEVICE_POWER_STATE.D4) but what value does adapterName have?
"NPW1:", "NDS0:", "NDS1:" or what?

4. In the IOCTL_NDIS_GET_ADAPTER_BINDINGS call to the adapter I must specify
lpOutBuffer and nOutBufferSize, but what value has nOutBufferSize since I do
not know how big is the retrieved list of protocol driver names?

5. To turn on wich are the steps?
The same changing D4 to D0 and UNBIND to BIND or what?


Thanks,
Luigi.


.



Relevant Pages

  • Re: Turn on/off a WiFi compact flash adapter.
    ... Build up an NDISPWR_SAVEPOWERSTATE structure with the right adapter name ... How to check if NDIS supports power management? ... specify lpOutBuffer and nOutBufferSize, ...
    (microsoft.public.windowsce.embedded)
  • Re: selectively bind a NDIS IM
    ... If is is a specific adapter identified by hardware ID, the you can write a NDIS "Notify Object" that is run at install time. ... A Notify Object can restrict bindings to a specific VID/PID. ...
    (microsoft.public.development.device.drivers)
  • Re: NDIS-cable status
    ... for the adapter shows a "red X" and Network Connections shows "Network Cable ... my driver will redirect any traffic to the other adapter transparent to the ... > the NIC directly using a mechanism that bypasses the NDIS IM filter. ... >> but still the status of network connection becomes cable unpulgeed. ...
    (microsoft.public.development.device.drivers)
  • Re: How to change the IP address under the wince?
    ... you should be able to change the registry and then tell NDIS to rebind ... the adapter to be disconnected, ... > For restart you have two options. ...
    (microsoft.public.windowsce.app.development)
  • Turn on/off a WiFi compact flash adapter.
    ... Build up an NDISPWR_SAVEPOWERSTATE structure with the right adapter name ... How to check if NDIS supports power management? ... lpOutBuffer and nOutBufferSize, but what value has nOutBufferSize since I do ...
    (microsoft.public.windowsce.embedded.vc)