PDA

Bekijk de volledige versie : Does anybody know how to read the radiostrength in VB6 or .NET???



Unkeptgenie
15-11-2004, 20:32
Hi All!

I'm wondering if anybody can help me...
Does anybody know how to read the radio-values from my WL-100g?? I have to write a little program that we can use to perform site-surveys on certain points.

I'm using VB6 or .NET on (sorry) Windows 2000.

Thanks for the trouble...

brubber
15-11-2004, 21:12
simply search the MSDN libraries:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk40/html/cxgrfNDISLibraryFunctions.asp

and

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceddk40/html/cxrefNDIS_802_11_RSSI.asp

or if you don't have Windows CE

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/network/hh/network/210wlsod_bc8f9c0e-9290-4a55-9a31-082f00f8bc18.xml.asp (Windows DDK)

Or use WMI solution


Imports System.Management

Public Function GetSignalStrength() As String
On Error GoTo oops

Dim query As ManagementObjectSearcher
Dim Qc As ManagementObjectCollection
Dim Oq As ObjectQuery
Dim Ms As ManagementScope
Dim Co As ConnectionOptions
Dim Mo As ManagementObject
Dim outp As String

Co = New ConnectionOptions
Ms = New ManagementScope("root\wmi")
Oq = New ObjectQuery("SELECT * FROM MSNdis_80211_ReceivedSignalStrength Where active=true")
query = New ManagementObjectSearcher(Ms, Oq)
Qc = query.Get
outp = ""

For Each Mo In query.Get
outp = outp & Mo("Ndis80211ReceivedSignalStrength") & " "
ISIPActive = Mo("Active")
Next

Return Trim(outp)
Exit Function
oops:
Return Err.Description
End Function


Why be sorry for W2K?? I really like working with it, should be a bit cheaper though.

Unkeptgenie
16-11-2004, 09:44
Thanks Brubber!

I'll have a go with this!
I used to work alot with VB6 and am now checking .NET out. I'm certainly going to give WMI a try!

Thanks again!