Skip to content

Integration

Note:

1. Time zone of all returned messages and API input parameters in IoT Hub is UTC+0 ! ! !

2. The HTTP status code 3xx is for URL redirection. In IoT Hub, only 300/301/302/303 are automatically redirected, the other status codes will not receive response. Therefore, customers must NOT respond to other 3xx status codes.

3. The bit data of IoTHub is stored in big-endian.

Integration mainly involves two parts: APIs and alarm reference. APIs include push APIs, request APIs, and query APIs. Push APIs are used to get data pushed out by IoTHub, request APIs are used to quest device to perform some features, query APIs are used to query tracks, heartbeats and alarms, etc.. Alarm reference is used to check the received alarm information. Before delving into each API function, please read the API description to understand which APIs are suitable for your device. Please ensure that all API related configurations are done before using it(see Installation 1.3 Configure pushURL for configuration details).


APIs

1 Push APIs

IoT hub will parse the data sent by devices and push the parsed data to customers' data receiving servers via http protocol. After the data push fails, it will try to push for 3 consecutive times (interval: 2 mins). If it still does not receive a successful response, the data will be discarded.

In the following API description, { YourURL } is the pushURL configured in msg-dispatch-iothub of the yml file, whose format is http://(domain|ip):port/uri.

After successfully receiving the data, it is highly recommended that you send a response packet to the device to prevent iothub pushing data repeatedly. In addition, you can provide an access token to verify the validity of the data source before receiving the push data.

APIs Description

APIsAPI TypeDescriptionJIMI Protocol DeviceJT/T Protocol Device
/pusheventPushLogin/Logout Notification[√][√]
/pushhbPushPush Heartbeat Data[√][√]
/pushgpsPushPush GPS Location Data[√][√]
/pushalarmPushPush Alarm Data[√][√]
/rfidPushPush RFID Data[√]
/wgtcPushPush Plug-In Module Data[√]
/pushoilPushPush Oil Data[√][√]
/pushfileuploadPushNotification Push from the storage service[√][√]
/pushtemPushPush Tem and Hum Data[√]
/pushlbsPushPush LBS Data[√]
/pushresourcelistPushPush Resource List[√][√]
/pushftpfileuploadPushPush Ftp Upload Result[√][√]
/pushIothubEventPushPush alarm file list, alarm file upload begin and end, multimedia file upload begin and end[√][√]
/pushPassThroughDataPushPush PassThrough Data[√][√]
/pushTerminalTransInfoPushPush Extension Data[√][√]
/pushobdPushPush On Board Diagnostic(OBD) Data[√]
/pushfaultinfoPushPush Fault Info[√]
/pushtripreportPushPush Trip Report[√]
/pushInstructResponsePushAsynchronous Commands && Offline Commands[√][√]

1.1 Login/Logout Notification

Request

URL{ YourURL }/pushevent
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token(same with http.pushToken
data_liststringYThe data set of login and logout notifications. It is a Character string Json array.

Description of data_list

ParameterDataTypeRequiredDescription
deviceImeistringYIMEI of the device
typestringYEvent type is an enumerated string, where LOGIN indicates the device online and LOGOUT indicates the device offline
gateTimeDateYIt is the time of the server where the gateway is deployed. Note that it is different from the device time. Format: yyyy-MM-dd HH:mm:ss; Example: 2016-01-01 23:00:01(UTC)
timezoneYThe East/West timezone at login/logout. Example: GMT+08:00
Note: 1. Zero timezone only retains the western zero time zone, that is, GMT+00:00, no GMT-00:00
2. If the hour and minute are less than 2 digits, zero will be added in front, that is, GMT+03:30.

e.g.

Request Body

bash
token=a12341234123&data_list=[{"deviceImei":"868120246598152","gateTime":"2023-01-13 02:24:37","timezone":"GMT+08:00","type":"LOGIN"}]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResponse result code, where 0 indicates success and a non-zero code indicates the gateway will try again.
MsgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.2 Push Heartbeat Data

Request

URL{ YourURL }/pushhb
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token(same with http.pushToken
data_liststringYThe data set of heartbeat notifications. It is a Character string Json array. Devices can package and upload up to 50 sets of data at a time, so you need to consider the actual servers of your SaaS when parsing the data.

Description of data_list

ParameterDataTypeRequiredDescription
deviceImeistringYIMEI of the device
gateTimeDateYIt is the time of the server where the gateway is deployed. Note that it is different from the device time. Format: yyyy-MM-dd HH:mm:ss; Example: 2016-01-01 23:00:01(UTC)
powerLevelintNPower level
gsmSignintNGSM signal
accintN0: ACC_OFF
1: ACC_ON
oilEleint0: Fuel or electricity connected
1: Fuel or electricity disconnected
gpsPosint0: GPS not positioning
1: GPS positioning
remoteLockint0: No remote locking
1: Remote locking
powerStatusint0: No power charging
1: Power charging
fortifyint0: Defense deactivated
1: Defense activated

e.g.

Request Body

bash
 token=a12341234123&data_list=[{"acc":0,"powerStatus":0,"fortify":0,"deviceImei":"868120246598152","gateTime":"2023-01-13 05:34:02","gsmSign":3,"gpsPos":0,"powerLevel":73,"remoteLock":0,"oilEle":0}]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResponse result code, where in "0" indicates success and non-zero code means the gateway will try again.
msgstringNDescription of the result code

e.g.

json
{
  "code": 0,
  "msg": "success"
}

1.3 Push GPS Data

Request

URL{ YourURL }/pushgps
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token(same with http.pushToken)
data_liststringYThe data set of GPS position fixes. It is a Character string Json array. Devices can package and upload up to 50 sets of data at a time, so you need to consider the actual servers of your SaaS when parsing the data.

Description of data_list

ParameterDataTypeRequiredDescription
deviceImeistringYIMEI of the device
gpsTimeDateYLocation time: yyyy-MM-dd HH:mm:ss; example: 2016-01-01 23:00:01(UTC)
gateTimeDateYIt is the time of the server where the gateway is deployed. It is different from the device time. Format: yyyy-MM-dd HH:mm:ss; Example: 2016-01-01 23:00:01(UTC)
satelliteNumintYNumber of satellites engaged in positioning
lngdoubleYLongitude
latdoubleYLatitude
gpsModeintY0: Real-time upload
1: Re-upload
gpsSpeedintYGPS speed in km/h
directionintYDirection angle: 0–360°
accintY0: ACC_OFF
1: ACC_ON
postTypeintYPositioning method.
1: GPS
2: LBS
3: WiFi
altitudeintNAltitude,unit: Meter
statusintNSee the table below
distanceintNMileage, unit: Meter
undecodedGpsAddInfostringGPS location with additional undefined ID pass-through data. The message content is base64 encoded.
postMethodintYGPS data upload mode.
0x00 Upload by time interval
0x01 Upload by distance interval
0x02 Inflection point upload
0x03 Upload by ACC status change
0x04 Re-upload the last GPS point when back to static.
0x05 Upload the last effective point when network recovers.
0x06 Update ephemeris and upload GPS data compulsorily
0x07 Upload location when side key triggered
0x08 Upload location after power on
0x09 Upload by command “GPSON”
0x0A Upload the last longitude and latitude when device is static; time updated
0x0B Upload after WIFI data query
0x0C upload by command LJDW
0x0D Upload the last longitude and latitude when device is static
0x0E Gpsdup upload (Upload regularly in a static state.)
0x0F Upload after exit tracking mode
driverLicenseStatusintNDriver license status.
1: No card swiping
75: Not First swipe
143: First swipe
driverLicensestringNNew data from driver license.
1: No swipe data
Others: Driver license data
buzzerAlarmStatusintNBuzzer alarm status.
0: No alarm
1: Alarm
creditCardStatusintNSwipe card status.
0: Other
1: Card swiping detected
doorStatusintNDoor status.
0: Closed
1: Open
sosStatusintNSOS status.
0: Not Trigged
1: Triggered
accStatusintNACC status.(engine)
0: ACC OFF
1: ACC ON
temperaturefloatNTemperature. Unit: Celsius
transparentDatastringNPass-through data(HEX string)

Description of status Parameters

BitDescription
00: ACC OFF
1: ACC ON
10: Not positioned
1: Positioned
20: North latitude; 1: South latitude
30: East longitude; 1: West longitude
40: Operation status; 1: Out of service status
50: The latitude and longitude are not encrypted by the security plug-in;
1: The longitude and latitude have been encrypted by the security plug-in
6-7Reserved
8-900: Empty;
01: Half-loaded;
10: Reserved;
11: Fully-loaded(It can be used to indicate the empty and full load status of passenger cars, heavy vehicles and trucks, manual input or sensor acquisition)
100: The vehicle oil circuit is normal; 1: The vehicle oil circuit is disconnected
110: The vehicle circuit is normal; 1: The vehicle circuit is disconnected
120: Door unlock; 1: Door lock
130: Door 1 closed; 1: Door 1 open (front door)
140: Door 2 closed; 1: Door 2 open (middle door)
150: Door 3 closed; 1: Door 3 open (back door)
160: Door 4 closed; 1: Door 4 open (driver's door)
170: Door 5 closed; 1: Door 5 open (custom)
180: GPS satellites are not used for positioning; 1: GPS satellites are used for positioning
190: Not using Beidou satellites for positioning; 1: Using Beidou satellites for positioning
200: GLONASS satellites are not used for positioning; 1: GLONASS satellites are used for positioning
210: Do not use Galileo satellites for positioning; 1: Use Galileo satellites for positioning
22-31Reserved

e.g.

bash
 token=a12341234123&data_list=[{"acc":1,"altitude":0,"distance":698,"lng":113.942885,"postType":1,"gateTime":"2023-02-22 01:29:40","undecodedGpsAddInfo":"GQcAAAABAAUA","gpsTime":"2023-02-22 01:29:40","gpsSpeed":0,"satelliteNum":7,"postMethod":0,"deviceImei":"869247060001259","gpsMode":0,"gsmSignal":0,"lat":22.576539,"direction":155,"status":262147}]
bash
 token=a12341234123&data_list=[{"acc":0,"altitude":0,"distance":-1,"gateTime":"2023-08-17 09:37:09","undecodedGpsAddInfo":"","driverLicenseStatus":143,"satelliteNum":15,"postMethod":0,"gpsMode":0,"transparentData":"00","sosStatus":1,"gsmSignal":0,"temperature":28.3,"driverLicense":"222000455600106","lat":22.576591,"direction":0,"creditCardStatus":1,"lng":113.943049,"postType":1,"gpsTime":"2023-03-10 10:00:11","gpsSpeed":0,"accStatus":1,"deviceImei":"358511020000007","doorStatus":1,"status":0,"buzzerAlarmStatus":1}]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResponse result code, where 0 indicates success and a non-zero code indicates the gateway will try again.
msgstringNDescription of the result code

e.g.

json
{
  "code": 0,
  "msg": "success"
}

1.4 Push Alarm Data

Request

URL{ YourURL }/pushalarm
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringYThe data set of alarm lists. It is a Character string Json array. Devices can package and upload up to 50 sets of data at a time, so you need to consider the actual servers of your SaaS when parsing the data.

Description of data_list

ParameterDataTypeRequiredDescription
msgClassstringN0 JIMI protocol(JC400 series devices)
1 JT/T protocol(JC450 series devices)
If empty, consider it as 0
typestringYData enumerated type: DEVICE or ICCID
msgJSONNBase on the value of "msgClass" and "type", details see subsequent content.
gateTimeDateYIt is the time of the server where the gateway is deployed. Note that it is different from the device time. Format: yyyy-MM-dd HH:mm:ss; Example: 2016-01-01 23:00:01(UTC)

The data format of "msg" when type="ICCID"

ParameterDataTypeRequiredDescription
deviceImeistringYDevice’s IMEI
iccidstringYICCID
imsistringNIMSI

The data format of "msg" when type="DEVICE" and msgClass=0

ParameterDataTypeRequiredDescription
deviceImeistringYDevice’s IMEI
fenceIdintNThe ID of the device's geo-fence
driverIdintNDriver ID
driverNamestringNDriver name
gpsSpeedintNSpeed in km/h
alarmTimeDateYDevice alarm time: yyyy-MM-dd HH:mm:ss(UTC)
alertTypeintYAlarm type, see Alarm Reference
alertValuestringNThe threshold or condition for generating an alarm. Base on alertType,Default:0. E.g.:
For overspeed alarm, it is the speed.
For eye closed alarm, 0x0000 represents the first level event, 0x0002 represents the second level event.
For the DMS camera communication abnormal alarm, 0x0000 indicates camera hasn't connected, 0x0002 indicates camera has been connected but communication is abnormal.
lngdoubleNLongitude
latdoubleNLatitude
satelliteNumintNSatellite number
filestringN'file' represent video files in format of "jpg","png","ts","avi","gif","mp3","mp4", and "amr"

e.g.

Request Body

bash
 token=a12341234123&data_list=[{"deviceImei":"353376110007413","msg":{"alertType":1,"deviceImei":"353376110007413","file":"2020_05_13_13_45_46_23.mp4","lat":22.576926,"lng":113.916612},"gateTime":"2020-05-13 05:45:46","type":"DEVICE"}]

The data format of "msg" when type="DEVICE" and msgClass=1

ParameterDataTypeRequiredDescription
deviceImeistringYDevice’s IMEI
lngdoubleYLongitude
latdoubleYLatitude
driverIdintNDriver ID
driverNamestringNDriver name
alarmTimeDateYDevice alarm time: yyyy-MM-dd HH:mm:ss(UTC)
alertTypeintYSee Alarm Reference
gpsSpeedintNOnly exist when reporting overspeed alerts
alarmSerialNointNMessage serial number. It was used when requesting API 33283
signalDropChannelintNVideo signal loss alarm.This alarm information is only valid when the alertType value is 257
signalCoverChannelintNThis alarm information is only valid when the alertType value is 258
storageFaultChannelintNStorage unit faulty alarm.This alarm information is only valid when the alertType value is 259
drivingAlarmFlagintNAbnormal driving behavior alarm.This alarm information is only valid when the alertType value is 262
...Depending on the alertType, this interface will push different information. See Alarm Reference for details.

e.g.

Request Body

bash
 token=a12341234123&data_list=[
        {
            "gateTime": "2024-02-05 15:36:37",
            "imei": "869247060001762",
            "msg": {
                "alertType": "257",
                "deviceImei": "869247060001762",
                "lng": 0,
                "alarmTime": "2024-02-03 06:34:38",
                "signalDropChannel": 18,
                "gpsSpeed": 0,
                "alarmSerialNo": 401,
                "lat": 0
            },
            "msgClass": 1,
            "type": "DEVICE"
        },
        {
            "gateTime": "2024-02-05 15:36:44",
            "imei": "869247060001762",
            "msg": {
                "alertType": "1041",
                "deviceImei": "869247060001762",
                "lng": 0,
                "alarmLabel": "30,30,30,31,37,36,32,24,02,03,14,34,38,00,01,00",
                "alarmTime": "2024-02-03 06:34:38",
                "lat": 0
            },
            "msgClass": 1,
            "type": "DEVICE"
        }
    ]

Alarm File Name

For a device with msgClass=0, when an alert is generated (such as SOS, collision, vibration, overspeed, harsh acceleration, harsh braking, etc.), the device will capture and upload the alarm image or video to file storage (dvr-upload.xxx), and DVR gateway service (jimi gateway.x.x.image.xxx) **. Then the DVR gateway service pushes the alert data to your SaaS Service (request Parameters name: file). Next, you can pull the corresponding images or videos with the alarm file name from the file storage.

For a device with msgClass=1, SaaS can call API to send online command VIDEOUPLOAD, with Parameters alarmLabel value in the alarm pushing, device will upload all multimedia files to the file storage (jimi-upload-). After data uploaded, device will report to the gateway service (jimi-c450-gate.x.x.x.image.xxx), Iothub will push the file name list to your SaaS. The file is named with the alarmLabel, your SaaS can pull the alarm file with the alarm label from the file storage.

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResponse result code, where 0 indicates success and a non-zero code indicates the gateway will try again.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.5 Push RFID Data

Request

URL{ YourURL }/rfid
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringYIt is a Character string Json array. Devices can package and upload up to 50 sets of data at a time, so you need to consider the actual servers of your SaaS when parsing the data.

Description of data_list

ParameterDataTypeRequiredDescription
moduleTypestringYRFID module type
deviceImeistringYDevice’s IMEI
gateTimestringYIt is the time the data arrived at iothub gateway. Note that it is different from the device time. Format: yyyy-MM-dd HH:mm:ss(UTC); Example: 2016-01-01 23:00:01(UTC).
postTimestringYIt is the data generation time. Format: yyyy-MM-dd HH:mm:ss(UTC); Example: 2016-01-01 23:00:01(UTC).
gpsTimestringNReporting time (UTC).Format: yyyy-MM-dd HH:mm:ss(UTC+0);
Example: 2025-01-07 09:00:54(UTC)
lngdoubleNLongitude
latdoubleNLatitude
valuestringYDecode value need to check the device packet number or the decoding algorithm. Take VL802 as an example, it uses the 9B packet, and the decoding algorithm is to convert the last 8 bits of the acquired RFID value to hexadecimal.

Request Body

bash
 token=a12341234123&data_list=[{"moduleType"2,"gateTime":"2025-01-07 23:00:01","deviceImei":"861364144249529","value":"00022F0048298C"}]
bash
 token=a12341234123 &data_list=[{"postTime":"2025-01-07 23:00:01","gateTime":"2025-01-07 23:00:01","imei":"861364144248927","time":"2025-01-07 23:00:01","value":"1B0013F77768"}]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResponse result code, where 0 indicates success and a non-zero code indicates the gateway will try again.
msgstringNDescription of the result code

e.g.

json
{
  "code": 0,
  "msg": "success"
}

1.6 Push Plug-In Data

Request

URL{ YourURL }/wgtc
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
deviceImeistringYDevice IMEI
hexContentstringYTransmitted content: HEX string
postTimestringNReporting time (UTC).Format: yyyy-MM-dd HH:mm:ss(UTC+0);
gpsTimestringNReporting time (UTC).Format: yyyy-MM-dd HH:mm:ss(UTC+0);
Example: 2025-01-07 09:00:54(UTC)
lngdoubleNLongitude
latdoubleNLatitude
categorystringNProtocol category
typeintNMessage type
tokenstringYAccess token
data_liststringYIt is a Character string Json array. Devices can package and upload up to 50 sets of data at a time, so you need to consider the actual servers of your SaaS when parsing the data.

Description of category

CategoryDataTypeDescription
0x9B3Temperature sensor data
0x9B5Card swipe data without swipe time
0xF28Card swipe data with swipe time(postTime)

Description of data_list

ParameterDataTypeRequiredDescription
deviceImeistringYDevice’s IMEI
hexContentstringYTransmitted content: HEX string

e.g.

Request Body

bash
 token=a12341234123&data_list=[{"deviceImei":"353376110007413"," hexContent ":"48656c6c6f2046726f6d204a494d4920576f726c64210a"}]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResponse result code, where 0 indicates success and a non-zero code indicates the gateway will try again.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.7 Push Oil Data

Request

URL{ YourURL }/pushoil
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringYThe data set of oil lists. It is a Character string Json array. Devices can package and upload up to 50 sets of data at a time, so you need to consider the actual servers of your SaaS when parsing the data.

Description of data_list

ParameterDataTypeRequiredDescription
pathintYSensor ID
deviceImeistringYDevice’s IMEI
gateTimestringYIt is the time of the server where the gateway is deployed. Note that it is different from the device time. Format: yyyy-MM-dd HH:mm:ss; Example: 2016-01-01 23:00:01(UTC)
gpsTimestringNReporting time (UTC).Format: yyyy-MM-dd HH:mm:ss(UTC+0);
Example: 2025-01-07 09:00:54(UTC)
lngdoubleNLongitude
latdoubleNLatitude
valuedoubleYOil value, divide by 100, unit: CM

e.g.

Request Body

bash
 token=a12341234123&data_list=[{"deviceImei":"353376110007413"," gateTime ":"2020-05-13 05:45:46"," value ":2.3," path ":1}]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResponse result code, where 0 indicates success and a non-zero code indicates the gateway will try again.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.8 Push Notification

Request

URL{ YourURL }/pushfileupload
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringY

Description of data_list

ParameterDataTypeRequiredDescription
fileNamestringYFile name list, use ; to separate, format as below
{deviceImei}_{alarmLabel}_{xy}.mp4; {deviceImei}_{alarmLabel}_{xy}.jpg
deviceImei: Device’s imei
alarmLabel: Associate to which alarm
suffix:
ADAS alert: 64
DMS alert: 65
number: S/N,0~2
{xy}:
x--> Channel Id
y-->Serial number of the mp4/jpg file
E.g.
862708042245071_63613365396662220616135436010500_00.mp4
862708042245071_63613365396662220616135436010500_13.jpg
deviceImeistringYDevice’s IMEI
gateTimestringYIt is the time of the server where the gateway is deployed. Note that it is different from the device time. Format: yyyy-MM-dd HH:mm:ss; Example: 2016-01-01 23:00:01(UTC)
resultstringYFile Upload Result, SUCCESS or FAILURE

Description of result

ParameterDataTypeRequiredDescription
resultstringYwhen the result value is "FAILURE", the value of fileName may be "no image or no video, means that there is no associated file on the device

e.g.

Request Body

bash
token=a12341234123&data_list=[{"deviceImei": "353376110007413", "gateTime": "2020-05-13 05:45:46","result":"SUCCESS","fileName": "353376110007413_1000741210314356_64.mp4; 353376110007413_1000741210314356_64_00.jpg;353376110007413_1000741210314356_64_01.jpg ;353376110007413_1000741210314356_64_02.jpg"}]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success and a non-zero code indicates there is an error.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.9 Push Tem and Hum

Request

URL{ YourURL }/pushtem
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringY

Description of data_list

ParameterDataTypeRequiredDescription
humdoubleYHumidity
temdoubleYTemperature
deviceImeistringYDevice’s IMEI
gateTimestringYIt is data uploads to gateway time. Format: yyyy-MM-dd HH:mm:ss; Example: 2016-01-01 23:00:01(UTC)
postTimestringYIt is the data generation time. Format: yyyy-MM-dd HH:mm:ss; Example: 2023-01-01 23:00:01(UTC)
gpsTimestringNReporting time (UTC).Format: yyyy-MM-dd HH:mm:ss(UTC+0);
Example: 2025-01-07 09:00:54(UTC)
lngdoubleNLongitude
latdoubleNLatitude

e.g.

Request Body

bash
token=a12341234123&data_list=[{"hum":79.6,"deviceImei":"861364144249512","gateTime":"2022-04-19 02:23:12","tem":49.5}]
bash
token=a12341234123&data_list=[{"postTime":"2023-10-16 05:41:08","deviceImei":"861364144248927","gateTime":"2023-10-19 03:20:25","tem":-10.5}]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success and a non-zero code indicates there is an error.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.10 Push LBS Data

Request

URL{ YourURL }/pushlbs
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringY

Description of data_list

ParameterDataTypeRequiredDescription
postTypestringYvalue is "WIFI" or "LBS"
deviceImeistringYDevice’s IMEI
gateTimestringYIt is the time of the server where the gateway is deployed.Note that it is different from the device time. Format: yyyy-MM-dd HH:mm:ss; Example: 2016-01-01 23:00:01(UTC)
lbsJsonstringYLBS or WIFI informations

e.g.

Request Body

bash
token=a12341234123&data_list=[{"postType":"LBS","deviceImei":"861364144249512","gateTime":"2022-04-19 02:23:12","lbsJson":"{\"mnc\":0,\"cellList\":[\"33296,104957255,70\",\"33296,135005976,66\",\"33296,250018432,31\",\"32823,97993611,27\",\"33296,97498558,26\",\"33296,139975999,23\",\"33296,104957256,50\"],\"mcc\":460}"}]

The cellList contains multiple sets of LBS information(LAC,CI,RSSI),LAC:Location Area Code, CI:Cell Tower ID,RSSI:Cell signal strength

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success and a non-zero code indicates there is an error.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.11 Push Resource List

Request

URL{ YourURL }/pushresourcelist
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringY

Description of data_list

ParameterDataTypeRequiredDescription
totalNumstringYThe numbers of resources
imeistringYDevice’s IMEI
instructionIDstringYUnique Instruction ID
resourceListstringYList of resources name

e.g.

Request Body

json
token=a12341234123&data_list=[
    {
        "totalNum": 0,
        "imei": "862708042244652",
        "instructionID": "08768b02395c4f7da624c2cfa8a0a880",
        "resourceList": [
            {
                "channel": 1,
                "beginTime": "2022-07-01 14:07:12",
                "endTime": "2022-07-01 14:07:53",
                "alarmFlag": 0,
                "resourceType": 0,
                "codeType": 0,
                "storageType": 0,
                "fileSize": 33370112
            },
            {
                "channel": 1,
                "beginTime": "2022-07-01 14:04:12",
                "endTime": "2022-07-01 14:07:12",
                "alarmFlag": 0,
                "resourceType": 0,
                "codeType": 0,
                "storageType": 0,
                "fileSize": 146116796
            }
        ]
    }
]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success and a non-zero code indicates there is an error.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.12 Push Ftp Upload Result

Request

URL{ YourURL }/pushftpfileupload
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringY

Description of data_list

ParameterDataTypeRequiredDescription
resultintYResult. 0: Succeed 1: Fail
deviceImeistringYDevice’s IMEI
instructionIDstringYUnique Instruction ID
gateTimestringYIt is the time of the server where the gateway is deployed. Note that it is different from the device time. Format: yyyy-MM-dd HH:mm:ss; Example: 2016-01-01 23:00:01(UTC)

e.g. Request Body

json
token=a12341234123&data_list= [{
        "result": 0,
        "instructionID": "123456789",
        "deviceImei": "869247060001259",
        "gateTime": "2022-07-01 08:14:21"
    }]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success and a non-zero code indicates there is an error.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.13 Push Event

Request

URL{ YourURL }/pushIothubEvent
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringY

Description of data_list

ParameterDataTypeRequiredDescription
deviceImeistringYDevice’s IMEI
gateTimelongYIt is the time of the server where the gateway is deployed. Note that it is different from the device time. Format: yyyy-MM-dd HH:mm:ss;; Example: 2025-01-07 17:13:32.
eventTypestringYFixed string value:
- UploadAlarmFileList
- UploadAlarmFileBegin
- UploadAlarmFileEnd
- UploadMediaFileBegin
- UploadMediaFileEnd
eventContentstringYSee the table below for details
  • Description of UploadAlarmFileList eventContent
ParameterDataTypeRequiredDescription
alarmLabelstringYsee Alarm Reference “ADAS" and “DMS"
alarmNostringY
fileCountintYfiles Number
fileListstringYDescription information for each file

Description of fileList

ParameterDataTypeRequiredDescription
filenamestringYfile name
fileSizeintYfile size
fileTypeintY0x00 photo, 0x01 audio, 0x02 video , 0x03 text

e.g.

Request Body

json
token=a12341234123&data_list=[
    {
        "eventType": "UploadAlarmFileList",
        "deviceImei": "869506047517027",
        "gateTime": "2025-01-07 17:13:32",
        "eventContent": "{
            "alarmLabel": "37353137303237220805174334000500",
            "alarmNo": "3639353036303437353137303237323230383035313734333334303030353030",
            "fileCount": 5,
            "fileList": [{
                    "fileNameLength": 50,
                    "fileSize": 64,
                    "fileType": 3,
                    "filename": "00_65_6501_00_86924706000151220706160217000500.bin",
                    "status": "NO"
                },
                {
                    "fileNameLength": 50,
                    "fileSize": 7670,
                    "fileType": 0,
                    "filename": "00_65_6501_01_86924706000151220706160217000500.jpg",
                    "status": "NO"
                },
                {
                    "fileNameLength": 50,
                    "fileSize": 7658,
                    "fileType": 0,
                    "filename": "00_65_6501_02_86924706000151220706160217000500.jpg",
                    "status": "NO"
                },
                {
                    "fileNameLength": 50,
                    "fileSize": 7611,
                    "fileType": 0,
                    "filename": "00_65_6501_03_86924706000151220706160217000500.jpg",
                    "status": "NO"
                },
                {
                    "fileNameLength": 50,
                    "fileSize": 1458411,
                    "fileType": 2,
                    "filename": "02_65_6501_04_86924706000151220706160217000500.mp4",
                    "status": "NO"
                }
            ]}",
    }
]
  • Description of UploadAlarmFileBegin eventContent
ParameterDataTypeRequiredDescription
filenamestringYfile name
fileSizeintYfile size
fileTypeintY0x00 photo, 0x01 audio, 0x02 video , 0x03 text

e.g.

Request Body

json
token=a12341234123&data_list=[
    {
        "eventType": "UploadAlarmFileBegin",
        "deviceImei": "869506047517027",
        "eventContent": "{
                "fileName": "00_65_6501_00_86924706000151220706160217000500.bin",
                "fileSize": 64,
                "fileType": 3
            }",
        "gateTime": "2025-01-07 17:13:32"
    }
]
  • Description of UploadAlarmFileEnd eventContent
ParameterDataTypeRequiredDescription
filenamestringYfile name
fileSizeintYfile size
fileTypeintY0x00 photo
0x01 audio
0x02 video
0x03 text

e.g.

Request Body

json
token=a12341234123&data_list=[
    {
        "eventType": "UploadAlarmFileEnd",
        "deviceImei": "869506047517027",
        "eventContent": "{
                "fileName": "00_65_6501_00_86924706000151220706160217000500.bin",
                "fileSize": 64,
                "fileType": 3
            }",
        "gateTime": "2025-01-07 17:13:32"
    }
]
  • Description of UploadMediaFileBegin eventContent
ParameterDataTypeRequiredDescription
filenamestringYfile name consists of the following fields: deviceImei_channel_mediaId_mediaType_timestamp e.g 869506047517027_2_835509876_0_1659765476555.jpg
longitudedoubleYlongitude
latitudedoubleYlatitude

e.g.

Request Body

json
token=a12341234123&data_list=[
    {
        "eventType":"UploadMediaFileBegin",
        "deviceImei":"869506047517027",
        "eventContent":"{
                "fileName":"869506047517027_2_835509876_0_1659765476555.jpg",
                "latitude":113.94313,
                "longitude":22.576571
            }",
        "gateTime":"2025-01-07 17:13:32"
    }
]
  • Description of UploadMediaFileEnd eventContent
ParameterDataTypeRequiredDescription
filenamestringYfile name

e.g.

Response Body

json
token=a12341234123&data_list=[
    {
        "eventType":"UploadMediaFileEnd",
        "deviceImei":"869506047517027",
        "eventContent":"{"fileName":"869506047517027_2_835511385_0_1659766646070.jpg"}",
        "gateTime":"2025-01-07 17:13:32"
    }
]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success and a non-zero code indicates there is an error.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.14 Push PassThrough Data

Request

URL{ YourURL }/pushPassThroughData
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringYSee the table below for details

Description of data_list

ParameterDataTypeRequiredDescription
deviceImeistringYDevice’s IMEI
gateTimestringYIt’s the time of the server where the gateway is deployed. Note that it is different from the device time. Format: yyyy-MM-dd HH:mm:ss; Example: 2016-01-01 23:00:01(UTC)
gpsTimestringNReporting time (UTC).Format: yyyy-MM-dd HH:mm:ss(UTC+0);
Example: 2025-01-07 09:00:54(UTC)
lngdoubleNLongitude
latdoubleNLatitude
typeintYPass-through message type
contentstringYPass-through message content. The message content is base64 encoded.
categorystringNPass-through protocol category. eg:0x0900,0x9C, etc.

Description of type

categorytypeDescription
0x09000GNSS module detailed positioning data
0x090011Road transport permit IC card information
0x090065Serial port 1 pass-through
0x090066Serial port 2 pass-through
0x0900240~255User-defined pass-through messages
0x9C509C packet data pass-through(QCVN31 data, only for KKS gateway)
0x94094 packet data pass-through(GV20 External voltage, only for KKS gateway)

e.g.

Request Body

json
token=a12341234123&data_list=[{
    "deviceImei": "869247060001390",
    "type": 241,
    "category": "0x0900",
    "gateTime": "2022-11-04 07:22:20",
    "content": "YXBwbGU="
}]
json
token=a12341234123&data_list=[{
    "deviceImei":"353376110060339",
    "type":50,
    "category":"0x9C",
    "gateTime":"2022-12-01 05:48:48",
    "content":"JEdTSFQsMiw3OCw8SFVBTkdYSU4sNTg0NTIwMTMxNCwwNzoxMTo0NiwwLDAsMDg6MTE6MDgsMTEzLjg4MTU2MTc2NjY2NjY4LDIyLjU5Mjk1ODQxNjY2NjY3PiwxNTgj"
}]
json
token=a12341234123&data_list=[{
  "deviceImei":"752533678900242",
  "type":0,
  "category":"0x94",
  "gateTime":"2023-04-20 14:13:27",
  "content":"eyJwb3dlclZhbHVlIjoxMy4wfQ=="}]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success and a non-zero code indicates there is an error.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.15 Push Extension Data

Request

URL{ YourURL }/pushTerminalTransInfo
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringYSee the table below for details

Description of data_list

ParameterDataTypeRequiredDescription
postTimestringYReport time.Format: yyyy-MM-dd HH:mm:ss(UTC+0);
Example: 2025-01-07 09:00:54(UTC)
deviceImeistringYDevice’s IMEI
gpsTimestringNReporting time (UTC).Format: yyyy-MM-dd HH:mm:ss(UTC+0);
Example: 2025-01-07 09:00:54(UTC)
lngdoubleNLongitude
latdoubleNLatitude
extensionIdintYExtension ID 8197: Device status information reporting; 8199: Terminal serial port data upload
ContentstringYThe content is related to extensionId, and the content and format vary under different extensionIds. See the table below for deptails

Description of extensionId

  • extensionId = 8197, content can be converted into map structured data, and the meaning of key(int) as follows
keyDescription
1Voltage. Unit: V
2Daily traffic data report, reported once a day, cleared by month. Unit: KB
3Battery power percentage. Range: 0~100
4Device charge status. 0x00: not charged; 0x01: discharge
8193External voltage. Unit: V

Note: when 8197 reports, these keys may not necessarily exist.

  • extensionId = 8199, content can be converted into map structured data, and the meaning of key(int) as follows
keyDescription
1Swipe card data. Get the swipe card data from the serial port and pass-through transmit to the platform direcctly. Base64 encoded, need to be decoded before use.

Note: when 8199 reports, these keys may not necessarily exist.

e.g.

Request Body

json
token=a12341234123&data_list=[{"postTime":"2025-01-07 09:00:54","deviceImei":"868120303960873","extensionId":8197,"content":"{8193:10.6}"}]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success and a non-zero code indicates there is an error.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.16 Push Offline Command

This API is used to send asynchronous and offline command. Asynchronous Commands: If the "sync" parameter is set to "false", a command in delivery will be changed to an asynchronous command.

Offline Commands: If the response data packet indicates the device is offline (_code:300) or timed out (_code:600) and the "offlineFlag" parameter in a command in delivered is set to "true", then the command will be cached as an offline command, which will be delivered once the device re-accesses the gateway.

The results of offline and asynchronous commands will be pushed via the following interfaces:

Request

URL{ YourURL }/pushInstructResponse
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token (same with http.pushToken)
msgTypeintY1 means push the result of the asynchronous commands
2 means push the result of the offline commands.
data_liststringYDeliver Results: The data_list may contain the deliver results of multiple commands. The format and description of the response to each command can be found in Response.
Tips: The "serverFlagId" field in the request data and the "_serverFlagId" field in the response data correspond to each other and indicate the relationship between the two pieces of data.

E.g.

Request Body

{
    "token": "a12341234123",
    "msgType": 1,
    "data_list": [{
            "code": 0,
            "msg": "success",
            "data": {
                "_code": "100",
                "_imei": "000105042285948",
                "_content": "[VERSION]C450_20220309,[BUILD]2022-03-09 14:56",
                "_msg": "Command communication successful response",
                "_serverFlagId": "0"
            }
        }, {
            "code": 0,
            "msg": "success",
            "data": {
                "_code": "100",
                "_imei": "000105042285999",
                "_content": "[VERSION]C450_20220309,[BUILD]2022-06-09 14:56",
                "_msg": "Command communication successful response",
                "_serverFl: "0"
            }
        }]
    }

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from the data receiving service.

ParameterDataTypeRequiredDescription
codeintYResponse result code, where 0 indicates success and a non-zero code indicates the gateway will try again.
msgstringNDescription of the result code

E.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

APIs for OBD Devices


1.17 Push OBD Data

Request

URL{ YourURL }/pushobd
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringYSee the table below for details

Description of data_list

ParameterDataTypeRequiredDescription
deviceImeistringYDevice’s IMEI
obdJsonJSONYSee table below for details

Description of obdJson

ParameterDataTypeDescription
car_typeint1: Comercial vehicle
2: Passenger vehicle
Add sequentially...
push_timeDateFormat: yyyy-MM-dd HH:mm:ss;
Example: 2022-11-24 08:00:48
event_timeDateFormat: yyyy-MM-dd HH:mm:ss;
Example: 2022-09-28 18:04:04
AccStateint0 : ACC_OFF, 1: ACC_ON
statusFlagsSee definition in table 20 of OBD Data Description
lngdoubleUnit: degree. The longitude in degrees is multiplied by 10 to the 6th power. Precision: one millionth of a degree
latdoubleUnit: degree. The latitude in degrees is multiplied by 10 to the 6th power. Precision: one millionth of a degree
dataID1intSee details on table 21, table22, table 23 of OBD Data Description
dataID2intSee details on table 21, table22, table 23 of OBD Data Description
......
dataIDnintSee details on table 21, table22, table 23 of OBD Data Description

e.g.

Request Body

json
token=a12341234123&data_list=[{
    "deviceImei": "358511020000026",
    "obdJson": {
        "1347": "41.12",
        "lng": 31.212468,
        "statusFlags": 786434,
        "imei": "358511020000026",
        "1350": "145000.0",
        "AccState": 0,
        "push_time": "2022-11-24 10:43:24",
        "event_time": "2022-09-28 18:04:04",
        "lat": 30.10028,
        "1328": "12550 ",
        "car_type": 2,
    }
}]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success and a non-zero code indicates there is an error.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.18 Push Fault Info

Request

URL{ YourURL }/pushfaultinfo
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringYSee the table below for details

Description of data_list

ParameterDataTypeRequiredDescription
deviceImeistringYDevice’s IMEI
gateTimestringYIt is the time of the server where the gateway is deployed. Note that it is different from the device time. Format: yyyy-MM-dd HH:mm:ss; Example: 2022-11-24 03:24:34.
lngdoubleUnit: degree. The longitude in degrees is multiplied by 10 to the 6th power. Precision: one millionth of a degree
latdoubleUnit: degree. The latitude in degrees is multiplied by 10 to the 6th power. Precision: one millionth of a degree
statusFlagsSee table 20 of OBD Data Description for the definition of status bits
faultCodeListstringIf faultNum = 0, faultCodeList is empty
faultNumstring
dataSendTimestringOnly reupload message has value, otherwise, the value is 0 by default.
eventTimelongFormat: yyyy-MM-dd HH:mm:ss(UTC+0); Example: 2025-01-07 09:00:54(UTC)

e.g.

Request Body

json
token=a12341234123&data_list=[{
        "deviceImei":"861364144249529",
        "lng":113.1553,
        "gateTime":"2022-11-25 03:45:44",
        "faultNum":1,
        "eventTime":"2025-01-07 09:00:54",
        "statusFlags":16777216,
        "dataSendTime":0,
        "lat":23.0632,
        "faultCodeList":"[\"P0301\"}"
}]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success and a non-zero code indicates there is an error.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

1.19 Push Trip Report

Request

URL{ YourURL }/pushtripreport
Http MethodPOST
Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
tokenstringYAccess token
data_liststringYSee the table below for details

Description of data_list

ParameterDataTypeRequiredDescription
deviceImeistringYDevice’s IMEI
gateTimestringYIt is the time of the server where the gateway is deployed. Note that it is different from the device time. Format: yyyy-MM-dd HH:mm:ss; Example: 2016-01-01 23:00:01(UTC).
typeint
gnssTypeFlagsBitBit0: begin GNSS latitude,
0:North latitude;
1:South latitude;
Bit1: begin GNSS longitude,
0: East longitude;
1: West longitude;
Bit2: end GNSS latitude,
0:North latitude;
1:South latitude;
Bit3: end GNSS longitude,
0: East longitude;
1: West longitude;
Bit4 ~ Bit7: 0000
idleTimesintAccumulated idle time. Unit: s
tripSeqintTerminal accumulative value after each trip.
milesdoubleMiles in this Trip. Unit: KM; Precision: 0.1
idleNumberint
beginLatdoubleUnit: degree. The latitude in degrees is multiplied by 10 to the 6th power. Precision: one millionth of a degree
endLatdoubleUnit: degree. The latitude in degrees is multiplied by 10 to the 6th power. Precision: one millionth of a degree
beginLngdoubleUnit: degree. The longitude in degrees is multiplied by 10 to the 6th power. Precision: one millionth of a degree
endLngdoubleUnit: degree. The longitude in degrees is multiplied by 10 to the 6th power. Precision: one millionth of a degree
beginTimeBCD[6]Format: YY-MM-DD-HH-MM-SS.
Example: 2022-06-26 16:20:14
endTimeBCD[6]Format: YY-MM-DD-HH-MM-SS.
Example: 2022-06-27 08:39:50
oilsdoubleFuel consumption. Unit: L; Precision: 0.01
propertiesint01: Start trip; 02: End trip

e.g.

Request Body

json
token=a12341234123&data_list=[{
    "idleTimes": 53,
    "gateTime": "2022-11-25 01:43:13",
    "type": 0,
    "tripSeq": 34,
    "gnssTypeFlags": 0,
    "miles": 53.9,
    "beginLat": 23.111922,
    "idleNumber": 46,
    "endLat": 23.111828,
    "deviceImei": "861364144249529",
    "oils": 7.14,
    "beginLng": 114.409752,
    "beginTime": "2022-06-26 16:20:14",
    "endTime": "2022-06-27 08:39:50",
    "endLng": 114.409752,
    "properties": 2
}]

Response

Content-Typeapplication/json;charset=UTF-8

Response Content

A correct response in JSON is required from your data receiving service.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success and a non-zero code indicates there is an error.
msgstringNDescription of the result code

e.g.

Response Body

json
{
  "code": 0,
  "msg": "success"
}

2 Request APIs

API Description

APIsAPI TypeDescriptionJIMI Protocol DeviceJT/T Protocol Device
128Request`Universal API for sending commands to all JIMI&JT/T devices[√][√]
37121RequestReal-time audio and video transmission request command[√]
37122RequestAudio and video real-time transmission control commands[√]
37377RequestRemote video playback request[√]
37378RequestRemote video playback control[√]
37381RequestQuery the list of audio and video resources[√]
37382RequestFTP file upload command[√]
37383RequestFTP file upload control[√]
33027RequestSetting terminal parameters[√]
33028RequestQuery terminal parameters[√]
33029RequestTerminal control[√]
33030RequestQuery specified terminal parameters[√]
33031RequestQuery terminal properties[√]
33283RequestManual acknowledgment alarm[√]
33536RequestText message distribution[√]
34817RequestCamera shoots immediately[√]
34818RequestMultimedia data retrieval[√]
34819RequestMultimedia data upload[√]
34821RequestSingle multimedia data upload[√]
35072RequestData downlink transparent transmission[√]
37384RequestAlarm attachement upload[√]
33027RequestSetting terminal parameters[√]
33028RequestQuery terminal parameters[√]
33029RequestTerminal control[√]
33030RequestQuery specified terminal parameters[√]
33031RequestQuery terminal properties[√]
33283RequestManual acknowledgment alarm[√]
33536RequestText message distribution[√]
34817RequestCamera shoots immediately[√]
34818RequestMultimedia data retrieval[√]
34819RequestMultimedia data upload[√]
34821RequestSingle multimedia data upload[√]
35072RequestData downlink transparent transmission[√]
37384RequestAlarm attachement upload[√]
/api/device/queryOfflineInstructRequestQuery offline command[√][√]
/api/device/deleteOfflineInstructRequestCancel offline command[√][√]

Request & Response

URL{InsAddress} /api/device/sendInstruct
Http MethodPOST
Body Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
deviceImeistringYThe IMEI of the device that receives the command
cmdContentstringYThe command code
serverFlagIdintYThe unique identification field for the current request which is used for correspondence between request and response. It's recommended incrementing in order.
proNointYFor details, see Chapter 2.1 API command (ProNo)
platformstringYPlatform: web or app
requestIdstringYThe unique identification field for the current request which is used for troubleshooting and log tracing.
cmdTypestringNcmdType: normallns or general. It is related to offline commands. Regardless of whether the cmdType value is normallns or general, only one offline command of this type will be saved.
languagestringNLanguage: zh or en
syncbooleanNTrue: Sync; False: Async.
Sync refers to the process of issuing the instruction is considered complete until the device responds and returns a result. Async means that once an instruction is sent, regardless of whether the device returns a result or not, the process of issuing the instruction ends.
offlineFlagbooleanNIf offlineFlag is true, indicates that commands will be cached when the device is offline or timed out, and will be automatically resended when the device is online; if it is false, the intructions will not be resended. Default: true
removeLimitFlagbooleanNWorking together with WAKE_UP command. True: means can continuously send commands to devices after receiving a timeout response.
timeOutintNTimeout time. Unit: seconds. Default: 30
tokenstringYAccess token

HTTP header

Since the response body is in JSON format, the response header will be as follows.

headervalue
Content-Typeapplication/json;charset=UTF-8

Response Content

The response body is in JSON format. A return code 0 from the HTTP response only indicates that your request was successful, so you still need to check the respond body to ensure that you get the correct return value.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success and a non-zero code indicates there is an error.
msgstringYDescription of the result code
dataJSONYCommand execution result which is return by the device. See the table below for details

Definition of the "data" object

ParameterDataTypeRequiredDescription
_codeintYCommand response code:
100: The command sent successfully and received a return code indicating the device status, such as busy or error.
200: Invalid parameter
300: Device offline
301: Device not registered with route table (No mapping between IMEI and gateway ID is found in Redis)
302: The last command has been sent and no response indicating "device busy" is received.
303: SMS sent successfully
304: SMS failed
400: Network error (Interrupted, etc.)
500: Code execution exception
600: Request timeout
_msgstringYResponse message to a command
_typestringYServer flag ID
_contentstringYCommand content
_proNostringYProtocol number
_languagestringNLanguage
_imeistringYDevice IMEI
_route_client_timeDateYRoute client time
_serverFlagIdstringYServer flag ID
_gateIdstringYGateway ID
_route_server_timeDateYRoute server time

E.g.

Response Body:

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_code": "100",
    "_imei": "000105042285948",
    "_content": "[VERSION]C450_20220309,[BUILD]2022-03-09 14:56",
    "_msg": "Command communication successful response",
    "_serverFlagId": "0"
  }
}
json
{
  "code": 400002,
  "msg": "Missing required parameter,parameter:device imei",
  "data": null
}
json
{
  "code": 0,
  "msg": "The device is offline or times out, and the command is successfully sent offline. ",
  "data": {
    "_code": "600",
    "_msg": "request timeout"
  }
}
json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_code": "302",
    "_msg": "Device busy (previous command has not returned)"
  }
}

2.1 Command API(proNo:128)

This is a universal API for issuing commands. It enables SaaS to communicate and interact with devices by sending commands, such as, VERSION#, VIDEOUPLOAD, STARTLIVEURL,STOPLIVEURL,etc.. Please refer to device command list for command details.

E.g. Uploading event alarms videos of JT/T device via VIDEOUPLOAD

img

cmdContent in the request:

  • [VIDEOUPLOAD,{IP},{PORT},{ALARM LABEL},{CHANNEL},{TYPE}
ParameterDescription
IP{ FileAddress } customers' storage server IP
PORT{ FileAddress } Storage service port (Default: IoTHub storage service port 23010) port
alarmLabelInside of ADAS/DMS pushing alarm data list
channelThe corresponding camera of dashcam
type0: Picture, 1:Video, 2:Both

Request Body

bash
cmdContent=VIDEOUPLOAD,120.78.224.93,23010,34353737373532220307181923000500,1,2&cmdType=normallns&deviceImei=000105042285948&language=zh&offLineFlag=0&platform=web&proNo=128&requestId=6&serverFlagId=0&sync=true&timeOut=4&token=123

Response Body

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_language": "zh",
    "_proNo": "128",
    "_code": "100",
    "_type": "normallns",
    "_imei": "000105042285948",
    "_content": "VIDEOUPLOAD,120.78.224.93,23010,34353737373532220307181923000500,1,2",
    "_route_client_time": "1647594488392",
    "_msg": "Command communication successful response",
    "_serverFlagId": "0"
  }
}

To support HTTPS, perform the following steps:

  1. Apply for domain names and certificates
  2. Set up your own nginx service
  3. Configure domain names and certificates
  4. Map the HTTPS port of the nginx service (default 443) to the jimi-upload service port (default 23010).
  5. (Only for sending the VIDEOUPLOAD instruction) Change IP to the domain name requested in step 1 and port to the corresponding HTTPS port number.

Request Body

bash
cmdContent=VIDEOUPLOAD,hkhttpupload.dev.i.jimicloud.com,443,63613365396431220610185520000500,1,2&cmdType=normallns&deviceImei=862708042244652&language=zh&offLineFlag=0&platform=web&proNo=128&requestId=4473&serverFlagId=4473&sync=true&timeOut=4&token=9d74cfe6bf45470baaee4d1909418424

Response Body

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_code": "100",
    "_imei": "862708042244652",
    "_content": "ok",
    "_msg": "Command communication successful response",
    "_serverFlagId": "4473"
  }
}

2.2 Real-time Audio/Video(proNo:37121)

SaaS can send a real-time audio and video request, including real-time video transmission, two-way intercom, one-way monitor, center broadcast and transparent transmission. If the request is successful, customer will receive a response. Then the data(audio and/or video) stream will be pushed to IoTHub stream media server. Next, customer can pull the data stream with the URL address(see details on Pull Live Stream URL) from the stream media server. Please refer to the table below for cmdcontent details.

cmdContentDescription
DataType0: Audio and video
1: Video
2: Two-way intercom
3: Monitor
4: Center broadcast
5: Transparent transmission
codeStreamType0: Main stream
1: Sub stream
channelCamera channel number, corresponding to camera 1-5
videoIPLive Video Server IP Address
videoTCPPortLive Video Server TCP Port Number Default: {JR-RtpLivePort}
videoUDPPortLive Video Server UDP Port Number
  • Case 1 Channel-1 real-time audio and video transmission request

Request Body

json
{
  "deviceImei": "869506047517209",
  "cmdContent": {
    "dataType": "0",
    "codeStreamType": "0",
    "channel": "1",
    "videoIP": "120.78.224.93",
    "videoTCPPort": "10002",
    "videoUDPPort": "0"
  },
  "serverFlagId": "0",
  "proNo": "37121",
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "offLineFlag": "1",
  "token": "123"
}

Response Body

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_imei": "869506047517209",
    "_content": "ok",
    "_code": "100",
    "_msg": "Command communication successful response",
    "_serverFlagId": "0"
  }
}
  • Case 2 SaaS monitor device in one-way intercom

e.g. Send an instruction to a server with ip: 120.78.224.93, port: 1936,deviceIMEI: 869247060001549

Request Body

json
{
  "deviceImei": "869247060001549",
  "cmdContent": {
    "dataType": "0",
    "codeStreamType": "5",
    "channel": "16",
    "videoIP": "120.78.224.93",
    "videoTCPPort": "1936",
    "videoUDPPort": "0"
  },
  "serverFlagId": "0",
  "proNo": "37121",
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "offLineFlag": "1",
  "token": "123"
}

Response Body

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_imei": "869247060001549",
    "_content": "ok",
    "_code": "100",
    "_msg": "Command communication successful response",
    "_serverFlagId": "0"
  }
}
  • Pull stream from stream media server

    • Pull Live Stream URL

      • http://{your IoTHub server IP}:8881/{Channel ID}/{Device IMEI}.flv
      • rtmp://{your IoTHub server IP}:1936/{Channel ID}/

      E.g.:

      bash
      rtmp://120.78.224.93:1936/3/868120303960873
      http://120.78.224.93:8881/3/868120303960873.flv
    • Install a test tool(media player), configure the URL address and pull the stream.

      Take 'VLC media player' as an example:

      On main menu of VLC media player, click Media --> open network stream--> input network URL-->click Play, the video/audio stream can be played on the media player. img

2.3 Real-time Audio/Video Control(proNo:37122)

With this command, SaaS can control a real-time audio and video transmission, for example, switch stream, pause stream, and close the audio and video transmission channel. Please refer to the table below for 'cmdContent' details.

cmdContentDataTypeDescription
channelbyteThe corresponding camera channel number, range: 1-5
cmdbyte0: Turn off the audio and video transmission command
1: switch stream (add pause and resume)
2: Pause sending all streams on this channel
3: Resume paused streams with the same data type as before
4: Turn off the two-way intercom
DataTypebyteTurn off audio and video types
0: close the audio and video stream on this channel;
1: Only close the audio on this channel but keep the video;
2: Only close the video on this channel but keep the audio
codeStreamTypebyteSwitch the code stream type. Switch the previously applied stream to the newly applied stream, and the audio is the same as before. The stream for the new application is:
0: Main stream;
1: Sub stream

E.g. Close all real-time audio and video of channel 1

Request Body

json
{
  "deviceImei":000506047517027,
  "cmdContent": {
    "channel": 1,
    "cmd": "0",
    "dataType": "0",
    "codeStreamType": 0
  },
  "serverFlagId": 0,
  "proNo": 37122,
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "offLineFlag": 1,
  "token": "123"
}

2.4 Query Video List(proNo:37381)

Through this API, SaaS can query the audio and/or video lists from the device by combining the audio and video types, channel number, alert type, begin time and end time. After requesting this API, customers can get the data list by requesting push API 1.11 pushing resource list. Please refer to the table below for cmdContent details.

cmdContentDataTypeDescription
channelbyteLogical camera channel number 1~5. And 0 stands for all cameras
beginTimelongStart time
endTimelongEnd Time
alarmFlag64BitAlarm flag 64Bit:
bit0 ~ bit31 (please refer to standard alarm of Alarm Reference);
bit32 ~ bit63 (please refer to standard alarm of Alarm Reference);
all zero indicate no alarm type
resourceTypebyteAudio and video resource types.
0: audio and video
1: audio
2: video
3: With or without audio
codeTypebyteStream type:
0: main stream or substream
1: main stream
2: substream
storageTypebyteStorage type:
0: main storage or disaster recovery storage
1: main storage
2: disaster recovery storage storage
instructionIDbyteInstruction ID uniquely identifies a command, and is used for the correspondence between downlink commands and uplink responses

E.g.

Request Body

json
{
  "deviceImei": "000506047517027",
  "cmdContent": {
    "channel": 0,
    "beginTime": "220402113555",
    "endTime": "220402113854",
    "alarmFlag": 0,
    "resourceType": 0,
    "codeType": 0,
    "storageType": 0,
    "instructionID": "123456789"
  },
  "serverFlagId": 0,
  "proNo": 37381,
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "offLineFlag": 1,
  "token": "123"
}

Response Body

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_code": "100",
    "_imei": "000506047517027",
    "_content": "0",
    "_msg": "AudioVideoResourceList ack successful response",
    "_serverFlagId": "11000"
  }
}

2.5 Video Playback(proNo:37377)

When SaaS sends an audio and video recording playback request, the device responds with the 0x1205 (device uploads video file list) command, and then the recorded data is transmitted in the form of real-time audio and video data through the RTP protocol payload package format. To use this API, you need to request the API 37381 to get the beginTime and endTime. The video list can be checked via push resource list API. img

Please refer to the table below for cmdContent details.

cmdContentDataTypeDescription
serverAddressstringIP address of real-time audio and video server
tcpPortintThe port of the real-time audio and video server, set to zero when not using TCP transmission.  Default: {JR-RtpHistoryPort}.
udpPortintThe port of the real-time audio and video server, set to zero when not using UDP transmission
channelbyteThe corresponding camera channel number, range: 1-5.
resourceTypebyteAudio and video resource types:
0: audio and video
1: audio
2: video
3: audio or video
codeTypebyteStream type:
0: main stream or substream
1: main stream
2: substream
If the channel only transmits audio, set this field to 0.
storageTypebyteStorage type:
0: main storage or disaster recovery storage
1: main storage
2: disaster recovery storage
playMethodbytePlayback method:
0: normal playback
1: fast-forward playback
2: keyframe fast rewind
3: keyframe playback
4: single frame upload
forwardRewindbyteFast forward or fast reverse multiple. When the playback mode is 1 and 2, the content of this field is valid, otherwise it is set to 0.
0: invalid
1: 1x
2: 2x
3: 4x
4: 8x
5: 16x
beginTimeBCD(BinarycodedDecimal)Begin time (format:YYMMDDHHMMSS)
endTimeBCD(BinarycodedDecimal)End time (format:YYMMDDHHMMSS)
instructionIDInstruction ID uniquely identifies a command, and is used for the correspondence between downlink commands and uplink responses

E.g.

Request Body

json
{
  "deviceImei": "869506047517209",
  "cmdContent": {
    "serverAddress": "120.78.224.93",
    "tcpPort": "10003",
    "udpPort": "0",
    "channel": "1",
    "resourceType": "0",
    "codeType": "0",
    "storageType": "0",
    "playMethod": "0",
    "forwardRewind": "0",
    "beginTime": "220402113555",
    "endTime": "220402113854",
    "instructionID": "123456789"
  },
  "serverFlagId": 0,
  "proNo": 37377,
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "offLineFlag": 1,
  "token": "123"
}
  • Pull stream from stream media server
    • Pull History Stream URL

      • rtmp://{your IoTHub server IP}:1936/{Channel ID}/{Device IMEI}.history

      • http://{your IoTHub server IP}:8881/{Channel ID}/{Device IMEI}.history.flv

        E.g.:

      bash
      rtmp://120.78.224.93:1936/3/868120303960873.history
      http://120.78.224.93:8881/3/868120303960873.history.flv

2.6 Video Playback Control(proNo:37378)

During the audio and video playback process, SaaS can issue playback control commands to control the playback process. Please refer to the table below for cmdContent details.

cmdContentDataTypeDescription
channelbyteCamera channel number,corresponding to camera 1-5
playCtrlbytePlayback Control:
0: Start playback
1: Pause playback
2: End playback
3: Fast-forward playback
4: Keyframe fast-rewind playback
5: Drag playback
forwardRewindbyteFast forward or reverse by multiple. When the playback mode is 3 and 4, the content of this field is valid, otherwise it is set to 0.
0: invalid
1: 1x
2: 2x
3: 4x
4: 8x
5: 16x
beginTimeBCD(BinarycodedDecimal)Drag position (YYMMDDHHMMSS). This field is valid when the playback control is 5.
instructionIDInstruction ID uniquely identifies a command, and is used for the correspondence between downlink commands and uplink responses. The value of this field should be the same as the value in the "remote video playback request" command when the command is issued.

E.g.

Request Body

json
{
  "deviceImei": "000506047517027",
  "cmdContent": {
    "channel": 1,
    "playCtrl": 1,
    "forwardRewind": 0,
    "beginTime": "220402113555",
    "instructionID": "123456789"
  },
  "serverFlagId": 0,
  "proNo": 37378,
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "offLineFlag": 1,
  "token": "123"
}

2.7 File FTP Upload(proNo:37382)

This command is used to upload large files to customer's target FTP server. To use this API, you need to request API 37381 first to get the beginTime and endTime. Then request this API to upload video files to the specified target FTP address. Customers can access these files by pointing their FTP server address to the specified address. img

Please refer to the table below for cmdContent details.

cmdContentDataTypeFixed Field
serverAddressstringFTP server address
ftpPortintFTP server port
userNamestringFTP username
passwordstringFTP password
fileUploadPathstringThe address where the file will be uploaded and stored
channelbyteCamera channel number
beginTimeBCD(BinarycodedDecimal)Start time (YYMMDDHHMMSS)
endTimeBCD(BinarycodedDecimal)End Time(YYMMDDHHMMSS)
alarmFlag64BitsWarning sign.
bit0 - bit31 (please refer to standard alarm of Alarm Reference)
bit32 - bit63 (please refer to standard alarm of Alarm Reference)
All 0 indicates that there is no specified alarm
resourceTypebyteAudio and video resource types.
0: Audio and video
1: Audio
2: Video
3: With or without audio
codeTypebyteStream type.
0: Main stream or sub stream
1: Main stream
2: Sub stream
storageTypebyteStorage location.
0: Master storage or backup storage
1: Master storage
2: Backup storage
conditionbyteTask execution conditions(bit).
bit0: WIFI, when WIFI is 1, it means WIFI download is available;
bit1: LAN, when LAN is 1, it means LAN download is available;
bit2: 3G/4G, when 3G/4G is 1, it means 3G/4G download is available
instructionIDInstruction ID uniquely identifies a command, and is used for the correspondence between downlink commands and the uplink responses

E.g. Request Body

json
{
  "deviceImei": "000506047517027",
  "cmdContent": {
    "serverAddress": "120.78.224.93",
    "ftpPort": 1000,
    "userName": "testFTP",
    "password": "HK85RTEZ",
    "fileUploadPath": "/video/",
    "channel": 1,
    "beginTime": "220402113555",
    "endTime": "220402113854",
    "alarmFlag": 0,
    "resourceType": 0,
    "codeType": 0,
    "storageType": 0,
    "condition": 1,
    "instructionID": "123456789"
  },
  "serverFlagId": 0,
  "proNo": 37382,
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "offLineFlag": 1,
  "token": "123"
}

Response Body

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_code": "100",
    "_imei": "869247060001259",
    "_content": "ok",
    "_msg": "Command communication successful response",
    "_serverFlagId": "0"
  }
}

2.8 File FTP Upload Control(proNo:37383)

Through this API, SaaS notifies the device to pause, resume or cancel all files being transferred. Please refer to the table below for cmdContent details.

cmdContentDataTypeDescription
uploadCtrlbyte0: pause
1: continue
2: cancel
instructionIDInstruction ID uniquely identifies a command, and is used for the correspondence between downlink commands and uplink responses. When the command is issued, the value of this field must be the same as the value in the "FTP file upload" command

E.g. Request Body

json
{
  "deviceImei": "000506047517027",
  "cmdContent": {
    "uploadCtrl": 0,
    "instructionID": "123456789"
  },
  "serverFlagId": 0,
  "proNo": 37383,
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "offLineFlag": 1,
  "token": "123"
}

2.9 Setting Terminal Parameter(proNo:33027)

SaaS sets the device parameters by sending a setting terminal parameters request, and the device replies with a response body. Devices under different network standards should support some unique parameters of their respective networks. Please refer to the table below for cmdContent details.

Table 2.3.9.1

cmdContentDataTypeDescription
1stringInterval for sending heartbeat messages, in seconds (s)
19stringMain server address, IP or domain name
23stringBackup server address, IP or domain name
24stringServer TCP port
25stringServer UDP port
32stringPosition reporting strategy.
0: Timing reporting 
1: Distance reporting 
2: Timing and distance reporting
33stringLocation reporting scheme.
0: according to ACC status.
1: Determine the login status based on the login status and ACC status.
Check the login status first. If device login, then check the ACC status
34stringThe interval between the driver not logging in and reporting, in seconds (s).
39stringTime interval for reporting sleep, in seconds (s).
40stringEmergency alarm reporting interval, in seconds (s).
41stringDefault time report interval, in seconds (s).
44stringDefault distance reporting interval, in meters (m).
45stringThe distance interval between the driver not logging in and reporting, in meters (m).
47stringEmergency alarm reporting distance interval, in meters (m).
48stringInflection point supplementary transmission Angle. Range: (<180) degree
49stringRadius of electronic fence (illegal displacement threshold), in meters(m)
85stringMaximum speed in kilometres per hour (km/h)
86stringDuration of overspeed, in seconds (s)
87stringContinuous driving time threshold, in seconds (s)
88stringCumulative driving time threshold of the day, in seconds (s)
89stringMinimum rest time, in seconds (s)
90stringMaximum parking time, in seconds (s)
91stringOverspeed warning difference. 1/10Km/h
92stringFatigue driving warning difference, in seconds (s)
93stringCollision alarm parameter setting:
b7-b0: Collision time, unit: 4ms;
b15-b8: Collision acceleration, unit: 0.1 g(g represents gravitational acceleration).
Setting range: 0~79, default: 10.
94stringRollover alarm parameter setting: Rollover Angle, unit: 1 degree, default: 30 degree degrees.
132stringThe license plate color is 5.4.12 of JT/T 415-2006

Table 2.3.9.2: Set the audio and video parameters of the terminal

cmdContentDataTypeDescription
117stringFor audio and video parameter setting, 12 parameter values must be provided at a time. See Table 2.3.9.2.1 for parameter details. Each parameter is separated by comma ",".
119stringFor single video channel parameter setting, 13 multiples of parameter values must be provided at a time. See Table 2.3.9.2.3 for details. Each parameter is separated by comma ",".

Table 2.3.9.2.1: Definition and description of audio and video parameters

Parameters NODescription
1Real-time stream encoding mode.
0: CBR (Constant Bit Rate)
1: VBR (Variable Bit Rate)
2: ABR (Average Bit Rate)
2Real-time stream resolution.
0: QCIF
1: CIF
2: WCIF
3: D1
4: WD1
5: 720P
6: 1080P
3Real-time stream keyframe interval. Range: (1-1000) frames
4Real-time stream target frame rate. Range: (1-120) frames/s
5Real-time stream target bit rate. Unit: (kbps)
6Store stream encoding pattern.
0: CBR (Constant Bit Rate)
1: VBR (Variable Bit Rate)
2: ABR (Average Bit Rate)
7Store stream resolution.
0: QCIF
1: CIF
2: WCIF
3: D1
4: WD1
5: 720P
6: 1080P
8Store stream keyframe interval. Range: (1-1000) frames
9Store stream target frame rate. Range: (1-120) frames/s
10Store stream target bit rate. Unit: (kbps)
11OSD subtitle overlay settings.
Bitwise setting: 0 means no overlay, 1 means overlay;
Bit0: Date and time;
Bit1: License plate number
Bit2: Camera channel number
Bit3: Latitude and longitude
Bit4: Driving record speed
Bit5: Satellite positioning speed
Bit6: Continuous driving time
12Whether to enable audio output.
0: DISABLE
1: ENABLE

Request Body

json
{
  "deviceImei": "000506047517027",
  "cmdContent": {
    "117": "0,5,25,30,500,0,5,30,30,500,0,1"
  },
  "serverFlagId": 0,
  "proNo": 33027,
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "offLineFlag": 1,
  "token": "123"
}

Table 2.3.9.2.3: Set parameters for individual video channels

Parameters NODescription
1Camera channel Number. According to Table 2 in JT/T 1078 -- 2016
2Real-time stream encoding mode
0: CBR(Constant Bit Rate)
1: VBR(Variable Bit Rate)
2: ABR(Average Bit Rate)
3Real-time stream resolution.
0: QCIF
1: CIF
2: WCIF
3: D1
4: WD1
5: 720P
6: 1080P
4Real-time stream keyframe interval.
Range: (1-1000) frames
5Real-time stream target frame rate.
Range: (1-120) frames/s
6Real-time stream target bit rate. Unit: (kbps)
7Store stream encoding pattern.
0: CBR(Constant Bit Rate)
1: VBR(Variable Bit Rate)
2: ABR(Average Bit Rate)
8Store stream resolution. 
0: QCIF
1: CIF
2: WCIF
3: D1
4: WD1
5: 720P
6: 1080P
9Store stream keyframe interval. Range: (1-1000) frames
10Store stream target frame rate. Range: (1-120) frames/s
11Store stream target bit rate. Unit: (kbps)
12OSD subtitle overlay Settings. Bitwise setting:
0 means no overlay 
1 means overlay;
Bit0: Date and time
Bit1: License plate number
Bit2: Camera channel number
Bit3: Latitude and longitude
Bit4: Driving record speed
Bit5: Satellite positioning speed
Bit6: Continuous driving time

Request Body

json
{
  "deviceImei": "000506047517027",
  "cmdContent": {
    "119": "1,0,5,25,30,500,0,5,25,30,500,0"
  },
  "serverFlagId": 0,
  "proNo": 33027,
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "offLineFlag": 1,
  "token": "123"
}

E.g.: Set the heartbeat sending interval to 3 seconds and the IP address of the primary server to 127.0.0.1

Request Body

json
{
  "deviceImei": "000506047517027",
  "cmdContent": {
    "1": "3",
    "19": "127.0.0.1"
  },
  "serverFlagId": 0,
  "proNo": 33027,
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "offLineFlag": 1,
  "token": "123"
}

Response Body

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_code": "100",
    "_imei": "000506047517027",
    "_content": "ok",
    "_msg": "Command communication successful response",
    "_serverFlagId": "11000"
  }
}

2.10 Query Terminal Parameter(proNo:33028)

SaaS queries the setting of a device by sending a query terminal parameters request, and the device replies with a querying terminal parameters response. Please refer to above Table 2.3.9.1 for details of cmdContent. It is empty in this command request, see details below.

Request Body

json
{
  "deviceImei": "869247060001390",
  "cmdContent": "",
  "serverFlagId": "11000",
  "proNo": "33028",
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "offLineFlag": " 1",
  "token": "123"
}

Response body

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_proNo": "260",
    "_code": "100",
    "_imei": "869247060001390",
    "_content": "{\"44\":\"2000\",\"88\":\"28800\",\"23\":\"usiothub.tracksolidpro.com\",\"45\":\"2000\",\"89\":\"1200\",\"24\":\"31502\",\"46\":\"2000\",\"25\":\"4000\",\"47\":\"2000\",\"48\":\"90\",\"49\":\"20\",\"132\":1,\"90\":\"600\",\"91\":\"5.0\",\"92\":\"1800\",\"93\":\"2610\",\"32\":\"0\",\"33\":\"0\",\"34\":\"30\",\"39\":\"30\",\"19\":\"120.78.224.93\",\"1\":\"3\",\"3\":\"3\",\"4\":\"0\",\"totalNum\":\"84\",\"40\":\"30\",\"41\":\"10\",\"85\":\"110\",\"86\":\"30\",\"87\":\"14400\"}",
    "_msg": "Command communication successful response",
    "_serverFlagId": "11000"
  }
}

2.11 Query Specified Terminal Parameter(proNo:33030)

This command is used to query the setting of a specified device. For querying the specified terminal parameters, please refer to above Table 2.3.9.1, the cmdContent of the request body only contains code.

E.g.

44 represents the default distance reporting interval, 45 represents the distance interval between the driver not logging in and reporting,

if set cmdContent with these two numbers in the request body, the device will return the corresponding distance interval, like {"44":"2000","45":"2000","totalNum":"2"} , in the corresponding _content in the response body.

Request Body

json
{
  "deviceImei": "869247060001390",
  "cmdContent": "{\"44\":\"\",\"45\":\"\"}",
  "serverFlagId": "11000",
  "proNo": "33030",
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "offLineFlag": " 1",
  "token": "123"
}

Response Body

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_proNo": "260",
    "_code": "100",
    "_imei": "869247060001390",
    "_content": "{\"44\":\"2000\",\"45\":\"2000\",\"totalNum\":\"2\"}",
    "_msg": "Command communication successful response",
    "_serverFlagId": "11000"
  }
}

2.12 Camera Shoot Immediately(proNo:34817)

SaaS sends the camera shooting immediately command to the device, which requires the device to reply with the terminal general response message. If real-time upload is specified, the device will upload the image/video to customers' IoTHub server folder(default:/iothub/jimi-upload-process/uploadFile) after shooting; otherwise it will store the image/video, customers can get it by requesting the multimedia data upload API (pro.34819). Please refer to the table below for cmdContent details.

cmdContentDataTypeDescription
channelbyteCamera channel number, corresponding to camera 1-5
photoCmdintShooting command.
0 means stop shooting
0xFFFF indicates video recording
Others indicate the number of photos taken
timeIntervalintPhoto interval/recording time. Unit: second, 0 means taking pictures at the minimum interval or recording all the time
saveFlagbyteSave or upload in real time.
1: save
0: upload in real-time
resolutionbyteResolution of a photograph.
0x01: 320 * 240
0x02: 640 * 480
0x03: 800 * 600
0x04: 1024 * 768
0x05: 176 * 144[Qcif]
0x06: 352 * 288[Cif]
0x07: 704 * 288[HALF D1]
0x08: 704 * 576[D1]
qualitybyteImage/video quality. Range: 1-10
1 means minimum mass loss
10 means maximum compression ratio
lightbyteBrightness of a photograph. Range: 0~255
contrastbyteContrast of a photograph. Range: 0~127
saturabilitybyteSaturation of a photograph. Range: 0~127
chromabyteChroma of a photograph. range: 0~255

E.g. Request Body

json
{
    "imei": "869247060001259",
    "cmdContent": {
        "channel":1,
        "photoCmd":1,
        "timeInterval":3,
        "saveFlag":1,
        "resolution":1,
        "quality":10,
        "light":200,
        "contrast":60,
        "saturability":60,
        "chroma":60
    },
    "serverFlagId": "0",
    "proNo": "34817",
    "platform": "web",
    "requestId": "6",
    "cmdType": "normallns",
    "token": "123"
}
json
{
    "imei": "869247060001259",
    "cmdContent": {
        "channel":1,
        "photoCmd":65535,
        "timeInterval":3,
        "saveFlag":0,
        "resolution":2,
        "quality":10,
        "light":200,
        "contrast":60,
        "saturability":60,
        "chroma":60
    },
    "serverFlagId": "0",
    "proNo": "34817",
    "platform": "web",
    "requestId": "6",
    "cmdType": "normallns",
    "token": "123"
}

Response Body

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_code": "100",
    "_imei": "869247060001259",
    "_content": "ok",
    "_msg": "Command communication successful response",
    "_serverFlagId": "0"
  }
}

2.13 Multimedia Retrieval(proNo:34818)

SaaS acquires the status of the terminal storing multimedia data by sending this command. The terminal is required to reply with the stored multimedia data retrieval response message. Please refer to the table below for details.

cmdContentDataTypeDescription
mediaTypebyteMultimedia file type.
0: Image
1: Audio
2: Video
channelbyteCamera channel number, corresponding to camera 1-5, 0 represents all channels that retrieve the media type
eventCodebyteEvent encoding.
0: The platform issued commands
1: Timing Action
2: Robbery Alarm Triggered
3: Side-rolling crash alarm triggered; Other reservations
beginTimeBCD(BinarycodedDecimal)Start time. Format: YYMMDDHHMMSS.
endTimeBCD(BinarycodedDecimal)End time. Format: YYMMDDHHMMSS.

E.g.

Request Body

json
{
    "imei": "869247060001259",
    "cmdContent": {
        "mediaType":0,
        "channel":1,
        "eventCode":0,
        "beginTime":"220808140000",
        "endTime":"220808233000"
    },
    "serverFlagId": "0",
    "proNo": "34818",
    "platform": "web",
    "requestId": "6",
    "cmdType": "normallns",
    "token": "123"
}

Response Body

json
{
    "code":0,
    "msg":"success",
    "data":
    {
    "_proNo":"2050",
    "_code":"100",
    "_imei":"869247060001259",
    "_content":{
          "mediaItemsNum": 3,
          "mediaItemsList": [{
            "eventCode": 0,
            "latitude": 22.576555,
            "channel": 1,
            "id": 835772644,
            "type": 0,
            "longitude": 113.943044
          }, {
            "eventCode": 0,
            "latitude": 22.57646,
            "channel": 1,
            "id": 835774005,
            "type": 0,
            "longitude": 113.943286
          }, {
            "eventCode": 0,
            "latitude": 22.576548,
            "channel": 1,
            "id": 835774145,
            "type": 0,
            "longitude": 113.942841
          }]
        },
    "_msg":"Command communication successful response",
    "_serverFlagId":"0"
    }
}

Description of "\_content" in Response Body

_content in Response Body

ParameterDataTypeRequiredDescription
mediaItemsNumintYThe number of items in the mediaItemsList, 0 means no data
mediaItemsListstringYMedia items list

Description of mediaItemsList

ParameterDataTypeRequiredDescription
mediaIdintY
DataTypeintYMedia type
0: Image
1: Audio
2: Video
channelintYChannel number
eventCodeintY
longitudedoubleYLongitude
latitudedoubleYLatitude

2.14 Multimedia Upload(ProNo:34819)

This command is used to upload the device stored multimedia data to customers IoTHub server folder(default:/iothub/jimi-upload-process/uploadFile). Customers can get data from the folder through the ftp service. Please refer to the table below for details.

cmdContentDataTypeDescription
mediaTypeintMultimedia file type.
0: Image
1: Audio
2: Video
channelintCamera channel number, corresponding to camera 1-5.
0 represents all channels that retrieve the media type
eventCodeintEvent encoding.
0: The platform issued commands 
1: Timing action 
2: Robbery alarm triggered
3: Side-rolling crash alarm triggered
Other reservations
beginTimestringStart time. Format: YYMMDDHHMMSS
endTimestringEnd time. Format: YYMMDDHHMMSS
delFlagintDelete flag.
0: Keep
1: Delete

E.g.

Request Body

json
{
    "imei": "869247060001259",
    "cmdContent": {
        "mediaType":0,
        "channel":1,
        "eventCode":0,
        "beginTime":"220806140000",
        "endTime":"220806233000",
        "delFlag":0
    },
    "serverFlagId": "0",
    "proNo": "34819",
    "platform": "web",
    "requestId": "6",
    "cmdType": "normallns",
    "token": "123"
}

Response Body

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_code": "100",
    "_imei": "869247060001259",
    "_content": "ok",
    "_msg": "Command communication successful response",
    "_serverFlagId": "0"
  }
}
cmdContentDataTypeDescription
DataTypebyteTransmission Message Type.
0x00: GNSS module detailed positioning data
0x0B: Road transport permit IC card information
0x41: Serial port 1 pass-through
0x42:Serial port 2 Transparent transmission
0xF1-0xFF: User-defined pass-through messages
0xF0 is used for device custom commands, the message type sent through this channel cannot be 0xF0
rawContentTransmission Message Content. Message content must be base64 encoded

E.g. Request Body

json
{
    "imei": "869247060001259",
    "cmdContent": "{
        "type": 241,
        "rawContent":"MTIzNDUu5L2g5aW9",
    }",
    "serverFlagId": "0",
    "proNo": "35072",
    "platform": "web",
    "requestId": "6",
    "cmdType": "normallns",
    "token": "123"
}

Response Body

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_code": "100",
    "_imei": "869247060001259",
    "_content": "ok",
    "_msg": "Command communication successful response",
    "_serverFlagId": "0"
  }
}

2.16 Alarm Manual Acknowledgment(proNo:33283)

This command allows customers to acknowledge alarm message and alarm type manually. Please refer to the table below for details.

cmdContentDataTypeDescription
alarmSerialNointAlarm message serial number that needs to be confirmed manually, 0 means all alarms of this alarm type
alarmTypeintManual acknowledgment of alarm types. Please refer to the table below for details

Manually acknowledge alarm type

BitDescription
01: Confirm critical alarm
1-2Reserved
31: Confirm danger alarm
4-19Reserved
201: Confirm area alarm
211: Confirm route alarm
221: Confirm insufficient travel time/process alarm
23-26Reserved
271: Confirm illegal ignition alarm
281: Confirm illegal displacement alarm
29-31Reserved

E.g.

Request Body

json
{
  "deviceImei": "869247060001259",
  "cmdContent": "{\"alarmSerialNo\":0,\"alarmType\":2}",
  "serverFlagId": "5",
  "proNo": "33283",
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "token": "123",
  "language": "en",
  "sync": "true",
  "offlineFlag": "false",
  "callbackUrl": "http://120.78.224.93:10088"
}

Response Body

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "_code": "100",
    "_imei": "869247060001259",
    "_content": "ok",
    "_msg": "Command communication successful response",
    "_serverFlagId": "0"
  }
}

2.17 Terminal Control(proNo:33029)

This API is used to control the terminal for upgrading and monitoring. Details about the cmdContent, please refer to the table below.

cmdContentDataTypeDescription
cmdintTerminal control command.
1: Wireless upgrade
2: Control terminal connection to specified server
4: Terminal reset
5: Terminal restore factory settings
paramsstringFields are separated by a half corner ';', and each STRING field is first processed according to GBK encoding before forming a message

1: URL address; Dialing point name; Dialpoint username; Dialing password; Address; TCP port number; UDP port number; Manufacturer ID; Hardware version; Firmware version; The time limit for connecting to the specified server
Note: each parameter field must have a value, if the parameter field does not have a value, fill in the blank string)

2: Connection control; Regulatory platform authentication code; Dial point name; Dialing username; Dialing password; Address; TCP port number; Udp port number; The time limit for connecting to the specified server (except for the connection control value, if a parameter has no value, fill in a blank character. If the connection control is 1, it means switching back to the default server without any subsequent parameters, which is directly returned here)

4: None

5: None

E.g.

Request Body

json
{
  "deviceImei": "868120303960873",
  "cmdContent": "{
    "cmd":1,
    "params": "www.123.com;test;usr;12345;172.26.10.48;12222;12222;1234567890;1.1.1;2.2.2;2"
    }",
  "serverFlagId": "5",
  "proNo": "33029",
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "token": "123"
}

Response Body

json
{
    "code": 0,
    "msg": "success",
    "data": {
        "_imei": "868120303960873",
        "_content": "ok",
        "_code": "100",
        "_msg": "Command communication successful response",
        "_serverFlagId": "1"
    }
}

2.18 Query Terminal Property(proNo:33031)

This API is used to query the specified terminal properties. cmdContent is empty in the request body. Fields of the response body, please refer to the table below.

Fields of the response body

ParamDataTypeDescription
_codeStringInstruction response code
_imeiStringIMEI
_contentStringInstruction content
_msgStringInstruction response message
_serverFlagIdStringServer Flag ID

For details of _content, please refer to the table below.

FieldDataTypeDescription
deviceTypeStringTerminal type
companyIdStringManufacturer ID
deviceModelsStringTerminal model
deviceIdStringTerminal ID
iccidStringICCID number
hwVerStringHardware version number length
firmwareVerStringFirmware Version
gnssAttrStringGNSS Module Properties
communAttrStringCommunication Module Properties

Request Body

json
{
  "deviceImei": "868120303960873",
  "cmdContent": "{}",
  "serverFlagId": "0",
  "proNo": "33031",
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "token": "123"
}

Response Body

json
{
    "code": 0,
    "msg": "success",
    "data": {
        "_code": "100",
        "_imei": "868120303960873",
        "_content": "{"deviceType":127,"companyId":"[0, 0, 0, 0, 0]","deviceModels":"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","deviceId":"[0, 0, 0, 0, 0, 0, 0]","iccid":"[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]","hwVer":"3.1","firmwareVer":"1.6.06","gnssAttr":3,"communAttr":255}",
        "_msg": "Command communication successful response",
        "_serverFlagId": "0"
    }
}

2.19 Text Distribution(proNo:33536)

This API is used to send text message to devices, then the device will play the text. Details of the cmdContent, please refer to the table below.

cmdContentDataTypeDescription
flagintPlease refer to the table below for flag bit definition. Convert it to decimal when issuing commands.
textstringMaximum length is 1024 bytes, encoded by GBK.

Flag bit definition

bitDescription
0Emergency
1Reserved
2Terminal display
3Terminal TTS broadcast reading
4Advertising screen display
50: Central Navigation Information
1: CAN fault code information
6-7Reserved

Request Body

json
 {
  "deviceImei": "868120303960873",
  "cmdContent": "{ "flag": 0, "text":"Hello JIMI!"}",
  "serverFlagId": "0",
  "proNo": "33536",
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "token": "123"
}

Response Body

json
{
    "code": 0,
    "msg": "success",
    "data": {
        "_imei": "868120303960873",
        "_content": "ok",
        "_code": "100",
        "_msg": "Command communication successful response",
        "_serverFlagId": "0"
    }
}

2.20 Alarm Attachment Upload(proNo:37384)

After receiving the alarm/event information with attachments, the SaaS platform can issue this attachment upload command to the device and upload the attachment to the server folder(Default:/iothub/jimi-upload-process/uploadFile/). Meanwhile, the attachment will be deleted from the device, which means the file can only be uploaded once.

cmdContentDataTypeDescription
serverLenbytelength
serverAddressstringserver IP address
tcpPortstringTCP transmission server port
udpPortstringUDP transmission server port
alarmLabelbyteAlarm ID
alarmNumberbyte32 byte unique ID. Definition: an 7-byte terminal ID (represented by the last 14 ASCII digits of the complete IMEI), followed by an 9 bytes of alarm time field + sequence number + number of attachments + reserved(00). Please refer to the example below for details.

Combination and transformation of alarmNumber

IMEI:
 8 68120303960873  -> 3638313230333033393630383733
 +
 alarmTime:
 230821154011 -> 323330383231313534303131
 +
 attachment number:
 0005 -> 30303035
 +
 reserved 00 -> 3030

 => 3638313230333033393630383733 + 323330383231313534303131 + 30303035 +
  3030
 => 3638313230333033393630383733323330383231313534303131303030353030

Request Body

json
 {
  "deviceImei": "868120303960873",
  "cmdContent": "{
        "serverLen":13,
        "serverAddress":"172.26.10.126",
        "tcpPort":21188,
        "udpPort":0,
        "alarmLabel":"33393630383733230913144118000500",
        "alarmNumber":"3638313230333033393630383733323330383231313534303131303030353030"
        }",
  "serverFlagId": "0",
  "proNo": "37384",
  "platform": "web",
  "requestId": "6",
  "cmdType": "normallns",
  "token": "123"
}

Response Body

json
{
    "code": 0,
    "msg": "success",
    "data": {
        "_imei": "868120303960873",
        "_content": "ok",
        "_code": "100",
        "_msg": "Command communication successful response",
        "_serverFlagId": "0"
    }
}

2.21 Query Offline Command

Request

URL{InsAddress} /api/device/queryOfflineInstruct
Http MethodPOST
Body Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
deviceImeistringYThe IMEI of the device that receives the command
cmdTypestringNThe command type, such as normallns-general

Response

headervalue
Content-Typeapplication/json;charset=UTF-8

Response Content

The response body is in JSON format.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success, a non-zero code indicates there is an error. E.g. :"20002" indicates that the offline command does not exist
msgstringYDescription of the result code
dataJSONNOffline command content

2.22 Cancel Offline Command

Request

URL{InsAddress} /api/device/deleteOfflineInstruct
Http MethodPOST
Body Content-Typeapplication/x-www-form-urlencoded

Request Parameters

ParameterDataTypeRequiredDescription
deviceImeistringYThe IMEI of the device that receives the command
cmdTypestringNThe command type, such as normallns-general

Response

headervalue
Content-Typeapplication/json;charset=UTF-8

Response Content

The response body is in JSON format.

ParameterDataTypeRequiredDescription
codeintYResult code, where 0 indicates success, a non-zero code indicates there is an error. E.g.:"20002" indicates that the offline command does not exist
msgstringYDescription of the result code

3 Query APIs

API Description

APIAPI TypeDescriptionJIMI Protocol DeviceJT/T Protocol Device
/api/v2/alarm/getAlarmRequestQuery alarm data of JT/T devices[√]
/api/v2/device/deviceTrackerHBRequestQuery the latest Heartbeat of JT/T devices[√]
/api/v2/tracker/trackByTimeRequestQuery tracks of JT/T devices[√]
/api/v2/tracker/trackOtherPosByTimeRequestTrack JT/T devices other positions by time[√]
/api/alarm/getAlarmRequestQuery alarm data of JIMI devices[√]
/api/device/deviceTrackerHBRequestQuery the latest Heartbeat of JIMI devices[√]
/api/tracker/trackByTimeRequestTrack JIMI devices other positions by time[√]
/api/tem/getTemDetailRequestQuery temperature and humidity of JIMI devices[√]
/download/RequestFile Storage API[√]

3.1 Query API (V2, for JT/T devices)

3.1.1 Alarms

Request Parameters

URL{ApiAddress}/api/v2/alarm/getAlarm
Http MethodGET
HttpTransfer parameterURLTransfer parameter
ParameterTypeRequiredDescription
deviceImeiStringYThe IMEI of the device that receives the command
alertTypeintNAlert type
startTimeStringYThe start time, whose format is 2020-10-10 00:00:00 (UTC)
endTimeStringYThe end time, whose format is 2020-10-10 23:59:59 (UTC)

Example

bash
http://113.108.62.202:9080/api/v2/alarm/getAlarm?deviceImei=868120240367331&alertType=22&startTime=2020-11-11 00:00:00&endTime=2020-11-12 00:00:00

Response

json
{
  "code": 0,
  "msg": "The query is successful",
  "data": [
    {
      "alarmMsg": "{\"deviceImei\":\"000105042285948\",\"msg\":{\"alarmId\":0,\"alarmLabel\":\"37,35,31,31,38,39,37,22,01,20,13,45,09,00,05,00\",\"alarmLevel\":2,\"alarmStatus\":0,\"alarmTime\":\"2022-03-16 10:11:09\",\"alarmType\":2,\"alertType\":\"264\",\"altitude\":64,\"carSpeed\":90,\"carStatus\":65535,\"deviceImei\":\"000105042285948\",\"frontCarSpeed\":0,\"frontDistance\":0,\"gateTime\":\"2022-03-17 06:52:08\",\"lat\":22.576553,\"lng\":113.943069,\"offtrackType\":0,\"roadData\":0,\"roadType\":0},\"msgClass\":1,\"postTime\":\"2022-03-16 10:11:09\",\"type\":\"DEVICE\"}"
    }
  ]
}

3.1.2 Latest Heartbeat

Request Parameters

URL{ApiAddress}/api/v2/device/deviceTrackerHB
Http MethodGET
HttpTransfer ParameterURLTransfer Parameter
ParameterTypeRequiredDescription
deviceImeisStringYThe IMEI(s) of the device(s) that receives the command(s), which are separated by commas (,) if multiple devices are involved

Example

bash
http://113.108.62.202:9080/api/v2/device/deviceTrackerHB?deviceImeis=000105042285948

Response

Example

json
{
  "code": 0,
  "msg": "The query is successful",
  "data": [
    {
      "gateTime": "2022-03-17T06:35:14.943+00:00",
      "deviceImei": "000105042285948"
    }
  ]
}

3.1.3 Tracks

Request Parameters

URL{ApiAddress}/api/v2/tracker/trackByTime
Http MethodPOST
Http Transfer ParameterBody, Content-Type: application/x-www-form-urlencoded
ParameterTypeRequiredDescription
deviceImeiStringYThe IMEI of the device that receives the command
startTimeStringYThe start time, whose format is 2020-10-10 00:00:00 (UTC)
endTimeStringYThe end time, whose format is 2020-10-10 23:59:59 (UTC)

Example

bash
POST http://120.78.224.11:9080/api/v2/tracker/trackByTimeRequest Body deviceImei: "000105042285948" startTime: "2022-03-17 12:00:00" endTime: "2022-03-17 23:00:00"

Response

Example

json
{
  "code": 0,
  "msg": "SUCCESS",
  "data": [
    {
      "deviceImei": "000105042285948",
      "lat": 21.943045,
      "lng": 62.314453,
      "gpsTime": "2022-03-17T06:41:38.000+00:00",
      "direction": 0,
      "gpsSpeed": 0.0,
      "postType": "1",
      "postMethod": 0,
      "distance": 0,
      "altitude": 0,
      "acc": 1,
      "satelliteNum": 2,
      "gpsMode": 0,
      "gateTime": "2022-03-17T06:42:58.616+00:00",
      "status": 262159
    }
  ]
}

3.1.4 OtherPos

Request Parameters

URL{ApiAddress}/api/v2/tracker/trackOtherPosByTime
Http MethodPOST
Http Transfer ParameterBody, Content-Type: application/x-www-form-urlencoded
ParameterTypeRequiredDescription
deviceImeiStringYThe IMEI of the device that receives the command
startTimeStringYThe start time, whose format is 2020-10-10 00:00:00 (UTC)
endTimeStringYThe end time, whose format is 2020-10-10 23:59:59 (UTC)

Example

bash
POST http://120.78.224.11:9080/api/v2/tracker/trackOtherPosByTime Body deviceImei: "000105042285948" startTime: "2022-05-12 00:00:00" endTime: "2022-05-14 23:00:00"

Response

Example

json
{
  "code": 0,
  "msg": "SUCCESS",
  "data": [
    {
      "otherPosMsg": "{\"deviceImei\":\"000105042285948\",\"gateTime\":\"2022-05-19 08:50:41\",\"gpsTime\":\"2022-05-13 08:15:06\",\"lbsJson\":\"{\\\"mnc\\\":0,\\\"cellList\\\":[\\\"10365,48913921,74\\\",\\\"10365,48913922,45\\\"],\\\"mcc\\\":460}\",\"postType\":\"LBS\"}"
    },
    {
      "otherPosMsg": "{\"deviceImei\":\"000105042285948\",\"gateTime\":\"2022-05-19 08:54:30\",\"gpsTime\":\"2022-05-13 08:15:06\",\"lbsJson\":\"{\\\"mnc\\\":0,\\\"cellList\\\":[\\\"10365,48913921,74\\\",\\\"10365,48913922,45\\\"],\\\"mcc\\\":460}\",\"postType\":\"LBS\"}"
    }
  ]
}

3.2 General Query API

3.2.1 Alarms

Request Parameters

URL{ApiAddress}/api/alarm/getAlarm
Http MethodGET
HttpTransfer parameterURLTransfer parameter
ParameterTypeRequiredDescription
deviceImeiStringYThe IMEI of the device that receives the command
alertTypeintNAlert type
startTimeStringYThe start time, whose format is 2020-10-10 00:00:00 (UTC)
endTimeStringYThe end time, whose format is 2020-10-10 23:59:59 (UTC)

Example

bash
http://113.108.62.202:9080/api/alarm/getAlarm?deviceImei=868120240367331&alertType=22&startTime=2020-11-11 00:00:00&endTime=2020-11-12 00:00:00

Response

json
{
  "code": 0,
  "msg": "The query is successful",
  "data": [
    {
      "alarmMsg": "{\"deviceImei\":\"000105042285948\",\"msg\":{\"alarmId\":0,\"alarmLabel\":\"37,35,31,31,38,39,37,22,01,20,13,45,09,00,05,00\",\"alarmLevel\":2,\"alarmStatus\":0,\"alarmTime\":\"2022-03-16 10:11:09\",\"alarmType\":2,\"alertType\":\"264\",\"altitude\":64,\"carSpeed\":90,\"carStatus\":65535,\"deviceImei\":\"000105042285948\",\"frontCarSpeed\":0,\"frontDistance\":0,\"gateTime\":\"2022-03-17 06:52:08\",\"lat\":22.576553,\"lng\":113.943069,\"offtrackType\":0,\"roadData\":0,\"roadType\":0},\"msgClass\":1,\"postTime\":\"2022-03-16 10:11:09\",\"type\":\"DEVICE\"}"
    }
  ]
}

3.2.2 Latest Heartbeat

Request Parameters

URL{ApiAddress}/api/device/deviceTrackerHB
Http MethodGET
HttpTransfer ParameterURLTransfer Parameter
ParameterTypeRequiredDescription
deviceImeisStringYThe IMEI(s) of the device(s) that receives the command(s), which are separated by commas (,) if multiple devices are involved

Example

bash
http://113.108.62.202:9080/api/device/deviceTrackerHB?deviceImeis=202009080911112

Response

Example

json
{
  "code": 0,
  "msg": "The query is successful",
  "data": [
    {
      "gsmSign": 3,
      "gateTime": "2022-03-17T10:56:18.221+00:00",
      "deviceImei": "202106290000010",
      "powerLevel": 2,
      "acc": 1
    }
  ]
}

3.2.3 Tracks

Request Parameters

URL{ApiAddress}/api/tracker/trackByTime
Http MethodPOST
Http Transfer ParameterBody, Content-Type: application/x-www-form-urlencoded
ParameterTypeRequiredDescription
deviceImeiStringYThe IMEI of the device that receives the command
startTimeStringYThe start time, whose format is 2020-10-10 00:00:00 (UTC)
endTimeStringYThe end time, whose format is 2020-10-10 23:59:59 (UTC)

Example

bash
POST http://120.78.224.11:9080/api/tracker/trackByTimeRequest Body deviceImei: "202106290000010"startTime: "2022-03-17 12:00:00"endTime: "2022-03-17 23:00:00"

Response

Example

json
{
  "code": 0,
  "msg": "SUCCESS",
  "data": [
    {
      "deviceImei": "202106290000010",
      "gpsTime": "2022-03-17T10:56:12.695+00:00",
      "gateTime": "2022-03-17T10:56:12.695+00:00",
      "satelliteNum": 11,
      "lng": 113.864481,
      "lat": 22.589609
      "gpsMode": 0,
      "gpsSpeed": -1.0,
      "direction": 332,
      "acc": "1",
      "distance": "-1",
      "postMethod": 0,
      "postType": "1",
      "status": 0
    }
  ]
}

3.2.4 Tem

Request Parameters

URL{ApiAddress}/api/tem/getTemDetail
Http MethodGET
HttpTransfer parameterURLTransfer parameter
ParameterTypeRequiredDescription
deviceImeiStringYThe IMEI of the device that receives the command
startTimeStringYThe start time, whose format is 2020-10-10 00:00:00 (UTC)
endTimeStringYThe end time, whose format is 2020-10-10 23:59:59 (UTC)

Example

bash
http://113.108.62.202:9080/api/tem/getTemDetail?deviceImei=861364144249512&startTime=2021-01-20 00:45:09&endTime=2023-01-20 23:45:09

Response

json
{
  "code": 0,
  "msg": "The query is successful",
  "data": [
    {
      "temMsg": "{\"deviceImei\":\"861364144249512\",\"gateTime\":\"2022-04-07 13:40:09\",\"hum\":79.6,\"pathNum\":0,\"tem\":49.5}"
    }
  ]
}

3.3 File Storage API

This API is used to download images and videos from the data storage service(Default:/iothub/dvr-upload/fileUpload). Customers can develop their own storage service and configure it in the 'volumes' of the iothub dvr-upload service. Request

URL{ApiAddress}/download/{Filename}
Http MethodGET | POST

Filename=Name of the alarm file

http://{storage server IP}:{storage server port}/download/{Filename}

http://{storage server IP}:{storage server port}/download/{Foldername}/{Filename}

Example

bash
http://172.26.10.126:23010/download/CMD_862798051215438_00000001_2023_09_21_10_48_03_I_08.mp4

http://172.26.10.126:23010/download/862798051215438/CMD_862798051215438_00000001_2023_09_21_10_48_03_I_08.mp4

Response

The Interface returns the byte stream of the file. Then read the byte stream to generate the file or use a browser to download the file.


Alarm Reference

1 JIMI Device Alarms (msgClass = 0)

alertTypeDescription
4Vehicle entered geofence
5Vehicle left geofence
10Entered GNSS dead zone
11Left GNSS dead zone
13Device got the first fix

1.2 Device Status Alerts

alertTypeDescription
0Device works correctly
2External power was cut off
12Device is powered on
14Voltage of external power is rather low
15Device entered protection mode due to low external power
16SIM card changed
17Device was powered off manually
18Device entered airplane mode due to low external power
19Device was removed
21Device has shut down due to low external power
24Device cover was opened
25Voltage of internal battery is rather low
40Device is about to enter sleep mode
50Device was plugged out
90Voltage of external power is rather low
136External power was cut off
141Device changed to land transport mode
149Device changed to waterborne transport mode
150Device changed to stationery mode
191Device was plugged out
224Device was plugged in

1.3 Vehicle Status Alerts

alertTypeDescription
138Fuel and power reconnected
139Fuel and power disconnected
168Engine failed
169Vehicle battery was undervoltage
203Vehicle has parked for too long
227Water temperature is too high
254Ignition turned on
255Ignition turned off

1.4 Personal Safety Alerts

alertTypeDescription
1An emergency alert was triggered
35User has fallen down
39Device was opened unexpectedly
55Device was hit violently
58That the device was opened unexpectedly is known
82The body temperature of the user is abnormal
101That the device was hit violently is known

1.5 Vehicle Safety Alerts

alertTypeDescription
3Vehicle vibrated unexpectedly
9Vehicle has been moved unexpectedly
44Vehicle collided
128Rear mirror vibration
131Vehicle collided
147Vehicle collided

1.6 Peripheral-Triggered Alerts

alertTypeDescription
20Abnormal door status
22The ambient sound was too loud
28Door was opened
29Door was closed
80Door was closed
81Door was opened
83Fuel may be stolen
91Temperature was too high
92Temperature was too low
100Temperature recovered to normal
113Tank needs refill
115Abnormal fuel level
126Humidity was too high
142Abnormal ambient environment

1.7 Driving Behavior Alerts

alertTypeDescription
6Vehicle has been speeding
41Vehicle has been accelerated harshly
42Vehicle has turned left abruptly
43Vehicle has turned right abruptly
48Vehicle has been braked hard
71Fatigue driving was detected
135Vehicle has been speeding
144Vehicle has been accelerated harshly
145Vehicle has been braked hard
146Vehicle has turned abruptly
202Vehicle speed warning

1.8 Algorithm-Generated Alerts

alertTypeDescription
45Vehicle tipped over onto its side
76Vehicle has turned abruptly
77Vehicle has changed lane abruptly
78Vehicle stability exception
79Vehicle attitude exception
131Seatbelt fastened alarm
132Seatbelt unfastened alarm
140Driver has been blinking frequently
143Driver attention has been distracted
148No driver face detected
151Driver has been using the phone
154Driver has been smoking
160Driver has been yawning
204Forward Collision Warning(ADAS-FCW)
205Lane Departure Warning(ADAS-LDW)
206Headway Monitor Warning(ADAS-HMW)
207Pedestrian collision warning

1.9 Other Alerts

alertTypeDescription
23Pseudo base station is detected.
26Device has exited transport mode
27Suspected of the subject leaving the designated herd
30Safety airbag deployed
32Device entered deep sleep mode
36Charger connected
37Light detected
38Device has been moving away from the beacon
49Subject has already left designated herd
51Device is locked
52Device is unlocked
53Device has been unlocked unexpectedly
54Failed to unlock the device
56Device is out of the preset range
57Device is out of the preset range
59Device has been stationary for too long
60Vehicle may have been stolen
61Vehicle has been started unexpectedly
62Key press event triggered
63Device has exited defense mode
64Device has entered defense mode
65Device is muted
66Vehicle finding alert (custom)
67Detected truck has been opened
68RSV1 (custom)
69RSV2 (custom)
70RSV3 (custom)
72Detected pet has been lost
73Internal battery is fully charged
74Internal battery error
75Device tilted unexpectedly
80Door opening alarm
81Door closing alarm
84External GNSS antenna disconnected
85Temperature of internal battery was high
86Charging of internal battery has started
87Charging of internal battery has stopped
88Internal battery is about to be fully charged
89Charging of the internal battery is complete
93RFID sensor error
94Pulse exception
95Vehicle has been speeding inside geofence
96Live wire exception
97Temperature sensor error
98Voltage of external power is too high
99Device is close to Bluetooth beacon
102Voltage value exception
103Device has already signed in
104Device has already signed out
105File is uploaded completely by device
106Vehicle tipped over on its side
112SD card is already mounted
114Device is already installed
116Vehicle speed has resumed to normal range
117Driver fatigue is known
118Temperature sensor connection timeout
119Detected voltage is exceptionally high (ADC1)
120Detected voltage is exceptionally low (ADC1)
121Detected voltage has been rising abnormally (ADC1)
122Detected voltage has been dropping abnormally (ADC1)
123Detected temperature has been rising abnormally
124Detected temperature has been dropping abnormally
129Device mobile data usage exception
130Device is already restarted
132Camera 1 exception
133Camera 2 exception
134No SD card is detected
137No USB camera is detected
152Device has already completed the capture
153Driver info has changed
161Camera lens is blocked
162Face alignment error
163Detected driver has lowered the head
164Memory card space low
165RFID sensor has detected a card swipe
166Driver is already buckled up/Seat belt fasten
167Driver is not buckled up/Seat belt unfasten
170Detected driver has been drinking
171Package had been opened unexpectedly
172Bluetooth MAC addresses found
173No Bluetooth MAC addresses are found
177Fuel level has increased unexpectedly (CLS2 peripheral)
178Fuel level has dropped unexpectedly (CLS2 peripheral)
179Fuel sensor communication error (CLS2 peripheral)
180Fuel sensor communication has resumed (CLS2 peripheral)
181Temperature sensor communication error (1-wire peripheral)
182Vehicle has been towing away unexpectedly
183Vehicle has tipped over on its side
184Time to position fix takes too long
185Vehicle has been idling for too long
186Detected 3D acceleration sensor error
187Detected GNSS module error
188Detected UBI sensor chip error
189Detected UBI Encrypted IC error
190Detected UBI GNSS chip error
197Engine is already turned on
198Engine is already turned off
199Driver has been driving extendedly
200Extended driving of driver is already known
201INPUT1 is activated
225Detected FLASH error (GID)
226Detected CAN module error (GID)
228Vehicle has departed from current lane
229Forward collision warning

2 JT/T Device Alarms (msgClass = 1)

2.1 Standard Alarm

AlertTypeDataTypeStandardAlarmValue Description
256intDecode standardAlarmValue into binary, and then analyze the received alarm information by comparing the meanings of each bit according to the following description.
Bit Content Description
0 1: Emergency alarm, trigger after touching the alarm switch Cleared after receiving response
1 1: Overspeed alarm Maintain the flag until the alarm condition is cleared
2 1: Fatigue driving Maintain the flag until the alarm condition is cleared
3 1: Danger warning Cleared after receiving response
4 1: GNSS module failure Maintain the flag until the alarm condition is cleared
5 1: GNSS antenna not connected or cut off Maintain the flag until the alarm condition is cleared
6 1: GNSS antenna short circuit Maintain the flag until the alarm condition is cleared
7 1: External power low Maintain the flag until the alarm condition is cleared
8 1: External power removed Maintain the flag until the alarm condition is cleared
9 1: Terminal LCD or display failure Maintain the flag until the alarm condition is cleared
10 1: TTS module failure Maintain the flag until the alarm condition is cleared
11 1: Camera failure Maintain the flag until the alarm condition is cleared
12 1: The IC card module of the road transport certificate is faulty Maintain the flag until the alarm condition is cleared
13 1: Overspeed warning Maintain the flag until the alarm condition is cleared
14 1: Fatigue driving warning Maintain the flag until the alarm condition is cleared
15-17 Reserved
18 1: Cumulative driving time-out for the day Maintain the flag until the alarm condition is cleared
19 1: Overtime parking Maintain the flag until the alarm condition is cleared
20 1: In and out of the area Cleared after receiving response
21 1: In and out the route Cleared after receiving response
22 1: Insufficient/too long driving time on the road section Cleared after receiving response
23 1: Route deviation alarm Maintain the flag until the alarm condition is cleared
24 1: Vehicle VSS failure Maintain the flag until the alarm condition is cleared
25 1: The vehicle oil level is abnormal Maintain the flag until the alarm condition is cleared
26 1: Vehicle stolen (With vehicle anti-theft device) Maintain the flag until the alarm condition is cleared
27 1: Vehicle illegal ignition Cleared after receiving response
28 1: Vehicle illegal moving Cleared after receiving response
29 1: Collision warning Maintain the flag until the alarm condition is cleared
30 1: Rollover warning Maintain the flag until the alarm condition is cleared
31 1: Illegal door opening alarm (when the terminal does not set an area, it will not judge illegal door opening) Cleared after receiving response

Example:

json
 datalist: [
    {
        "id": 512,
        "msg": {
            "alertType": "256",
            "standardAlarmValue": 6,
            "deviceImei": "000105042285948",
            "lng": 113.943057,
            "lat": 22.576571,
            "gateTime": "2022-03-08 06: 28: 50"
            },
        "msgClass": 1,
        "postTime": "2022-03-07 22: 30: 00",
        "type": "DEVICE"
    }
]

Parsing process: standardAlarmValue: 6

6 -> 4 bytes in binary (0000 0000 0000 0000 0000 0000 0000 0110)

Contrast the above table: Bitwise analysis results are speeding alarm, fatigue driving

2.2 Video Signal Loss Alarm

AlertTypeDataTypeDescription
257intVideo signal lost alarm. Decode signalDropChannel into binary, and then analyze the received alarm information by comparing the meanings of each bit according to the following description.
Bit Description
0~31 Channel signal lost alarm.
bit0 ~ bit31 respectively represent the 1st ~ 32th dashcam channel. The corresponding bit 1 means the channel signal lost.

Bits are arranged from right to left, 0 bit means the smallest bit.

2.3 Video Signal Block Alarm

AlertTypeDataTypeDescription
258intVideo signal blocked alarm. Decode signalCoverChannel into binary, and then analyze the received alarm information by comparing the meanings of each bit according to the following description.
Bit Description
0~31 Channel convered alarm.
bit0 ~ bit31 respectively represent the 1st ~ 32th dashcam channel. The corresponding bit 1 means the camera channel is covered

Bits are arranged from right to left, 0 bit means the smallest bit.

2.4 Storage Unit Failure Alarm

AlertTypeDataTypeDescription
259shortStorage fault alarm. Decode storageFaultChannel into binary, and then analyze the received alarm information by comparing the meanings of each bit according to the following description. The corresponding bit is 1 means the memory is faulty
Bit Description
0~15 Memory failure alarm status.
bit0 ~ bit11 respectively represent the 1st ~ 12th main memory
bit12 ~ bit15 respectively represent the 1st ~ 4th backup memory

Bits are arranged from right to left, 0 bit means the smallest bit.

Example:

json
datalist: [
    {
        "id": 512,
            "msg": {
                "alertType": "259",
                "deviceImei": "000105042285948",
                "lng": 113.94304,
                "storageFaultChannel": 1,
                "lat": 22.576561,
                "gateTime": "2022-03-08  08: 07: 29"
            },
        "msgClass": 1,
        "postTime": "2022-03-08  08: 07: 29",
        "type": "DEVICE"
    }
]

2.5 ADAS Alarm

AlertTypeDataTypeDescription
264shortADAS alarm field.
Parameter DataType Value Description
alarmId int According to the alarm sequence, it starts to accumulate cyclically from 0, regardless of the alarm type Alarm ID
alarmStatus BYTE 0x00: unavailable
0x01: Start flag
0x02: end flag
This field applies only to alarms or events with start and end flag types
If the alarm type or event type has no start and end flags, this bit is not available, just fill in 0x00.
Alarm ID
alarmType BYTE 0x01: Forward collision alarm
0x02: Lane Departure Alarm
0x03: The vehicle distance is too close to the front vehicle alarm
0x04: Pedestrian collision alarm
0x05: Frequent lane change alarm
0x06: Road sign overrun alarm
0x07: Obstacle alarm
0x08 ~ 0x0F: User defined
0x10: Road sign recognition event
0x11: Active capture event
0x12 ~ 0x1F: User defined
Alarm/Event Type
alarmLevel BYTE 0x01: Level 1 alarm
0x02: Level 2 alarm
Alarm level
frontCarSpeed BYTE The unit is Km/h. The range is 0~250, only valid when the alarm type is 0x01 and 0x02. front vehicle speed
frontDistance BYTE The unit is 100ms, the range is 0~100, only valid when the alarm type is 0x01, 0x02 and 0x04e Front vehicle/pedestrian distance
offtrackType BYTE 0x01: Left deviation
0x02: right deviation
Only valid when the alarm type is 0x02
Deviation Type
roadType BYTE 0x01: Speed limit sign
0x02: height limit sign
0x03: weight limit sign
Only valid for alarm types 0x06 and 0x10
Road sign recognition type
roadData BYTE Recognized data of road signs Road sign recognition data
carSpeed BYTE The unit is Km/h. Range 0 ~ 250 Speed
altitude short Altitude, in meters (m) Altitude
carStatus short Bitwise representation of other vehicle states:
Bit 0 ACC status. 0: OFF, 1: ON
Bit 1 Left steering status. 0: OFF, 1: ON
Bit 2 Right steering status. 0: OFF, 1: ON
Bit 3 Wiper status. 0: OFF, 1: ON
Bit 4 Braking state. 0: Not braking, 1: Braking
Bit 5 Card inserted status. 0: No card, 1: Card in
Bit 6 ~ Bit 9 custom
Bit 10 Positioning status. 0: Not position, 1: Positioned
Bit11 ~ bit15 Custom
Vehicle status
alarmLabel String 16 bytes total:
0 ~ 6: Terminal ID, consisting of uppercase letters and numbers
7: Time, YY-MM-DD-hh-mm-ss (Device Local time)
13: Serial number BYTE, the serial number of the alarm at the same time point, cyclically accumulated from 0
14: Number of attachments, indicating the number of attachments corresponding to the alarm
15: Reserved
Alarm identification number

Bits are arranged from right to left, 0 bit means the smallest bit.

2.6 DMS Alarm

AlertTypeDataTypeStorageFaultChannel Description
265shortDMS alarm field.
Parameter DataType Value Description
alarmId int According to the alarm sequence, regardless of the alarm type, it will start accumulating cyclically from zero Alarm ID
alarmStatus BYTE 0x00: unavailable
0x01: Start flag
0x02: end flag
This field applies only to alarms or events with start and end flags
It will be filled with 0x00 for the alarm type or event type without start and end flags, this bit is not available,
Fill in 0x00
Alarm status
alarmType BYTE 0x01: Fatigue driving alarm
0x02: Making or Answering phone calls alarm
0x03: Smoking alarm
0x04: Distracted driving alarm
0x05: Driver abnormal alarm(No driver detected)
0x06 ~ 0x0F: User defined
0x10: Automatic capture event
0x11: Driver change event
0x12 ~ 0x1F: User defined
Alarm/Event type
alarmLevel BYTE 0x01: Level 1 alarm
0x02: Level 2 alarm
Alarm level
fatigueLevel BYTE The range is 1~10. The larger the value, the more severe the fatigue, and it is only valid when the alarm type is 0x01 Fatigue level
carSpeed BYTE The unit is Km/h. Range: 0~250 Speed
altitude short Altitude, in meters (m) Altitude
carStatus short Bitwise representation of other vehicle states:
Bit 0 ACC status. 0: OFF, 1: ON
Bit 1 Left steering status. 0: OFF, 1: ON
Bit 2 Right steering status. 0: OFF, 1: ON
Bit 3 Wiper status. 0: OFF, 1: ON
Bit 4 Braking state. 0: Not braking, 1: Braking
Bit 5 Card inserted status. 0: No card, 1: Card in
Bit 6 ~ Bit 9 custom
Bit 10 Positioning status. 0: Not position, 1: Positioned
Bit11 ~ bit15 Custom
Vehicle status
alarmLabel String 16 bytes total:
0 ~ 6: Terminal ID, consisting of uppercase letters and numbers
7: Time, YY-MM-DD-hh-mm-ss (Device Local time)
13: Serial number BYTE, the serial number of the alarm at the same time point, cyclically accumulated from 0
14: Number of attachments, indicating the number of attachments corresponding to the alarm
15: Reserved
Alarm identification number

Bits are arranged from right to left, 0 bit means the smallest bit.

2.7 Other Alarms

AlertTypeDataTypeDescription
262intAbnormal driving behavior alarm. Push field drivingAlarmFlag
15intCamera fault alarm
1024intSharp acceleration
1025intSharp deceleration
1026intSharp turn
1027intOverspeed alarm
1028intOvertime/Fatigue driving alarm
1029intDriving collision alarm
1030intParking vibration alarm
1031intDisplacement alarm
1032intFence entry alarm
1033intFence exit alarm
1040intSleep Mode Event
1041intWorking Mode Event
3073intSOS emergency alarm
3074intExternal low power alarm
3075intACC ON alarm
3076intACC OFF alarm
3077intAnti-theft alarm
3078intCalibration abnormal alarm
3079intIdentification alarm
3080intDoor trigger alarm
3081intAbnormal oil alarm
3082intAbnormal temperature and humidity alarm
3083intDLT card login alarm
3084intDLT card logout alarm
3085intDLT non-registered card alarm
3086intPower Off alarm
3087intBuilt in low battery alarm
3088intLow power shutdown alarm
3089intVoice controlled alarm
3090intAnti-disassembly alarm
3091intActive offline alarm
3092intSD card/T card insertion or mount
3093intSD card/T card not inserted or removed
3094intSD card/T card corrupted(abnormal writing)
3095intData overage alarm
3096intRestore oil and electricity
3097intDisconnect oil and electricity

3 OBD Data Description

3.1 Positioning Data

Table 20 Status Bit Definition of Positioning Information

BitDescription
00: ACC OFF 1: ACC ON
10: Not positioning
1: Positioning
20: North latitude
1: South latitude
30: East longitude
1: West longitude
40: Running status;
1: Stopped status
50: Longitude and latitude are not encrypted by the confidential plug-in;
1: Longitude and latitude have been encrypted by confidential plug-in
6~7Reserved
8~900: Empty;
01: Half load;
10: Reserved;
11: Full load
100: Vehicle oil circuit connected;
1: Vehicle oil circuit disconnected
110: Vehicle circuit connected;
1: Vehicle circuit disconnected
120: Door unlocked
1: Door locked
130: Door 1 closed
1: Door 1 open (front door)
140: Door 2 closed
1: Door 2 open (middle door)
150: Door 3 closed
1: Door 3 open (rear door)
160: Door 4 closed
1: Door 4 open (driver's seat door)
170: Door 5 closed
1: Door 5 open (user-defined)
180: Positioning without GPS satellites
1: Positioning with GPS satellites
190: Positioning without Beidou Satellite
1: Positioning with Beidou Satellite
200: Positioning without GLONASS satellite
1: Positioning with GLONASS satellite
210: Positioning without Galileo satellite
1: Positioning with Galileo satellite
22~28Reserved
29~30Positioning type:
00: satellite positioning
01: Base station positioning
10: Inertial navigation and dead reckoning positioning
11: Reserved
310: Real time positioning data
1: Reupload positioning data

3.2 Commercial Vehicle Data Description

Table 21 Commercial Vehicle Data Stream ID(256~767)

IDDataTypeDescriptionUnitComment
1320doubleTotal mileageKMy=x/10
Precision: 0.1 KM
1324doubleTotal fuel volumeLy=x/100
Precision: 0.01 L
258doubleVehicle mileageKMy=x/10
Precision: 0.1 KM
259doubleVehicle fuel volumeLy=x/100
Precision: 0.01 L
1350doubleCumulative mileageKMy=x/10
Precision: 0.1 KM
261doubleCumulative fuel consumptionLy=x/100
Precision: 0.01 L
1337doubleInstant fuel consumptionL/Hy=x/100
Precision: 0.01 L/H
1335doubleFuel consumption per 100 kmL/100KMy=x/100
Precision: 0.01
1334intRevolutions per minute(RPM)r/miny=x
Precision: 1 r/min
1333doubleVehicle SpeedKM/Hy=x/10
Precision: 0.1 KM/H
1328intVoltagemVy=x
Precision: 1 mV
1325byteWater temperaturey=x-40
Precision: 1℃
Range: -40~210℃
1341doubleIntake pressureKPay=x/10
Precision: 0.1 KPa
1340doubleIntake air flowg/sy=x/10
Precision: 0.1 g/s
270doubleFuel injection quantityml/sy=x/10
Precision: 0.1 ml/s
271intEngine oil temperaturey=x-273
Precision: 1℃
Range: -273~ 1734
1339doubleEngine oil pressureKPay=x/10
Precision: 0.1 KPa
273byteFuel temperaturey=x-40
Precision: 1℃
Range: -40~210
1326byteEngine intake air temperaturey=x-40
Precision: 1℃
Range: -40~210
275intTorqueNmy=x
Precision: 1
276byteEngine load%y=x
Precision: 1%
Range: 0%-100%
1348byteOil tank liquid position%y=x
Precision: 1%
Range: 0%-100%
1343byteAccelerator pedal position%y=x
Precision: 1%
Range: 0%-100%
279byteClutch load%y=x
Precision: 1%
Range: 0%-100%
280byteTorque percentage%y=x-125
Precision: 1%
Range: -125% ~ 125%
1318byteAir conditioner statey=x
0: Stop
1: Start
Others: Invalid
1319byteGear positiony=x
0: N Position
1--16: D Position
17--20: R Position
21: P Position
Others: Invalid
1312byteSafety belt statusy=x
0: Nornal
1: Alert
Others: Invalid
283byteClutch statey=x
0: Up
1: Down
Others: Invalid
1311byteFoot brake statusy=x
0: Up
1: Down
Others: Invalid
1310byteHand brake statusy=x
0: Down
1: Up
Others: Invalid
286byteSCR Statusy=x
0: Stop
1: Start
Others: Invalid
287intSCR intake NOx concentration (SCR upstream NOx sensor input value)ppmy=x-200
Precision: 1ppm
Range: -200 ~ 3012ppm
288intSCR exhaust gas temperature (SCR outlet temperature)y= x-273
Precision: 1 ℃
Range: -273 ~ 1734℃
289intFront oxygen sensor valuemVy=x
Oxygen concentration voltage value
Precision: 1 mV
Range: 0 ~ 999mV
290intRear oxygen sensor valuemVy=x
Oxygen concentration voltage value
Precision: 1 mV
Range: 0 ~ 999mV
291byteTemperature of three-way catalyst (temperature of urea tank)y=x-40
Precision: 1℃
Range: -40~210℃
292byteUrea level (reagent margin, catalyst tank level)%y=x
Precision: 1%
Range: 0%-100%
293intNOx concentration range (downstream)ppmy=x
Precision: 1 ppm
Range: 0 ~ 3012ppm
294byteOBD status (MIL fault lamp)y=x
0: Nornal
1: Alert
Others: Invalid
295intEngine running timesy=x
Precision: 1s;
296intGross vehicle weightkgy=x
Precision: 1kg;
297intSCR inlet temperaturey= x-273;
Precision: 1℃;
Range: -273 ~ 1734℃
298byteFriction torque%y=x-125;
Precision: 1%;
Range: -125% ~ 125%
299doubleDPF differential pressurekPay=x/10;
Precision: 0.1kPa;
Range: 0~ 6425.5 kPa
300byteInlet manifold temperaturey=x-40;
Precision: 1℃;
Range: -40~210℃
301byteEngine torque mode0~30: Overspeed failure
1: Speed control
2: Torque control
3: Speed/torque control
302doubleOil level (Qinghao project)mmy=x/10;
Precision: 0.1mm
Range: 0~65535 mm
303intSCR AdBlue injection volumeml/hy=x;
Precision: 1 ml/h;
304intSCR system AdBlue pump pressurekPay=x;
Precision: 1 kPa;
305intSCR system pump speedrpmy=x;
Precision: 1 rpm;
306intSCR system catalyst downstream temperaturey=x-273;
Precision: 1℃;
Range: -273~1735℃
307byteSCR system pump working status0~50: Not used
1: Stop state
2: Pre injection state
3: Injection state
4: Purging state
5: diagnostic state
308byteInlet NOx power supply failure0~30: Abnormal power
1: Normal
2: Error
3: Unavailable value
309byteInlet NOx heating control0~30: The sensor is not at the working temperature
1: The sensor is at the working temperature
2: Error
3: Unavailable value
310byteInlet NOx signal is stable and effective0~30: Signal invalid
1: Signal valid
2: Error
3: Unavailable value
311byteInlet NOx heating fault3/5/313: Short circuit
5: Open circuit
31: No fault
312byteOutlet NOx power supply failure0~30: Abnormal power supply
1: Normal power supply
2: Error
3: the value is unavailable
313byteOutlet NOx heating control0~30: The sensor is not at the working temperature
1: The sensor is at the working temperature
2: Error
3: Unavailable value
314byteOutlet NOx signal is stable and effective0~30: Signal invalid
1: Signal valid
2: Error
3: Unavailable value
315byteOutlet NOx heating fault3/5/313: Short circuit
5: Open circuit
31: No fault
316byteInlet NOx sensor heating enable0~30: Dew point not reached
1: Dew point reached, start heating
2: Error
3: Invalid
317byteOutlet NOx sensor heating enable0~30: Dew point not reached
1: Dew point reached, start heating
2: Error
3: Invalid
318intUpstream catalyst temperaturey=x-273
Precision: 1℃
Range: -273~1735℃
319intRevolution limit thresholdrpmy=x
Precision: 1 rpm
Range: 0 ~ 8031 rpm
320bytePercent torque threshold%y=x-125
Precision: 1%
Range: -125~125%
321byteAir solenoid valve fault0~30: Normal
1: Short circuit to positive pole of power supply
2: Short circuit to ground
3: Open circuit
322byteReturn pipe plug failure0/10: Normal
1: Blocking
323bytePump heating fault0/10: Normal
1: Heating failed
324byteLow air or low flow fault0/1
0: Normal
1: Low air or low flow
325byteSCR motor fault0/10: Normal
1: Motor drive fault
326byteMetering pump heating status0~30: Icing but unheating state
1: Icing and heating state
2: No icing and unheating state
3: No icing but heating state
327bytePurge completion flag0/10: Purging completed
1: Purging not completed
328byteSCR pump temperaturey=x-40
Precision: 1℃
Range: -40~215℃
329intAD value of pressure switch-y=x
Precision: 1
Range: 0~4080
330doubleInstant fuel consumptionkm/ly=x/100
Precision: 0.01 km/l
331intAmbient temperaturey=x-273
Precision: 1℃
Range: -273~1735℃
332doubleParticulate concentrationmg/m3y=x/1000
Precision: 0.001 mg/m3;
333doubleOpacity%y=x/10
Precision: 0.1 %
Range: 0~99.9
334doublePM K valuey=x/1000
Precision: 0.001℃
Range: 0~9.99
335intCumulative urea consumption (total urea consumption)gy=x
Precision: 1 g;
336intDPF exhaust temperaturey=x-273
Precision: 1℃
Range: -273~1735℃
337intSensor voltage signal (flood measurement)mvy=x/10
Precision: 0.1mv
Range: 0~3000.0 mv
338intSensor temperature signal (flood measurement)y=x-99
Precision: 1℃
Range: -99~+199

3.3 New Energy Vehicle Data Description

Table 22 New Energy Vehicle Data ID

IDDataTypeDescriptionUnitComment
1792byteVehicle status
1793byteCharging state
1794byteOperating mode
1795intTotal voltage
1796intTotal current
1797byteRemaining power SOC
1798byteDC-DC status
1799intInsulation resistance
1800byteDrive motor numbers
1801byteDrive motor serial number
1802byteDrive motor status
1803byteDrive motor controller temperature
1804intDrive motor revolution speed
1805intDrive motor torque
1806byteDrive motor temperature
1807intMotor controller input voltage
1808intMotor controller linear bus current
1809intFuel cell voltage
1810intFuel cell current
1811intFuel consumption rate
1812intTotal fuel cell temperature probes(N)
1813byteProbe temperature
1814intMaximum temperature in hydrogen system
1815byteMaximum temperature probe code in hydrogen system
1816intMaximum hydrogen concentration
1817byteMaximum hydrogen concentration sensor code
1818intMaximum hydrogen pressure
1819byteHydrogen maximum pressure sensor code
1820byteHigh voltage DC/DC status
1821byteEngine status
1822byteHighest voltage battery subsystem number
1823byteMaximum voltage battery unit code
1824intMaximum voltage of single battery
1825byteMinimum voltage battery subsystem number
1826byteMinimum voltage cell code
1827intMinimum voltage of single battery
1828byteMaximum temperature subsystem No
1829byteMaximum temperature cell code
1830byteMaximum temperature value
1831byteMinimum temperature subsystem number
1832byteMinimum temperature cell code
1833byteMinimum temperature value

3.4 Passenger Vehicle Data Description

Table 23 Passenger Vehicle Data Stream ID

IDDataTypeDescriptionUnitComment
1280byteLamp status (high beam)y=x
0: OFF
1: ON
1281byteLamp status (low beam)y=x
0: OFF
1: ON
1282byteLamp status (marker light)y=x
0: OFF
1: ON
1283byteLamp status (fog lamp)y=x
0: OFF
1: ON
1284byteLamp status (left turn)y=x
0: OFF
1: ON
1285byteLamp status (right turn)y=x
0: OFF
1: ON
1286byteLamp status (hazard lamp)y=x
0: OFF
1: ON
1287byteDoor status (left front door)y=x
0: OFF
1: ON
1288byteDoor status (right front door)y=x
0: OFF
1: ON
1289byteDoor status (left rear door)y=x
0: OFF
1: ON
1290byteDoor status (right rear door)y=x
0: OFF
1: ON
1291byteDoor status (trunk)y=x
0: OFF
1: ON
1292byteDoor lock (full door lock)y=x
0: Unlocked
1: Locked
1293byteDoor lock (left front door)y=x
0: Unlocked
1: Locked
1294byteDoor lock (right front door)y=x
0: Unlocked
1: Locked
1295byteDoor lock (left rear door)y=x
0: Unlocked
1: Locked
1296byteDoor lock (right rear)y=x
0: Unlocked
1: Locked
1297byteDoor lock (trunk)y=x
0: Unlocked
1: Locked
1298byteWindow status (left front window)y=x
0: Closed
1: Opened
1299byteWindow status (right front window)y=x
0: Closed
1: Opened
1300byteWindow status (left rear window)y=x
0: Closed
1: Opened
1301byteWindow status (right rear window)y=x
0: Closed
1: Opened
1302byteWindow status (sunroof)y=x
0: Closed
1: Opened
1303byteFault signal (ECM)y=x
0: Normal
1: Fault
1304byteFault signal (ABS)y=x
0: Normal
1: Fault
1305byteFault signal (SRS)y=x
0: Normal
1: Fault
1306byteAlarm signal (oil)y=x
0: Normal
1: Fault
1307byteAlarm signal (tire pressure)y=x
0: Normal
1: Fault
1308byteAlarm signal (maintenance)y=x
0: Normal
1: Fault
1309byteAirbag statusy=x
0: Normal
1: Exploded
1310byteHand brake statusy=x
0: Unbraked
1: Braked
1311byteBraking status (foot brake)y=x
0: Unbraked
1: Braked
1312byteSeat belt (driver)y=x
0: Unfasten
1: Fasten
1313byteSeat belt (co-driver)y=x
0: Unfasten
1: Fasten
1314byteACC signaly=x
0: Closed
1: Opened
1315byteKey statusy=x
0: Key out
1: Key in
1316byteRemote control signaly=x
0: Not pressed
1: Unlocked
2: Locked
3: Trunk lock
4: Long press to unlock
5: Long press to lock
1317byteWiper statusy=x
0: Closed
1: Opened
1318byteAir conditioning switchy=x
0: Closed
1: Opened
1319bytePositiony=x
1: P position
2: R position
3: N position
4: D position
Others: --
1320doubleMileage (total)KMy=x/10
Precision: 0.1
1321doubleMileage (endurance)KMy=x/10
Precision: 0.1
1322doubleInstantaneous oil quantityLy=x/100
Precision: 0.01
1323intInstant oil quantity%y=x
Precision: 1%
Range: 0%-100%
1324doubleOil consumptionLy=x/100
Precision: 0.01
1325byteWater temperaturey=x-40
Precision: 1
Range: -40~210
1326byteEngine intake air temperaturey=x-40
Precision: 1
Range: -40~210
1327byteTemperature in air conditioner vehicley=x-40
Precision: 1
Range: -40~210
1328intCurrent battery voltagemVy=x
Precision: 1
1329doubleFront left wheel speedKM/Hy=x/10
Precision: 0.1
1330doubleFront right wheel speedKM/Hy=x/10
Precision: 0.1
1331doubleRear left wheel speedKM/Hy=x/10
Precision: 0.1
1332doubleRear right wheel speedKM/Hy=x/10
Precision: 0.1
1333doubleSpeedKM/Hy=x/10
Precision: 0.1
1334intRevolutions per minute(RPM)r/miny=x
Precision: 1
1335doubleFuel consumption (average)L/100KMy=x/100
Precision: 0.01
1336doubleFuel consumption (instantaneous)L/100KMy=x/100
Precision: 0.01
1337doubleFuel consumption (instantaneous)L/Hy=x/100
Precision: 0.01
1338byteOil life%y=x
Precision: 1%
Range: 0%-100%
1339doubleOil pressurekPay=x/10
Precision: 0.1
1340doubleAir flowg/sy=x/10
Precision: 0.1
1341doubleIntake manifold absolute pressurekPay=x/10
Precision: 0.1
1342doubleInjection pulsemsy=x/10
Precision: 0.1
1343byteAccelerator pedal position%y=x
Precision: 1%
Range: 0%-100%
1344byteAccelerator pedaly=x
0: Up
1: Down
1345intSteering wheel angle°y=x
Precision: 1
Range: 0~540
1346byteSteering wheel angle statusy=x
1: Left
2: Right
3: Middle
Others: Invalid
1347doubleRemaining oil(L)Ly=x/100
Precision: 0.01
1348byteRemaining oil(%)%y=x
Precision: 1%
Range: 0%-100%
1349intTrip ID
1350doubleCumulative mileagekmy=x/10
Precision: 0.1
1351byteRelative throttle valve opening%y=x
Precision: 1%
Range: 0%-100%
1352byteAbsolute throttle valve opening%y=x
Precision: 1%
Range: 0%-100%