the name says it all . A little widget that would monitor the signal strength. Can someone port this from this Konfabulator widget
Wifi Monitor
I would really like something like this too but I dont think it is possible
.
Check the Samurize forums - someone made a script to get WiFi strength (maybe they even uploaded it as a Download). That script + a couple of images and it will be done ![]()
Here is the code...I cant get it to work
I get an error on the 32nd line.
I dont know what it would do if it did work.
'Wireless Signal Strength
'Version 0.1
'Created 12th March 2004
'Last Modified 15th March 2004
'Copyright 2004, David Wheeler [email]drwheeler@lycos.com[/email]
' Addidtional contributions from Johnson on the Samurize forums
'Not redistributable without express permission from author.
on error resume Next
Private Sub GetWMI(WMIArray, WMIQuery)
Set WMIClass = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\wmi")
Set WMIArray = WMIClass.ExecQuery(WMIQuery)
End Sub
Function SigStrength()
Call GetWMI(objMSNdis_80211_ReceivedSignalStrengthSet, "Select * from MSNdis_80211_ReceivedSignalStrength Where active=true")
For Each objMSNdis_80211_ReceivedSignalStrength in objMSNdis_80211_ReceivedSignalStrengthSet
SigStrength = objMSNdis_80211_ReceivedSignalStrength.Ndis80211ReceivedSignalStrength
Next
End Function
Function SigStrengthBar()
SigStrengthBarRaw = SigStrength()
SigStrengthBar=0
If SigStrengthBarRaw > -57 Then
SigStrengthBar=5
ElseIf SigStrengthBarRaw > -68 Then
SigStrengthBar=4
ElseIf SigStrengthBarRaw > -72 Then
SigStrengthBar=3
ElseIf SigStrengthBarRaw > -80 Then
SigStrengthBar=2
ElseIf SigStrengthBarRaw > -90 Then
SigStrengthBar=1
End If
End Function
Function SSID()
Call GetWMI(objMSNdis_80211_ServiceSetIdentifierSet, "Select * from MSNdis_80211_ServiceSetIdentifier Where active=true")
For Each objMSNdis_80211_ServiceSetIdentifier in objMSNdis_80211_ServiceSetIdentifierSet
ID = ""
For i = 0 to objMSNdis_80211_ServiceSetIdentifier.Ndis80211SsId(0)
ID = ID & chr(objMSNdis_80211_ServiceSetIdentifier.Ndis80211SsId(i + 4))
Next
SSID = ID
Next
End Function
Thread:http://www.samurize.com/modules/ipboard/in...topic=2505&st=0
VERY IMPORTANT POST:
alrighty, so since I hate COM crap, I decided to find some math simple enough to use in a script, I racked my brain and came up with this!
it uses the exponential nature of decibels to make a curved line representing the range of -100 to -50 in a scale from 0 to 100
here's what you add to the end of the code posted above (instead of the if/elses)
SigStrengthBarRaw = SigStrengthBarRaw + 100
SigStrengthBar = (SigStrengthBarRaw * SigStrengthBarRaw) / 25
i know i know, it seems way too simple, but it took some serious quadradic thinking to get it!
i was a math minor in school, pretty sad it took me this long to figure out something that simple eh?
try it out yourselves, i did a whole page worth of nasty exponential algebra before i gave in and just drew a graph of what it should look like, and worked on a simple equation from there
oh btw it doesn't stay zero if the value drops below -100, so I hope the premise for that equation is true, if you're not sure, then just do a test before the calculation and if sigstrenght is less than -100, just return 0
hope someone finds this useful
It wont work for me either ![]()
i think jyrik may know something about this, or how to get it to work - he had posted those links about a month ago in another thread, but i could never get anywhere with them. i'd really like to see something like this go forward though
Aqua-Soft Forums