cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
240
Views
0
Helpful
5
Replies
Highlighted

Get GeoCoordinates of Tags NOT Clients

Hi,

I want to get the geoCoordinates of Tags NOT clients from my Cisco CMX using either the CMX REST API or via notifications (locationUpdate or Movement) from the CMX.

I have setup GPS Markers in Cisco PI and exported them to Cisco CMX.

In Cisco CMX I can see the GPS markers and when I issue the request for all clients:

https://x.x.x.x/api/location/v2/clients

I correctly see that my clients have geoCoordinates:

{

  "mapInfo":{

    "floorDimension":{

      "length":126.2584,

      "width":91.7689,

      "height":17.0,

      "offsetX":0.0,

      "offsetY":0.0,

      "unit":"FEET"

    },

  },

  "mapCoordinate":{

    "x":71.72857,

    "y":116.94428,

    "z":0.0,

    "unit":"FEET"

  },

  "geoCoordinate":{

    "latitude":49.18872340344746,

    "longitude":-122.98728307121202,

    "unit":"DEGREES"

  },

  "rawLocation":{

    "rawX":-999.0,

    "rawY":-999.0,

    "unit":"FEET"

  },

}

My question is this.

Is it possible to have tags also send me their geoCoordinates?

If I do request for all tags:

https://x.x.x.x/api/location/v1/tags


I get the following:

{

  "mapCoordinate":{

    "x":55.90457,

    "y":88.335434,

    "z":0.0,

    "unit":"FEET"

  },

  "geoCoordinate":null,

  "rawLocation":{

    "rawX":-999.0,

    "rawY":-999.0,

    "unit":"FEET"

  },

}


I tried subscribing for tag location update notifications with "condition": "locationupdate.deviceType == tag"


but the location updates I get have incorrect geoCoordinate data:


{

  "notifications":[

    {

      "notificationType":"locationupdate",

      "subscriptionName":"my_subscription",

      "locationCoordinate":{

        "x":55.90457,

        "y":88.335434,

        "z":0.0,

        "unit":"FEET"

      },

      "geoCoordinate":{

        "latitude":-999.0,

        "longitude":-999.0,

        "unit":"DEGREES"

      },

      "confidenceFactor":32.0,

      "apMacAddress":"NOT APPLICABLE",

      "associated":false,

      "username":"NOT APPLICABLE",

      "ipAddress":[

        "NOT APPLICABLE"

      ],

      "ssid":"NOT APPLICABLE",

      "band":"NOT APPLICABLE",

      "floorId":-4564359589109170133,

      "floorRefId":"-4564359589109170133",

      "entity":"TAGS",

      "deviceId":"00:09:62:06:fc:19",

      "lastSeen":"2018-03-16T10:28:50.622-0700",

      "rawLocation":{

        "rawX":-999.0,

        "rawY":-999.0,

        "unit":"FEET"

      },

    }

  ]

}


If I change my condition to "condition": "locationupdate.deviceType == client


Then I correctly get notifications with geoCoordinates:

{

  'manufacturer':'Intel',

  'ipAddress':[

    'NOT APPLICABLE'

  ],

  'subscriptionName':'combox_integration',

  'rawLocation':{

    'rawY':-999.0,

    'unit':'FEET',

    'rawX':-999.0

  },

  'username':'NOT APPLICABLE',

  'timestamp':1521221438476,

  'tagVendorData':None,

  'band':'NOT APPLICABLE',

  'confidenceFactor':120.0,

  'entity':'WIRELESS_CLIENTS',

  'floorRefId':'-4564359589109170133',

  'notificationType':'locationupdate',

  'ssid':'NOT APPLICABLE',

  'lastSeen':'2018-03-16T10:30:38.476-0700',

  'apMacAddress':'NOT APPLICABLE',

  'deviceId':'84:3a:4b:de:be:68',

  'associated':False,

  'eventId':36128,

  'floorId':-4564359589109170133,

  'geoCoordinate':{

    'latitude':49.18878387071896,

    'unit':'DEGREES',

    'longitude':-122.98740854528127

  },

  'locationCoordinate':{

    'z':0.0,

    'y':117.03,

    'unit':'FEET',

    'x':34.94

  }

}


Does getting geoCoordinates by placing GPS Markers only work for clients and not for tags?


Thank you,

Ovidiu

5 REPLIES 5
Highlighted

In the following CMX REST API Reference Guide:

https://www.cisco.com/c/en/us/td/docs/wireless/mse/10-3/api/b_cmx_103_api_reference/location.html

I found an example of a GET: All Tags HTTP Request:

/api/location/v1/tags

That, in the sample output, has tags with geoCoordinates:

  {

    "macAddress":"00:18:8e:28:24:26",

    "mapInfo":{

      "mapHierarchyString":"Singapore>SINGAPORE UE BIZHUB EAST (SNG11)>SNG11-5Fl>SingZone",

      "floorRefId":"739764660256899136",

    },

    "mapCoordinate":{

      "x":108.84515,

      "y":68.62626,

      "z":0.0,

      "unit":"FEET"

    },

 

    "geoCoordinate":{

      "latitude":1.3347778969996247,

      "longitude":103.96366325767761,

      "unit":"DEGREES"

   

The example in the guide above suggests that tags can return geoCoordinates.

So is there something I need to enable on my tags or in my CMX or Cisco PI to enable geoCoordinates in tags just like in clients?

Note that my tags and my clients are all on the same Site/Floor/Zone.


Why is that when I do https://x.x.x.x/api/location/v2/clients request

I get geoCoordinates, but when I do https://x.x.x.x/api/location/v1/tags

I get "geoCoordinate":null ?


Highlighted

Hi,

Which version of CMX are you using?  I will ask the CMX engineering team for us.  This sounds like a bug.

Thanks.

Highlighted

CMX 10.3.1-35


Thanks!

Highlighted

Hi,

I have a response from the engineering team.  Would it be possible to upgrade your CMX to the lastest version 10.4.1-2?

Thanks.



This appears to be a bug….Here is the API from 10.4.1-2

http://10.22.243.125/api/location/v1/tags/00:0c:cc:57:05:26

Response

  "macAddress": "00:0c:cc:57:05:26",

  "mapInfo": {

    "mapHierarchyString": "Nortech Campus>Nortech-1>1st Floor>School",

    "floorRefId": "727035700041482264",

    "floorDimension": {

      "length": 49.9,

      "width": 81.0,

      "height": 10.0,

      "offsetX": 0.0,

      "offsetY": 0.0,

      "unit": "FEET"

    },

    "image": {

      "imageName": "domain_0_1461628766707.png",

      "zoomLevel": 4,

      "width": 2008.0,

      "height": 1097.0,

      "size": 2008.0,

      "maxResolution": 8.0,

      "colorDepth": 8

    }

  },

  "mapCoordinate": {

    "x": 51.522495,

    "y": 20.12095,

    "z": 0.0,

    "unit": "FEET"

  },

  "currentlyTracked": true,

  "confidenceFactor": 24.0,

  "locComputeType": "RSSI",

  "statistics": {

    "currentServerTime": "2018-03-16T12:19:48.520-0700",

    "firstLocatedTime": "2018-03-03T08:50:17.806-0800",

    "lastLocatedTime": "2018-03-16T12:17:05.857-0700",

    "maxDetectedRssi": {

      "apMacAddress": "3c:08:f6:d9:08:a0",

      "band": "IEEE_802_11_B",

      "slot": 0,

      "rssi": -40,

      "antennaIndex": 0,

      "lastHeardInSeconds": 1

    }

  },

  "historyLogReason": null,

  "geoCoordinate": {

    "latitude": 37.422436476495115,

    "longitude": -121.95980300688367,

    "unit": "DEGREES"

  },

  "rawLocation": {

    "rawX": 51.522495,

    "rawY": 20.12095,

    "unit": "FEET"

  },

  "networkStatus": "ACTIVE",

  "changedOn": 1521227825857,

  "telemetryList": [

    {

      "type": "TEMPERATURE",

      "units": "degrees Celsius",

      "value": "21.4375",

      "lastReceivedTime": "2018-03-16T12:17:05.043-0700",

      "lastReceivedSeqNum": 3077,

      "telemetryMeasurementData": {

        "measurementData": "TEMPERATURE : 21.4375 degrees Celsius",

        "measurementDataType": "TEMPERATURE",

        "bytes": "QauAAA==",

        "lengthInBytes": 4

      }

    }

  ],

  "batteryInfo": {

    "tolerance": 20,

    "percentRemaining": 80,

    "daysRemaining": 49367,

    "batteryAge": 697,

    "lastReceivedTime": "2018-03-16T12:17:05.043-0700",

    "lastReceivedSeqNum": 3077

  },

  "vendorData": {

    "vendorId": 3276,

    "elementId": 0,

    "data": "AAAPAA==",

    "lastReceivedTime": "2018-03-16T12:17:05.043-0700",

    "lastReceivedSeqNum": 3077

  },

  "sortedEmergencyList": null,

  "sortedChokepointList": null,

  "lastBeaconTime": null,

  "lastBeaconSequenceNumber": 3077,

  "deviceSubtype": null,

  "bleAttributesList": null,

  "manufacturer": "Aeroscout Ltd."

}

Highlighted

We upgraded our CMX to 10.4.1-2 and now we see geoCoordinates in our tag messages.

Thanks!