location.network.decode

The location.network.decode command is used to decode a location by the network.

location.network.decode uses Location policies to retrieve the result. For more information on Location Policy, see location.policy.find

TR50 Request with network parameters (MCC/MNC/CELLS)
 {  
   "cmd":{  
      "command":"location.network.decode",
      "params":{  
         "mnc":260,
         "mcc":310,
         "imei":"351579057358754",
         "cells":[  
            {  
               "cellId":36352,
               "lac":34775,
               "rssi":-94
            },
            {  
               "cellId":44473,
               "lac":51051,
               "rssi":-70
            }
         ],
         "decodeAddress":false
      }
   }
}
TR50 Request - with network parameters (MNC/MCC/LAC/CID)
{
  "cmd": {
    "command": "location.network.decode",
    "params": {
      "mnc": 119,
      "mcc": 310,
      "lac": 48,
      "cellId": 4217,
      "rssi": -80,
      "imei": "357805023984942",
      "decodeAddress": true
    }
  }
}
TR50 Request with network parameters 1 Cell and 1 Wifi (MCC/MNC/CID/WIFI)
 {  
   "cmd":{  
      "command":"location.network.decode",
      "params":{  
         "mnc":410,
         "mcc":310,
         "lac":7033,
         "cellId":17811,
         "rssi":-80,
         "wifi":[  
            {  
               "bssid":"00:17:c5:cd:ca:aa",
               "channel":11,
               "frequency":2412,
               "signal":-51
            },
            {  
               "bssid":"d8:97:ba:c2:f0:5a"
            }
         ],
         "imei":"357805023984942",
         "decodeAddress":false
      }
   }
}

Request Parameters

Name Type Required Description
mncIntegerYesMobile network code.
mccIntegerYesMobile country code.
cellsArray An array of cell objects  (See the three types of Cell Objects below)
lacIntegerYes+Location area code.
cellIdIntegerAn integer representing the identifier of the Base transceiver station.
rssiIntegerReceived signal strength indicator.
wifiArrayNoAn array of wifi objects (See Wifi Objects below)
imeiStringNoAn string representing the unique identifier of the mobile device.
decodeAddressBooleanNoThe flag requesting the address. Defaults to false.
+ 'cells' or a combination of 'lac', 'cellId', and 'rssi' are required. If 'cells' is used, any 'lac', 'cellId' or 'rssi' that are not in cells will be ignored.

GSM Cell Object

Name Type Required for Unwired Labs Required for RxNetworks Description
cellId Integer Yes Yes An integer representing the identifier of the Base transceiver station.
lac Integer Yes Yes An integer representing the code of the location area code.
mnc Integer Yes Yes An integer representing the mobile network code.
mcc Integer Yes Yes An integer representing the mobile country code.
psc Integer No No Primary scramble code
rssi Integer No No Signal Strength (RSSI)
ta Integer No No Timing advance.
radio String No Yes "gsm"

WCDMA Cell Object

Name Type Required for Unwired Labs Required for RxNetworks Description
cellId Integer Yes Yes An integer representing the identifier of the Base transceiver station.
rncId Integer No Yes An integer representing the radio network controller identifier.
lac Integer Yes Yes An integer representing the code of the location area code.
mnc Integer Yes Yes An integer representing the mobile network code.
mcc Integer Yes Yes An integer representing the mobile country code.
psc Integer No No Primary scramble code
rssi Integer No No Signal Strength (RSSI)
ta Integer No No Timing advance.
radio String Yes Yes "wcdma"

LTE Cell Object

Name Type Required for Unwired Labs Required for RxNetworks Description
cellId Integer Yes Yes An integer representing the identifier of the Base transceiver station.
rncId Integer No Yes  
lac Integer Yes Yes An integer representing the code of the tracking area code (TAC).
mnc Integer Yes Yes An integer representing the mobile network code.
mcc Integer Yes Yes An integer representing the mobile country code.
psc Integer No No Primary scramble code
rssi Integer No No Signal Strength (RSSI)
ta Integer No No Timing advance.
radio String Yes Yes "lte"

Wifi Object

Name Type Required Description
bssid String Yes Basic Service Set Identifier or MAC address of the Access Point. Typical format of a MAC address is xx-xx-xx-xx-xx-xx. However, the delimiter can be any of these when sent to the API: ':' or '-' or '.'
channel Integer No Channel the WiFi network is operating in
frequency Integer No Frequency the WiFi network is operating in (MHz)
rssi Integer No Signal Strength (RSSI)
snr Integer No The current signal to noise ratio, measured in dB

If the command is sent successfully a success message and params list is returned. Otherwise, an error and error message will be returned.

TR50 Response
{
  "cmd": {
    "success": true,
    "params": {
      "lat": 42.47,
      "lng": -73.24,
      "cached": false, 
      "fixAcc": 10525,
      "fixType": "Coarse",
      "address": {
        "streetNumber": "1145",
        "street": "Buckingham Dr",
        "city": "Tallahassee",
        "state": "FL",
        "zipCode": "32308",
        "country": "US"
      }
    }
  }
}

Response Parameters

Name Type Description
lat Float The latitude of the location.
lng Float The longitude of the location.
cached Boolean Denotes if the response is a cached response.
fixAcc Float The accuracy in meters of the location.
fixType String A string describing the location fixation type. Typically "gps", "gnss", "manual", or "m2m-locate".
address.streetNumber String The street number of the address.
address.street String The route of the address.
address.city String The city name of the address.
address.state String The state code of the address.
address.zipCode String The zip code of the address.
address.country String The country code of the address.

Related Topics Link IconRelated Topics