Networking Forums

Networking Forums > Wireless Networking > Wireless Networks > Access Point MAC Adderss

Reply
Thread Tools Display Modes

Access Point MAC Adderss

 
 
ddamico
Guest
Posts: n/a

 
      08-23-2007, 02:48 AM
Does anyone know a way to view the mac address of the AP that you are
currently connected to? Can this information be obtained throughs windows XP
SP2? The laptops are used in a hospital and we would like to not install
additional software.
 
Reply With Quote
 
 
 
 
Jack \(MVP-Networking\).
Guest
Posts: n/a

 
      08-23-2007, 04:15 AM
Hi
It might depend on how the Wireless network set.
You can try to open a DOS box type: arp -a and press <enter>.
Jack (MVP-Networking).

"ddamico" <(E-Mail Removed)> wrote in message
news:173B9D4D-D9E6-40F5-B055-(E-Mail Removed)...
> Does anyone know a way to view the mac address of the AP that you are
> currently connected to? Can this information be obtained throughs windows
> XP
> SP2? The laptops are used in a hospital and we would like to not install
> additional software.


 
Reply With Quote
 
Pavel A.
Guest
Posts: n/a

 
      08-26-2007, 02:48 AM
Just for a quick test you can run a VB or js script, using
WMI MSNdis_80211_BaseServiceSetIdentifier object.
It is the BSSID (or "MAC address" as you call it) of the associated AP.

Basically you need to enumerate instances of
MSNdis_80211_BaseServiceSetIdentifier.
For each *associated* wi-fi adapter there will be an instance of that.

Sorry I'm not at my machine and can't scribble a working example.
Please try WMI or scripting newsgroups for details.

Regards,
--PA


"ddamico" <(E-Mail Removed)> wrote in message news:173B9D4D-D9E6-40F5-B055-(E-Mail Removed)...
> Does anyone know a way to view the mac address of the AP that you are
> currently connected to? Can this information be obtained throughs windows XP
> SP2? The laptops are used in a hospital and we would like to not install
> additional software.



 
Reply With Quote
 
Pavel A.
Guest
Posts: n/a

 
      08-26-2007, 08:24 PM
"Pavel A." wrote:
> Just for a quick test you can run a VB or js script


Ok, so it will be something like:

-------- begin get_ap.vbs ------

Set wmi = GetObject("winmgmts:{impersonationLevel=impersonat e}!root/wmi")

Set AdapterSet = wmi.ExecQuery("select * from _
MSNdis_80211_BaseServiceSetIdentifier")

For each wa in AdapterSet
with wa
WScript.Echo "Adapter=", .InstanceName
sBssid = _
hex(.Ndis80211MacAddress(0)) & ":" & hex(.Ndis80211MacAddress(1)) & ":" _
& hex(.Ndis80211MacAddress(2)) & ":" & hex(.Ndis80211MacAddress(3)) &
":" _
& hex(.Ndis80211MacAddress(4)) & ":" & hex(.Ndis80211MacAddress(5))
WScript.Echo "Assoc AP=", sBssid
End with
Next

If Err.Number <> 0 Then
Wscript.Echo "Not associated. Err=", Err.Number
End If

----------- end get_ap.vbs ---------

Save this snippet as get_ap.vbs and run with cscript.

Regards,
--PA

 
Reply With Quote
 
ddamico
Guest
Posts: n/a

 
      08-27-2007, 11:02 PM
This is a scirpt I put together but I will test the script you posted. Thanks!

On Error Resume Next
dim count
strComputer = "."
Set fso = CreateObject("Scripting.FileSystemObject")
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI")

Do until (count = "10")
count = count + 1
Set colItems = objWMIService.ExecQuery( _
"SELECT * FROM MSNdis_80211_ReceivedSignalStrength",,48)
For Each objItem in colItems
RSSI = objItem.Ndis80211ReceivedSignalStrength
Device = objItem.InstanceName
Next

Set colItems2 = objWMIService.ExecQuery( _
"SELECT * FROM MSNdis_80211_BaseServiceSetIdentifier",,48)
For Each objItem in colItems2
macbyte = 0
bssid = ""
' convert decimals to hex. pad zeros & slip in colons where needed
for each decval in objItem.Ndis80211MacAddress
if decval<17 then
bssid = bssid & "0"
end if
bssid = bssid & Hex(decval)
if macbyte < 5 then
bssid = bssid & ":"
macbyte = macbyte + 1
end if
next
Next

' wscript.echo "Ndis80211MacAddress: " & bssid
' Wscript.Echo "Ndis80211ReceivedSignalStrength: " & RSSI
Text = Text & "AP_MAC: " & bssid & " RSSI: " & RSSI & " dBm" & " Date: "
& date & " Time: " & time & " Device: " & Device
Set file = fso.OpenTextFile("wlan.txt", 8, True)
file.WriteLine(Text)
file.Close()
Text = ""

wscript.sleep 1000
Loop

wscript.echo "Script Complete!"

"Pavel A." wrote:

> "Pavel A." wrote:
> > Just for a quick test you can run a VB or js script

>
> Ok, so it will be something like:
>
> -------- begin get_ap.vbs ------
>
> Set wmi = GetObject("winmgmts:{impersonationLevel=impersonat e}!root/wmi")
>
> Set AdapterSet = wmi.ExecQuery("select * from _
> MSNdis_80211_BaseServiceSetIdentifier")
>
> For each wa in AdapterSet
> with wa
> WScript.Echo "Adapter=", .InstanceName
> sBssid = _
> hex(.Ndis80211MacAddress(0)) & ":" & hex(.Ndis80211MacAddress(1)) & ":" _
> & hex(.Ndis80211MacAddress(2)) & ":" & hex(.Ndis80211MacAddress(3)) &
> ":" _
> & hex(.Ndis80211MacAddress(4)) & ":" & hex(.Ndis80211MacAddress(5))
> WScript.Echo "Assoc AP=", sBssid
> End with
> Next
>
> If Err.Number <> 0 Then
> Wscript.Echo "Not associated. Err=", Err.Number
> End If
>
> ----------- end get_ap.vbs ---------
>
> Save this snippet as get_ap.vbs and run with cscript.
>
> Regards,
> --PA
>

 
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
No network when using a static adderss. D Durham Linux Networking 7 02-27-2005 10:13 AM
Add an access point or buy a combined modem/router/access point? Martin Home Networking 2 12-16-2004 01:20 PM
point-to-point wireless pc connection without access point DavideD Wireless Internet 3 12-15-2004 08:33 AM
Point to Point using a pair of Access Points ? Mark Aren Wireless Internet 5 12-24-2003 01:59 PM
Any Point USB and Airway WiFi Wireless LAN Access Point / Gway tim Home Networking 0 11-10-2003 03:22 PM



1 2 3 4 5 6 7 8 9 10 11