Access Point MAC Adderss

Discussion in 'Wireless Networking' started by =?Utf-8?B?ZGRhbWljbw==?=, Aug 23, 2007.

  1. 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.
     
    =?Utf-8?B?ZGRhbWljbw==?=, Aug 23, 2007
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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.
     
    Jack \(MVP-Networking\)., Aug 23, 2007
    #2
    1. Advertising

  3. =?Utf-8?B?ZGRhbWljbw==?=

    Pavel A. Guest

    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" <> wrote in message news:...
    > 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.
     
    Pavel A., Aug 26, 2007
    #3
  4. "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=impersonate}!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
     
    =?Utf-8?B?UGF2ZWwgQS4=?=, Aug 26, 2007
    #4
  5. 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=impersonate}!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
    >
     
    =?Utf-8?B?ZGRhbWljbw==?=, Aug 28, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Blackwell

    Access Point (not router) with mac filtering, does one exist?

    Robert Blackwell, Aug 30, 2004, in forum: Wireless Networking
    Replies:
    3
    Views:
    667
    Sooner Al
    Aug 31, 2004
  2. yar
    Replies:
    4
    Views:
    1,779
    Juan Carlos \(El fortinero\)
    Sep 21, 2004
  3. David Sudjiman
    Replies:
    0
    Views:
    1,183
    David Sudjiman
    Jun 8, 2006
  4. Igor Pinchevskiy

    Slow Point to Point T1 Access Please Help

    Igor Pinchevskiy, Mar 14, 2007, in forum: Cisco
    Replies:
    7
    Views:
    1,250
  5. Nate Goulet
    Replies:
    9
    Views:
    1,266
    Nate Goulet
    Dec 7, 2007
Loading...

Share This Page