OneNET IoT Platform Platform Introduction Introduction Manual Guidline for Device Development Guideline for Application Development
API
API Usage API List SDK MQTT LwM2M EDP Modbus TCP
HTTP Push MQ
Other Service Common Question

Interface Service Capability Description

By uploading datapoints, users can upload specified format base station information datpoints to the $OneNET_LBS datastream. After the platform received the datapoint, datapoint information can be converted into the corresponding latitude and longitude information to be saved in the platform, so as to facilitate users to call interface to query latitude and longitude information.

Datapoint Upload

Datastream Name $OneNET_LBS

Single Base Station Location

Field name Data type Field required
The time get base Station information date bstime optional
Mobile network code int mnc optional, currently only supports 0
Mobile country code int mcc optional, China defaults 460
area code int lac required
base station code int cid required
network-standard int networkType optional
0 GSM
1 GSM Compact
2 UTRAN
3 GSM w/EGPRS
4 UTRAN w/HSDPA
5 UTRAN w/HSUPA
6 UTRAN w/HSDPA and HSUPA
7 E-UTRAN
8 EC-GSM-IoT
9 E-UTRAN
10 E-UTRA connected to a 5G CN
11 NR connected to a 5G CN
12 NR connected to an EPS core
13 NG-RAN
14 E-UTRA-NR dual connectivity

datastream name $OneNET_LBS
Multi-base Station Location

field name data type field required
The time get base station information date bstime optional
Mobile network code int mnc optional, currently only supports 0
Mobile country number int mcc optional, China defaults
area code int lac required
base station code int cid required
network-standard int networkType required
0 GSM
1 GSM Compact
2 UTRAN
3 GSM w/EGPRS
4 UTRAN w/HSDPA
5 UTRAN w/HSUPA
6 UTRAN w/HSDPA and HSUPA
7 E-UTRAN
8 EC-GSM-IoT
9 E-UTRAN
10 E-UTRA connected to a 5G CN
11 NR connected to a 5G CN
12 NR connected to an EPS core
13 NG-RAN
14 E-UTRA-NR dual connectivity
Signal strength int ss optional
Current base station broadcast signal strength int signalLength optional
The distance between device and base station determine its timing forward to the base station int ta optional
Digit base of Base station information int flag Optional/Required
When base station information is decimal system, flag write 10, the default is not to fill in decimal system, when the base station information is hexadecimal, flag must be filled in 16

Note: When flag is 10, all reported data is decimal system, when flag is 16, all reported data are hexadecimal, and hexadecimal number are transmissed as a string in accordance with json regulations.

Reporting format of single base station location data

{
    "$OneNET_LBS": {
        "cid": 30183,
        "lac": 13112,
        "mcc": 460,
        "mnc": 0,
        "networktype": 5,
        "ss": -12,
        "ta": 1
    }
}

Reporting format of multi-base station location data

{
    "$OneNET_LBS": [{
        "cid": 21089,
        "lac": 6334,
        "mcc": 460,
        "mnc": 0,
        "networktype": 5,
        "ss": -12,
        "ta": 1
    }, {
        "cid": 40673,
        "lac": 6334,
        "mcc": 460,
        "mnc": 0,
        "networktype": 5,
        "ss": -11,
        "ta": 1
    }]
}

API Description

Category Function Detailed Content
API Recent Location Query can return the latitude and longitude of the last location result
Historical trajectory query Realize trajectory query within the time interval according to the entered time interval range

API Interface

is: API.heclouds.com

Query Trajectory

http method GET
URL http://API_ADDRESS/devices/device_id/lbs/getTrail
URL parameter start= 2018-01-10T08:00:35.012//Represents the start time of query trajectory, the default start time is zero o'clock of Monday this week, optional, accurate to millisecond level
end= 2018-01-10T08:00:35.230 //Represents the end time of the query trajectory, the default end time is the current time, optional, accurate to millisecond level
page = 1 //Specify page number, optional
per_page = 30 //Specify the number of output devices per page, optional, default 10, optional
maxLon=130.308 //maximum longitude, optional
minLon=100.308 //minimum longitude, optional
maxLat=30.0944 //maximum latitude, optional
minLat=10.0944 //minimum latitude, optional
sort = DESC\
ASC //optional, default to ASC (ascending)
Note: if not transmit Maximum, minimum latitude and longitude, query all tracks. If all four parameters are transmitted, query trajectory within the area.
http header API-key:xxxx-ffff-zzzzz
Request return { { "errno": 0,
"error":“succ”,
"data": { "page": 1,,
"per_page": 10,
"total_count": 39,
"trail": [
{ "at": "2018-06-13 15:15:22.012", //time
"accuracy": 20,//accuracy
"lon": 106.48881,//longitude
"lat": 29.62518//latitude},
{ "at": "2018-06-13 18:22:58.234",//time
"accuracy": 20,//accuracy
"lon": 106.48886999999999,//longitude
"lat": 29.62514//latitude},
{ "at": "2018-06-13 18:25:19.210",//time
"accuracy": 20,//accuracy
"lon": 106.48885,//longitude
"lat": 29.62516//latitude}]}
Note: If not transmit the maximum and minimum latitude and longitude, query all trajectories. If all four parameters are transmitted, query trajectory within the area.

Query the Latest Location

http method GET
URL http://API_ADDRESS/devices/device_id/lbs/latestLocation
URL http://API_ADDRESS/devices/device_id/lbs/latestLocation
http header Api-key:xxxx-ffff-zzzzz
url parameter No
Request return { "errno": 0,
"error":“succ”,
"data":
{ "at": "2018-06-13 15:15:22", //time
"accuracy": 20, //accuracy
"lon": 106.48881, //longitude
"lat": 29.62518 //latitude }}

results matching ""

    No results matching ""