Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 149,562 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,649 people online right now. Registration is fast and FREE... Join Now!




How i obtain the WIFI signal strength & SSID & BSSID

 
Reply to this topicStart new topic

How i obtain the WIFI signal strength & SSID & BSSID, Wireless Programming

Alias bradly
22 Nov, 2007 - 10:28 AM
Post #1

New D.I.C Head
*

Joined: 22 Nov, 2007
Posts: 4


My Contributions
Hi everyone

I have 3 AP and I want design program to get the SSID & signal strength &
BSSID(MAC Adress) for each AP

i found the some functions to obtain the SSID & signal strength for one AP blink.gif ,,,


i using timer to update every 2 second


SSID
vb
Public Sub SSID()
Try
Dim query As String = "SELECT * FROM MSNDis_80211_BSSIList WHERE Active= 'True'"

Dim searcher As Management.ManagementObjectSearcher = New Management.ManagementObjectSearcher("root/WMI", query)

Dim moc As Management.ManagementObjectCollection = searcher.Get()

Dim moe As Management.ManagementObjectCollection.ManagementObjectEnumerator = moc.GetEnumerator()
moe.MoveNext()

Dim objarr() As Management.ManagementBaseObject = CType(moe.Current.Properties("Ndis80211BSSIList").Value, Management.ManagementBaseObject())
ListBox1.Items.Clear()


For Each obj As Management.ManagementBaseObject In objarr

Dim ssid() As Char = System.Text.Encoding.ASCII.GetChars(CType(obj("Ndis80211Ssid"), Byte()))
ListBox1.Items.Add(New String(ssid))
Next

Catch ex As Exception
Timer1.Enabled = False

MsgBox(ex.Message, MsgBoxStyle.Exclamation)

End Try
End Sub


Signal Strength
vb
Public Function RetrieveSignalStrength() As Double
ListBox2.Items.Clear()
Dim query As Management.ManagementObjectSearcher
Dim Qc As Management.ManagementObjectCollection
Dim Oq As Management.ObjectQuery
Dim Ms As Management.ManagementScope
Dim Co As Management.ConnectionOptions
Dim Mo As Management.ManagementObject
Dim signalStrength As Double
Try
Co = New Management.ConnectionOptions
Ms = New Management.ManagementScope("root\wmi")
Oq = New Management.ObjectQuery("SELECT * FROM MSNdis_80211_ReceivedSignalStrength Where active=true")
query = New Management.ManagementObjectSearcher(Ms, Oq)
Qc = query.Get
signalStrength = 0

For Each Mo In query.Get

signalStrength = Convert.ToDouble(Mo("Ndis80211ReceivedSignalStrength"))

Next
Catch exp As Exception
' Indicate no signal
signalStrength = -1
End Try
ListBox2.Items.Add(signalStrength)
Return Convert.ToDouble(signalStrength)
End Function


About MAC Address i found Adapter card for the PC ,,, not for AP

finally:

i found the good program in c++ but i don't know how convert to
C# or VB.net

the code ----> http://www.lobortis.com/n/8897240756

**************************************************************

I am trying to solve the problem but ... i cann't

i hope find the solution in this forum

Thanks very much for any help

User is offlineProfile CardPM
+Quote Post

RodgerB
RE: How I Obtain The WIFI Signal Strength & SSID & BSSID
22 Nov, 2007 - 12:08 PM
Post #2

D.I.C Lover
Group Icon

Joined: 21 Sep, 2007
Posts: 2,164



Thanked: 17 times
Dream Kudos: 2200
Expert In: Dot Net Technologies

My Contributions
Hi Alias bradly,

I found your prediciment quite intriging. I found a link, on a google search, hope it helps. smile.gif
http://code.filehungry.com/product/languag...signal_strength
User is offlineProfile CardPM
+Quote Post

Alias bradly
RE: How I Obtain The WIFI Signal Strength & SSID & BSSID
22 Nov, 2007 - 12:42 PM
Post #3

New D.I.C Head
*

Joined: 22 Nov, 2007
Posts: 4


My Contributions
Thanks very much RodgerB but i found this before 2 weeks sleepy.gif
I say (thanks for any help) rolleyes.gif


my problem
How obtain signal strength & SSID & BSSID from many Access points

for example:

SSID----------BSSID----------signal strength
linksys----------00:14-7f----------44
linksys1----------00:14-2f----------70
speedtu----------00:14-ff----------20



thanks again RodgerB smile.gif

User is offlineProfile CardPM
+Quote Post

no one like me
RE: How I Obtain The WIFI Signal Strength & SSID & BSSID
22 Nov, 2007 - 11:56 PM
Post #4

New D.I.C Head
*

Joined: 22 Nov, 2007
Posts: 1


My Contributions
hiiii how are you every bady

i have the same problem that Alias say and found the same code
any help
thanksssss
User is offlineProfile CardPM
+Quote Post

Alias bradly
RE: How I Obtain The WIFI Signal Strength & SSID & BSSID
23 Nov, 2007 - 05:30 AM
Post #5

New D.I.C Head
*

Joined: 22 Nov, 2007
Posts: 4


My Contributions
Hello (no one like me) mad.gif

ok when i found the solution sure i am not give you tongue.gif ....

rolleyes.gif ok i tell you biggrin.gif

User is offlineProfile CardPM
+Quote Post

de Gan
RE: How I Obtain The WIFI Signal Strength & SSID & BSSID
8 Jan, 2008 - 05:36 AM
Post #6

New D.I.C Head
*

Joined: 8 Jan, 2008
Posts: 1

hi brad...

i have the same problem...

have u found the solution?

thanks
User is offlineProfile CardPM
+Quote Post

erwim yudha
RE: How I Obtain The WIFI Signal Strength & SSID & BSSID
8 Aug, 2008 - 05:12 AM
Post #7

New D.I.C Head
*

Joined: 8 Aug, 2008
Posts: 1


My Contributions
Here you can find a managed API (works on Vista/XP SP2 with Wireless LAN API): http://www.codeplex.com/managedwifi
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 10:13PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month