Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Turn WIFI ON after Soft-Reset

18 views
Skip to first unread message

Mongolfier

unread,
Apr 18, 2006, 10:14:35 AM4/18/06
to
Hi all,

I'm using the following class to turn WIFI adapter On and Off on my
Pocket PC 2003.

This code work fine if the WiFi is activated from the WiFi Control
Panel, but when I turn the WiFi Off and later I soft reset the PDA, I'm
not able to turn WiFi On again from my application.

Is there a way to force the WiFi to get active ?
Can be possible that after the soft-reset, this class isn't enable to
turn on the WiFi adapter because the driver is not loaded ?
In this case, how could I load the driver "tiacxwln.dll" ?

public class WLANController
{
#region DllImports etc...
private enum PowerState
{
PwrDeviceUnspecified = -1,
D0 = 0, // Full On: full power, full functionality
D1 = 1, // Low Power On: fully functional at low power/performance
D2 = 2, // Standby: partially powered with automatic wake
D3 = 3, // Sleep: partially powered with device initiated wake
D4 = 4, // Off: unpowered
PwrDeviceMaximum = 5
}

[DllImport("coredll.dll")]
private static extern int DevicePowerNotify(string name, PowerState
state, int flags);
[DllImport("coredll.dll")]
private static extern int SetDevicePower(string name, int flags,
PowerState state);
#endregion

#region Public methods
/// <summary>
/// Powers down the WLAN radio.
/// </summary>
public static void PowerDownWLANRadio()
{
try
{
DevicePowerNotify(@"{98C5250D-C29A-4985-AE5F-AFE5367E5006}\TIACXWLN1",
PowerState.D4, 1);
SetDevicePower(@"{98C5250D-C29A-4985-AE5F-AFE5367E5006}\TIACXWLN1", 1,
PowerState.D4);
}
catch {}
}

/// <summary>
/// Powers up the WLAN radio.
/// </summary>
public static void PowerUpWLANRadio()
{
try
{
DevicePowerNotify(@"{98C5250D-C29A-4985-AE5F-AFE5367E5006}\TIACXWLN1",
PowerState.D0, 1);
SetDevicePower(@"{98C5250D-C29A-4985-AE5F-AFE5367E5006}\TIACXWLN1", 1,
PowerState.D0);
//GetAdapterName can only be fetched if WLAN is on, so resorting to the
fixed name I found on my HP hx4700
}
catch {}
}
#endregion
}


Thanks
Valerio

Paul G. Tobey [eMVP]

unread,
Apr 18, 2006, 10:51:56 AM4/18/06
to
How is the WiFi adapter connected to your Pocket PC? Does the adapter's
entry show up in the Network and DialUp Connections applet? Have you tried
telling it to rebind to TCP/IP after you turn the power on
(OpenNETCF.Net.Adapter has a method for this)?

Paul T.

"Mongolfier" <valerio....@tiscali.it> wrote in message
news:ePSmfJvY...@TK2MSFTNGP05.phx.gbl...

Mongolfier

unread,
Apr 19, 2006, 7:59:35 AM4/19/06
to
Hi Paul,

> How is the WiFi adapter connected to your Pocket PC?

The WiFi adapter is integrated in the PDA Qtek 9090.

> Does the adapter's entry show up in the Network and DialUp
Connections applet?

Yes, it does.
I can find out, the adpater in the Network Cards list.

> Have you tried telling it to rebind to TCP/IP after you turn the
power on (OpenNETCF.Net.Adapter has a method for this)?

I just tried to use Bind e Unbind.
If I save the Adapter object and I reuse it while the app is running, it
work.
Unfortunatelly when I unbind the Adapter it disapper from the
OpenNETCF.Net.AdapterCollection.
If I restart the App with WiFi off, I'm unable to rebind the adpater
again because I cannot find the adapter in the Collection.

Any idea about, how to get the adapter object when not present in the
collection ?

I'm also looking for a way to start the WiFi adapter "tiacxwln" after a
soft reset. In fact, in case of the user Turn the WiFi Power Off from
the control panel, I'm not able to restart it again.

Which is the way PPC 2003 use to load the driver at startup ?
Where it look for to load a driver or not ?

Thanks in advance
Valerio


Paul G. Tobey [eMVP] ha scritto:

Paul G. Tobey [eMVP]

unread,
Apr 19, 2006, 1:09:33 PM4/19/06
to
You can read the Windows CE 4.2 documentation for how and when drivers are
started. I can't cover that here.

I'd say try to do what the Adapter class does yourself: tell NDISUIO to bind
the adapter (it's just a name to NDISUIO). Since it seems that binding
works for you, I think that it's likely that this will work, too.

Paul T.

"Mongolfier" <valerio....@tiscali.it> wrote in message

news:%23a8%23ki6YG...@TK2MSFTNGP05.phx.gbl...

Seb

unread,
Jan 9, 2009, 12:02:02 PM1/9/09
to
Hello, i have the same problem.. do you have found a solution to turn On
after soft reset ?
Thx..!

url:http://www.ureader.com/msg/14286273.aspx

0 new messages