Hello there,
I have encountered a compatibility problem with the 'AccessPointCollection' class (SDF 2.1). I refer to this topic:
Anonymous:I have a seemingly curious behaviour when
working with the OpenNETCF.Net - Classes on my (Asus myPal A696, with
Windows Mobile 6 Classic) Pocket PC.
Curious because I have tried
the same program code on several different devices (FS Pocket Loox,
Dell Axim, hp Ipaq) where the following code works great on. Just on
the Asus it is a problem.
The following code is used to add the names of the nearby accesspoints to the combobox 'cb_Netze':
private void holeNetze()
{
AccessPointCollection APCollection;
AdapterCollection adapterCollection;
adapterCollection = Networking.GetAdapters();
this.cb_Netze.Items.Clear();
foreach (Adapter adapter in adapterCollection)
{
if (adapter.IsWireless)
{
APCollection = adapter.NearbyAccessPoints;
foreach (AccessPoint AP in APCollection)
{
if(!cb_Netze.Items.Contains(AP.Name))
{
this.cb_Netze.Items.Add(AP.Name);
}
}
}
}
}
When
calling this method on my Asus device, the combobox rests empty. I have
found out that 'adapter.NearbyAccessPoints' returns an empty
AccessPointCollection, although the Wi-Fi-Manager of the Asus device
shows about 6 nearby AccessPoints.
The curious thing about this is,
that, when calling the same method twice close after one another, the
correct names are displayed in the combobox, meaning that the method
works in that case.
Just for 'fun', I tried what happens if you call
the method thrice (?=three times) after one another... in that case, it
also doesn't work.
When calling the method twice with a gap of more than about 1-2 seconds, it also doesn't work.
Huh? What can THAT be? ;-)
It's
really important for me to get this method working on that Asus Pocket
PC. It would be great if you could help me to solve this
problem!
(http://community.opennetcf.com/forums/t/10175.aspx)
I have found out, that this seems to be a problem of devices with Windows Mobile 6 installed. The above mentioned sample works great on earlier Windows Mobile Versions. I have tried it on 2 different WM6-Devices (Asus myPal A696 and HP iPAQ 114), where this doesn't work.
It seems to me as if the AdapterCollection remains empty while it is updated. Unfortunately I don't know the inner structure of the OpenNetCF.Net-Library.
It would be great if someone with a WM6-device could reproduce this and give me feedback to verify my suspect.
By the way, is there any other way to access WLAN signal strength, apart from OpenNetCF?