Results 1 to 3 of 3

Thread: [RESOLVED] WIFI signal strength to monitor

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    Resolved [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,
    steve

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    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:
    1. private AdapterCollection m_adapters;
    2.         private Adapter m_currentAdapter;
    3.         private void UpdateApdaters()
    4.         {
    5.             //Get all the network adapters for the device
    6.             m_adapters = Networking.GetAdapters();
    7.  
    8.             this.label1.Text = m_adapters.Count.ToString();
    9.  
    10.             //Assign the adapter to the current adapter that is currently being used.
    11.             foreach(Adapter adapter in m_adapters)
    12.             {
    13.                 this.label2.Text = adapter.Name;
    14.                 m_currentAdapter = adapter;  
    15.             }
    16.  
    17.             //If there are no APs then the Device is not currently connected to any networks.
    18.             if (m_currentAdapter.NearbyAccessPoints.Count > 0)
    19.             {
    20.                 this.label5.Text = m_currentAdapter.NearbyAccessPoints.Count.ToString();
    21.  
    22.                 //Find the AP that the device currently connected to.
    23.                 foreach (AccessPoint ap in m_currentAdapter.NearbyAccessPoints)
    24.                 {
    25.                     if (ap.Name == m_currentAdapter.AssociatedAccessPoint)
    26.                     {
    27.                         this.label3.Text = ap.Name;
    28.                         this.label4.Text = ap.SignalStrength.ToString();
    29.  
    30.                         //Break out of for loop when the currently connected AP has been found.
    31.                         break;
    32.                     }
    33.                 }
    34.             }
    35.             else
    36.             {
    37.                 this.label1.Text = "None";
    38.                 this.label2.Text = "None";
    39.                 this.label3.Text = "None";
    40.                 this.label4.Text = "None";
    41.                 this.label5.Text = m_currentAdapter.NearbyAccessPoints.Count.ToString();
    42.             }
    43.         }
    44.  
    45.         //Poll every one second to get the access point strength
    46.         private void tmrPollAPs_Tick(object sender, EventArgs e)
    47.         {
    48.             UpdateApdaters();
    49.         }
    steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width