Author |
Topic |
|
ccoats
18 Posts |
Posted - 19 Feb 2007 : 10:19:24
|
I need to be able to programatically disable and enable network adapters - specifically a Symbol wireless card. And when I say disable, I mean that it has to turn off completely so that it is not transmitting RF at all.
It seems like it should be possible because going to the Settings -> Network and Dial-up Connections menu and disabling the device manually seems to do the trick, but I haven't found the WinCE API for this yet. |
|
ctacke
877 Posts |
Posted - 19 Feb 2007 : 10:56:00
|
SetDevicePower to D0 typically works to power down the radio. |
|
|
ccoats
18 Posts |
Posted - 19 Feb 2007 : 12:45:03
|
Thanks for the reply.. According to your post (which I've found now that I know what to look for, thanks) at topic 1442, I should be looking in HKLM\System\CurrentControlSet\Control\Power\Interfaces to find the GUID I need. My device is not listed there, although I see the GUID for "Power Manageable NDIS miniports". From your example I tried just appending the name of my device, and I haven't gotten it to work.
SetDevicePower(_T("{98C5250D-C29A-4985-AE5F-AFE5367E5006}\\NETWLAN1"), POWER_NAME, D4);
If it doesn't specifically show up in that list, does that mean the device doesn't support power down via this API? |
|
|
ctacke
877 Posts |
Posted - 19 Feb 2007 : 13:58:09
|
Yep, that's what it means. However you may have anotehr recourse. You say the control panel works? Is this a Symbol CPL, or the standard WINCE CPL? If it's the CE applet you can look in the CE source to see exactly what it's doing when you change that checkbox. If it's a Symbol-specific applet you'll likely have to contact Symbol support and ask if they have an API for it. |
|
|
akidder
1519 Posts |
Posted - 19 Feb 2007 : 15:20:42
|
A brute-force method (i.e. driving the hardware) is posted at topic 1075. You would directly turn off power to the PCMCIA or CF slot to power down the card. When you power the card back up, you issue WM_DEVICECHANGE to reload its drivers. This code won't be portable to CE 6.0 (which no longer allows you to hit the hardware directly), but it can be worked around by wrapping the PCMCIA control code in a driver.
Hopefully there is a built-in software solution that will meet your needs. Driver solutions are always preferred over the sledge hammer techniques. :) |
|
|
|
Topic |
|
|
|