Go Back   Wireless and Wifi Forums > News > Newsgroups > alt.internet.wireless
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-23-2005, 09:52 PM
bjs555
Guest
 
Posts: n/a
Default wmi script to display signal strength

I couldn't get Netstumbler to work with some of my cards and dongles
so I did some searching on the net and learned that a wireless card's
signal strength is available as a WMI (Windows Management
Instrumentation) value. So I put together this quick and dirty script
that gives a continuous real time display of received signal strength
for an active wireless connection. It's worked with all my clients,
even ones that don't work under Netstumbler. I'm posting it here
thinking that maybe someone else will find it useful. Perhaps someone
will suggest improvements too.

To use the script, just paste the text below into an editor like
Notepad and save it with the name bjs555monitor.vbs. Then open a
command window and navigate to the folder where you saved the script.
Start the script by typing cscript bjs555monitor.vbs. Stop it with
Ctrl + C. If you try to run it outside of a command window, it will
work, but you'll only get updates when you press OK and you'll have to
shut it down by pressing Ctrl+Alt+Del and killing the Windows Script
Host task or rebooting. You should be connected to an access point
before you start the script.

Here it is:

'bjs555monitor.vbs
'This script will continuously display the received signal
'strength of an active wireless connection in a command
'window. The update rate is once per second. Start it by
'typing cscript bjs555monitor.vbs at a command prompt.
'Stop it by pressing Ctrl + C. If you paste this script into a
'text editor, just save it with the name bjs555monitor.vbs
'(or anything ending with .vbs) so that Windows will recognize
'it as a vbscript file.
set objSwbemServices = GetObject("winmgmts:\\.\root\wmi")
do while 1
set colInstances = objSwbemServices.ExecQuery _
("Select * From MSNdis_80211_ReceivedSignalStrength "_
& "Where Active = True")
for each objInstance in colInstances
signal = objInstance.Ndis80211ReceivedSignalStrength & " dBm"
next
wscript.echo signal
wscript.sleep(1000)
loop

I found out something interesing using this script. I have a Linksys
WUSB11v4 radio that I tried it on. When I look at the output, I see
that all readings are multiples of 5 dB. It seems that the Linksys
client doesn't report signal strength with resolution better than 5
dB. The other 2 radios I tried it on (Zonet ZEW2501 and Hawking
HWU54G) both showed readings with resolutions of 1 dB. I'd be
interested in finding out if all Linksys products show only crude
approximations of signal strength.

Bruce

Reply With Quote
  #2 (permalink)  
Old 10-24-2005, 01:53 PM
alien
Guest
 
Posts: n/a
Default Re: wmi script to display signal strength


"bjs555" <aaa@bbb.com> wrote in message
news:ltunl1pi20nai191rlr6dd98ohfa128e4n@4ax.com...
>I couldn't get Netstumbler to work with some of my cards and dongles
> so I did some searching on the net and learned that a wireless card's
> signal strength is available as a WMI (Windows Management
> Instrumentation) value. So I put together this quick and dirty script
> that gives a continuous real time display of received signal strength
> for an active wireless connection. It's worked with all my clients,
> even ones that don't work under Netstumbler. I'm posting it here
> thinking that maybe someone else will find it useful. Perhaps someone
> will suggest improvements too.
>
> To use the script, just paste the text below into an editor like
> Notepad and save it with the name bjs555monitor.vbs. Then open a
> command window and navigate to the folder where you saved the script.
> Start the script by typing cscript bjs555monitor.vbs. Stop it with
> Ctrl + C. If you try to run it outside of a command window, it will
> work, but you'll only get updates when you press OK and you'll have to
> shut it down by pressing Ctrl+Alt+Del and killing the Windows Script
> Host task or rebooting. You should be connected to an access point
> before you start the script.
>
> Here it is:
>
> 'bjs555monitor.vbs
> 'This script will continuously display the received signal
> 'strength of an active wireless connection in a command
> 'window. The update rate is once per second. Start it by
> 'typing cscript bjs555monitor.vbs at a command prompt.
> 'Stop it by pressing Ctrl + C. If you paste this script into a
> 'text editor, just save it with the name bjs555monitor.vbs
> '(or anything ending with .vbs) so that Windows will recognize
> 'it as a vbscript file.
> set objSwbemServices = GetObject("winmgmts:\\.\root\wmi")
> do while 1
> set colInstances = objSwbemServices.ExecQuery _
> ("Select * From MSNdis_80211_ReceivedSignalStrength "_
> & "Where Active = True")
> for each objInstance in colInstances
> signal = objInstance.Ndis80211ReceivedSignalStrength & " dBm"
> next
> wscript.echo signal
> wscript.sleep(1000)
> loop
>
> I found out something interesing using this script. I have a Linksys
> WUSB11v4 radio that I tried it on. When I look at the output, I see
> that all readings are multiples of 5 dB. It seems that the Linksys
> client doesn't report signal strength with resolution better than 5
> dB. The other 2 radios I tried it on (Zonet ZEW2501 and Hawking
> HWU54G) both showed readings with resolutions of 1 dB. I'd be
> interested in finding out if all Linksys products show only crude
> approximations of signal strength.
>
> Bruce


My Linksys WMP54GX mimo PCI adapter shows 1 dB resolutions. Your script is
less intrusive than Netstumbler for aiming my antenna since it doesn't
interupt Windows Wireless Zero Config. Cool. Thanks!

alien



Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WiFi Signal strength Duane in Hillman alt.internet.wireless 2 12-28-2007 12:25 AM
Signal Strength - Competing Cells - Constructive/Destructive Interference baumgrenze alt.cellular.verizon 52 03-25-2007 11:25 PM
CellID and signal strength Simon Tennant uk.telecom.mobile 1 11-05-2006 02:02 PM
Signal strength non PC card radio thboob@yahoo.com alt.internet.wireless 2 08-13-2006 09:07 PM
General Signal Strength Question jubrand Network Troubleshooting 1 03-12-2006 06:31 AM


All times are GMT. The time now is 04:30 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45