WMI MSNdis_80211_ReceivedSignalStrength

G

Guest

Hi,

I am trying to query a WiFi card to get signal strength. I am looking at WMI as a solution however I cannot access the MSNdis_80211_ReceivedSignalStrength namespace on windows 2000 professional (SP3) machine. I have downloaded the WMI tools and cannot see this namespace in the studion (under root\wmi or root\ nor root\cimv2). I have tried the following sample but get "Invalid class" when trying to access the result

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
//I have also tried ("\\MyServer\root\wmi")
Ms = New ManagementScope("\\MyServer\root\cimv2")
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

The error I get is

System.Management.ManagementException: Invalid class

at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementObjectEnumerator.MoveNext()
at test.WifiStrength.GetSignalStrength()

I would appreciate some help on this, I am using a D-Link USB wireless card.

Michael
 
F

François J. Miton

Hi,


Are you sure you have a WMI provider for this card ?



--
François Miton (MCS)
(e-mail address removed)



Michael (Marine.ie) said:
Hi,

I am trying to query a WiFi card to get signal strength. I am looking at
WMI as a solution however I cannot access the
MSNdis_80211_ReceivedSignalStrength namespace on windows 2000 professional
(SP3) machine. I have downloaded the WMI tools and cannot see this namespace
in the studion (under root\wmi or root\ nor root\cimv2). I have tried the
following sample but get "Invalid class" when trying to access the result
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
//I have also tried ("\\MyServer\root\wmi")
Ms = New ManagementScope("\\MyServer\root\cimv2")
Oq = New ObjectQuery("SELECT * FROM
MSNdis_80211_ReceivedSignalStrength Where active=true")
 
G

Guest

Francois,

No I am not, I have not used WMI before. Where would one get these providers or is it a case of writing one?

Thanks

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top