[RESOLVED] WIFI signal strength to monitor
Hello,
WM 6.0 VS 2008 CF 3.5
I am developing a mobile application and I want to monitor the strength of the WIFI network. I need to monitor and display the current network signal strength.
So far I have looked at SNAPI, but all there I can find is WIFI Connected, connecting, Hardwarepresent, etc. But none for measuring the strength of the network. There is a phoneSignalStrength, which is not what I want.
Is there any other API calls that can be used to get the current strength of the network.
Many thanks for any advice,
Re: WIFI signal strength to monitor
Hello there,
Would this be of any use to you?
I have not read the whole article, but it does mention that you can use the OpenNetCF Libraries Adapter class to get the information that you are looking for.
Hope this helps!!
Gary
Re: WIFI signal strength to monitor
Hello,
I am using the OpenNETCF framework to develop this wifi application. I am just wondering if there is any thing better that can be done with my code.
The idea is that it will monitor the strength every second using a timer control. In the timer control it will call the function to updateAdapters.
It will only monitor the strength of the AP that it is connected to, and no others.
I have put some labels just to indicate some information.
If you know of a better method to do this, which is more reliable and efficient, please let me know.
vb Code:
private AdapterCollection m_adapters;
private Adapter m_currentAdapter;
private void UpdateApdaters()
{
//Get all the network adapters for the device
m_adapters = Networking.GetAdapters();
this.label1.Text = m_adapters.Count.ToString();
//Assign the adapter to the current adapter that is currently being used.
foreach(Adapter adapter in m_adapters)
{
this.label2.Text = adapter.Name;
m_currentAdapter = adapter;
}
//If there are no APs then the Device is not currently connected to any networks.
if (m_currentAdapter.NearbyAccessPoints.Count > 0)
{
this.label5.Text = m_currentAdapter.NearbyAccessPoints.Count.ToString();
//Find the AP that the device currently connected to.
foreach (AccessPoint ap in m_currentAdapter.NearbyAccessPoints)
{
if (ap.Name == m_currentAdapter.AssociatedAccessPoint)
{
this.label3.Text = ap.Name;
this.label4.Text = ap.SignalStrength.ToString();
//Break out of for loop when the currently connected AP has been found.
break;
}
}
}
else
{
this.label1.Text = "None";
this.label2.Text = "None";
this.label3.Text = "None";
this.label4.Text = "None";
this.label5.Text = m_currentAdapter.NearbyAccessPoints.Count.ToString();
}
}
//Poll every one second to get the access point strength
private void tmrPollAPs_Tick(object sender, EventArgs e)
{
UpdateApdaters();
}