cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1835
Views
1
Helpful
10
Replies
Beginner

how to gain the probing client's rssi and mac address from CMX API

I have got a issue about how to gain the probing client's rssi and mac address from cisco wlc or CMX. As for now, I have deployed the whole wireless system, include WLC5508, some APs and CMX. The information about client's rss and mac address not just include associated client, need all the probing client. Someone told me that need to get that via CMX API. Anyone know how to get it and have any other idea about this issue, really thanks for your help in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Contributor

Re: how to gain the probing client's rssi and mac address from CMX API

Hi,

New for CMX 10.4 is a new API username and password, and is only required for the new Active V3 Clients API resource.  Here is the comment from Cisco Connected Mobile Experiences REST API Guide, Release 10.4 - Cisco

Thanks.

/api/location/v3/clients/count

/api/location/v3/clients

The API Username is set using the cmxos apiserver user command. This will change the username and password just for the Active V3 Clients API.

From Cisco CMX Command Reference Guide, Release 10.4 - Cisco.


cmxos apiserver

To manage Cisco CMX API server, use the cmxos apiserver command.

cmxos apiserver { start | stop | restart | enable | disable | status | user }

Syntax Description

start

Starts the Cisco CMX API server.

stop

Stops the Cisco CMX API server.

restart

Restarts the Cisco CMX API server.

enable

Enables the Cisco CMX API server.

disable

Disables the Cisco CMX API server.

status

Displays the current status of the Cisco CMX API server.

user

Sets the userid and password for the CMX API Server.

Command Default

None

Command Modes

Admin root user

Command History

Release Modification

Cisco CMX Release 10.4

This command was introduced.

View solution in original post

10 REPLIES 10
Highlighted
Frequent Contributor

Re: how to gain the probing client's rssi and mac address from CMX API

Hi,

From the latest programming guide https://www.cisco.com/c/en/us/support/wireless/connected-mobile-experiences/products-programming-reference-guides-list.html the new Active V3 Client API provides search for Probing Client filter.

Note, that this new API requires Usernames/Passwords set via CLI just for this API resource.

Thanks for your question.

GET: This API returns active clients

Description

This API supports searching by a variety of parameters. If no parameters are given then all active clients are returned.

The API Username is set using the cmxos apiserver user command. This will change the username and password just for the Active V3 Clients API.

Here are some examples to illustrate the queries.

Search by IPv4/IPv6: api/location/v3/clients?ipAddress=x.x.x.x

Search by Mac Address: api/location/v3/clients?macAddress=x:x:x:x

Search by SSID: api/location/v3/clients?ssid=someSSID

Search by User Name: api/location/v3/clients?username=someUser

Search by Manufacturer: api/location/v3/clients?manufacturer=someManufacturer

Search for Only Associated Clients: api/location/v3/clients?associatedOnly=true

Search for Only Probing Clients: api/location/v3/clients?probingOnly=true

Search by Map Hierarchy: api/location/v3/clients?mapHierarchy=someFloorNameMap

HTTP Method

GET

Resource URI

/api/location/v3/clients

Requires OAuth

N

Parameters

Name

Required

Default

Type

Location

Description

ipAddress

N

String

query

Client IP address

macAddress

N

String

query

Client MAC address

mapHierarchy

N

String

query

Clients with MAP hierarchy string

floorRefId

N

String

query

Clients on floor ID

ssid

N

String

query

Clients associated on SSID

username

N

String

query

Clients with user name

manufacturer

N

String

query

Clients with manufacturer

macAddressSearch

N

String

query

Clients MAC address search

associatedOnly

N

String

query

Associated only clients

probingOnly

N

String

query

Probing only clients

Content Type

application/json

10.22.243.125/api/location/v3/clients?macAddress=b8%3A38%3A61%3Ab1%3Ac8%3Ad0.

10.22.243.125/api/location/v3/clients?mapHierarchy=Nortech%20Campus%3ENortech-1%3E1st%20Floor%3ECMX%20Clinic.

10.22.243.125/api/location/v3/clients?ssid=cmx.

10.22.243.125/api/location/v3/clients?ipAddress=10.22.243.243.

10.22.243.125/api/location/v3/clients.

Sample Output (JSON)


[{

  "notificationType": "locationupdate",

  "subscriptionName": "CMX_Api_Server_Notification_1",

  "eventId": 17949623,

  "locationMapHierarchy": "Nortech Campus>Nortech-1>1st Floor",

  "locationCoordinate": {

  "x": 54,

  "y": 0,

  "z": 0,

  "unit": "FEET"

  },

  "geoCoordinate": {

  "latitude": 37.42238047320771,

  "longitude": -121.9598118556593,

  "unit": "DEGREES"

  },

  "confidenceFactor": 40,

  "apMacAddress": "NOT APPLICABLE",

  "associated": false,

  "username": "NOT APPLICABLE",

  "ipAddress": ["NOT APPLICABLE"],

  "ssid": "NOT APPLICABLE",

  "band": "NOT APPLICABLE",

  "floorId": 727035700041482200,

  "floorRefId": null,

  "entity": "WIRELESS_CLIENTS",

  "deviceId": "00:0f:f8:56:2d:98",

  "lastSeen": "2017-11-07T13:54:20.595-0800",

  "tagTelemetryList": null,

  "tagBatteryInfo": null,

  "tagVendorData": null,

  "tagLastBeaconTime": null,

  "tagLastBeaconSequenceNumber": 0,

  "tagManufacturer": null,

  "rawLocation": {

  "rawX": -999,

  "rawY": -999,

  "unit": "FEET"

  },

  "maxDetectedRssi": {

  "apMacAddress": "b8:38:61:b1:c8:d0",

  "band": "IEEE_802_11_B",

  "slot": 2,

  "rssi": -15,

  "antennaIndex": 0,

  "lastHeardInSeconds": 0

  },

  "timestamp": 1510091660595,

  "sourceNotification": "127.0.0.1",

  "sourceNotificationKey": "127.0.0.1,1",

  "notificationTime": "1510091660626"

}]


Highlighted
Beginner

Re: how to gain the probing client's rssi and mac address from CMX API

Hi Matt, really thanks for your respond, from your sample output, I have seem some information probably I need, plz correct me, THANKS!!

"deviceId": "00:0f:f8:56:2d:98",  -------------it that output means probing client mac address?


  "maxDetectedRssi": {

  "apMacAddress": "b8:38:61:b1:c8:d0",  ----------what's the output mean? AP's mac address?

  "band": "IEEE_802_11_B",

  "slot": 2,

"rssi": -15, -------------------------------------- is that out means probing client's Rssi, or just the Rssi threshold ??

  "antennaIndex": 0,

  "lastHeardInSeconds": 0

  },

Highlighted
Frequent Contributor

Re: how to gain the probing client's rssi and mac address from CMX API

Hi,

First two correct, and the rssi is the probing clients rssi.

Please, note that most of the modern smartphones, either with IOs or Android, adopt a privacy protection mechanism that uses a "randomized" MAC address during the probing phase, when they aren't associated with the AP yet.

Thanks.

Highlighted
Beginner

Re: how to gain the probing client's rssi and mac address from CMX API

Hi Matt,

Really thanks for your verification!!!  So I can get each of the probing clients mac address and clients rssi from this API /api/location/v3/clients, right ? If yes, that would be great, coz I saw the rssi value is in the "maxDetectedRssi" session, not sure the rssi value in maxDetectedRssi is what i need.


"maxDetectedRssi": {

  "apMacAddress": "b8:38:61:b1:c8:d0",

  "band": "IEEE_802_11_B",

  "slot": 2,

  "rssi": -15,

  "antennaIndex": 0,

  "lastHeardInSeconds": 0

  },

And as for your noted, the "randomized" MAC address maybe is not the correct Mac address of the end-device?

Highlighted
Frequent Contributor

Re: how to gain the probing client's rssi and mac address from CMX API

Hi,

CMX uses RSSI values from several APs to determine location or geo coordinate of wireless client devices.

The MAC Address of a probing device are usually randomized.

Thanks.

MAC Address Randomization in WiFi[edit]

To prevent third parties from using the MAC address to track devices, Android, Linux, iOS, and Windows[6] have implemented MAC address randomization. In June 2014, Apple announced that future versions of their iOS platform would randomize MAC addresses for all WiFi connections. The Linux kernel has supported MAC address randomization during network scans since March 2015,[7] but drivers need to be updated to use this feature.[8] Windows has supported it since the release of Windows 10[6] in July 2015.

The output tells us a couple of thing,

"associated": false, is probing

"entity": "WIRELESS_CLIENTS", is not rogue device or tag

"deviceId": "00:0f:f8:56:2d:98", is the wireless client's MAC Address

"maxDetectedRssi":, is the nearest AP from the wireless client




Highlighted
Beginner

Re: how to gain the probing client's rssi and mac address from CMX API

Hi Matt, got it, really thanks for your verification. That would me very usefully for me. BTW, the last question,

I can only get the API responding from /api/location/v1/clients and /api/location/v2/clients, how can I get the new V3 client API?  Is the "V3" means SNMP V3?

Highlighted
Frequent Contributor

Re: how to gain the probing client's rssi and mac address from CMX API

Hi,

New for CMX 10.4 is a new API username and password, and is only required for the new Active V3 Clients API resource.  Here is the comment from Cisco Connected Mobile Experiences REST API Guide, Release 10.4 - Cisco

Thanks.

/api/location/v3/clients/count

/api/location/v3/clients

The API Username is set using the cmxos apiserver user command. This will change the username and password just for the Active V3 Clients API.

From Cisco CMX Command Reference Guide, Release 10.4 - Cisco.


cmxos apiserver

To manage Cisco CMX API server, use the cmxos apiserver command.

cmxos apiserver { start | stop | restart | enable | disable | status | user }

Syntax Description

start

Starts the Cisco CMX API server.

stop

Stops the Cisco CMX API server.

restart

Restarts the Cisco CMX API server.

enable

Enables the Cisco CMX API server.

disable

Disables the Cisco CMX API server.

status

Displays the current status of the Cisco CMX API server.

user

Sets the userid and password for the CMX API Server.

Command Default

None

Command Modes

Admin root user

Command History

Release Modification

Cisco CMX Release 10.4

This command was introduced.

View solution in original post

Highlighted
Beginner

Re: how to gain the probing client's rssi and mac address from CMX API

Hi Matt,

Your respond is very useful!!! Really thanks!

As for now, i can get the API from CMX, btw, how to tune the scan time interval?

Highlighted
Beginner

Re: how to gain the probing client's rssi and mac address from CMX API

Hi Matti, I have one more question, as for this API message which is got from CMX, how long does it save in the system, coz I have got the same API message till few hour, thanks!

Highlighted
Frequent Contributor

Re: how to gain the probing client's rssi and mac address from CMX API

Hi,

If you are using Active Client API the data is near real time.  As new RSSI data is received, CMX computes the current location for the wireless client.

Client History API uses the History Pruning Interval.  On CMX System>Dashboard select Settings and under Location Setup the History Storage Parameters controls the pruning interval, this is how long devices are kept with detailed location.

currentServerTime – Time of the CMX server in the local timezone that is configured on the server when this packet was written.

firstLocatedTime – For this MAC address and this session of this MAC address, when was this device first located.  First mean a device was created for the first time ever (i.e. We have a memory structure, when was this MAC first added, or a device that could have been seen previously, but is not in active table now  (for example due to timeout).  So device here for 1 hour, then gone for 1 hour then back. You would have a firstLocatedTime different in the two records.

lastLocatedTime - Last time we have a location update for this device.

Note, if the wireless device becomes inactive for an hour, then it is declared as inactive element by the system. If the element remains inactive for 24 hours default, then it no longer tracked by CMX.  It is not possible to see the location history in this case. 

Here is a good Cisco CMX reference which is still relevant even though much of the discussion is on the older MSE system Cisco Connected Mobile Experiences (CMX) CVD - Cisco.

Thanks for the question.

CreatePlease to create content
This widget could not be displayed.