Networking Forums

Networking Forums > Wireless Networking > Wireless Internet > wmi script to display signal strength

Reply
Thread Tools Display Modes

wmi script to display signal strength

 
 
bjs555
Guest
Posts: n/a

 
      10-23-2005, 09:52 PM
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
 
 
 
 
alien
Guest
Posts: n/a

 
      10-24-2005, 01:53 PM

"bjs555" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
signal strength Usenet Wireless Internet 1 06-12-2005 04:07 PM
Signal strength from Cisco 350 Bridge from perl script? tomviolin Wireless Internet 7 04-25-2005 12:09 AM
System Tray Signal Strength -vs- Wireless Properties Strength Scott Wireless Networks 1 04-07-2005 10:17 PM
signal strength brian Broadband Hardware 1 08-29-2004 07:20 PM
signal strength ok? tommy Wireless Internet 1 01-13-2004 06:28 AM



1 2 3 4 5 6 7 8 9 10 11