Important alert: (current site time 7/15/2013 8:54:18 AM EDT)
 

winzip icon

WIFI Signal Strength

Email
Submitted on: 3/29/2004 5:33:27 AM
By: jon vaughan 
Level: Beginner
User Rating: By 2 Users
Compatibility: VB.NET
Views: 32123
(About the author)
 
     //--- PLEASE READ THIS BEFORE DOWNLOADING THE CODE ---// I have been searching the web for documentation on getting the signal strength from a WIFI device, there seems to be very little about. So I have created a class that simply gets the WIFI signal strength and returns it numerically or graphically as a bar. Here is my problem though, I dont actually have any WIFI network / devices to test this from. What im hoping is that someone will find this small prject useful and will take it over, test it and if it needs to be changed, change it and then re post it back for the rest of us to use. What I would like to really know is , what does this function return : Mo("Ndis80211ReceivedSignalStrength"), if I knew that I could finish this class off and post it back as a complete class :)
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
3/29/2004 5:46:02 PMGary Phetteplace

Works but signal is a negative number and does not read correctly on a progress bar

(If this comment was disrespectful, please report it.)

 
3/30/2004 3:31:38 PMChris Pietschmann, MCSD, MCAD

In the GetSignalStrength function change this line of code:
Return Convert.ToDouble(dbl_strength)

To:
Return Abs(Convert.ToDouble(dbl_strength))

This will make the number a positive.
(If this comment was disrespectful, please report it.)

 
3/30/2004 11:17:15 PM

Signal strength is normally expressed in dbm (ie db relative to 1 milliWatt, db is a log scale). This will usually be a negative value for receive strength - probably in the range of -90dbm to -40dbm, the -40 beign the stronger signal.
(If this comment was disrespectful, please report it.)

 
9/13/2004 5:30:01 AM

Im trying to get the Signal Strength app to work, but i get an error when i run it.

I think i've narrowed down my problem to the 'imports system' statement in your WifiStrength class.
Somehow, my system seems to recognize the "Imports System.Math", but it doesnt recognize "Imports System.Management". Any help is appreciated. BTW im on VStudio 2003
(If this comment was disrespectful, please report it.)

 
9/14/2004 2:28:28 AM

Hi, found my problem.
It seems i was using .net CF for my PDA which did not support server tools (System.Management).
Anyway, will have to look for a new approach to obtain signal strength reading. Will post it up for those having similar problems as me.
(If this comment was disrespectful, please report it.)

 
1/29/2005 9:28:22 AM

If you would like to test it your self there is an article in eWeek about finding wifi hotspots for free bandwidth.
http://www.eweek.com/article2/0,1759,1611879,00.asp
(If this comment was disrespectful, please report it.)

 
1/1/2007 2:08:39 PMclown engaged

hey it comes back at a negative num as u probably know and the range is not 0 - 100 its 0-200 so u divide by 20 instead of 10 then drawing the bar here is the link 2 the corrected one http://demonz05.googlepages.com/WIFI_Signa_Improved.rar
(If this comment was disrespectful, please report it.)

 
3/4/2007 10:49:09 AMeduard

can I switch on/off wifi module by sw, generally?
(If this comment was disrespectful, please report it.)

 
3/4/2007 10:51:01 AMeduard

can i switch on/off wifi module by app or can you add this to your sample?
(If this comment was disrespectful, please report it.)

 
8/2/2007 12:00:57 AMtechnogeek00

Hey i downloaded this and found that the signal that is returned is a negative and double the actual number. I fixed it to return the number as 1-100 percent, i tested it because i ran it along side a program that came with wifi card to check wifi strength, it works now.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.