Parameters
Name | Type | Description |
---|---|---|
Method | String | Request Mode, such as POST, GET. |
Timestamp | Long | Data sending time |
Version | Int | Protocol Version |
PID | Int | Devcie IMEI |
Temperature | Double | Temperatue(-1000=none) |
Humidity | Double | Humidity(-1000=none) |
Voltage | Double | Voltage(-1000=none) |
L_wgs84 | String | Latitude and longitude(WGS-84 coordinate) |
Datas > Timestamp | Long | Device time |
JOSN
For example
{"Method":"POST","Timestamp":1501224426512,"Version":1,"Datas":[{"PID":7,"Temperature":29.50,"Humidity":-1000.0,"Voltage":3.58,"L_wgs84":"","Timestamp":1501195550000},{"PID":5,"Temperature":29.90,"Humidity":0.65,"Voltage":3.64,"L_wgs84":"","Timestamp":1501195229000},{"PID":3,"Temperature":25.80,"Humidity":-1000.0,"Voltage":3.63,"L_wgs84":"","Timestamp":1501195508000},{"PID":2,"Temperature":26.50,"Humidity":0.59,"Voltage":3.61,"L_wgs84":"","Timestamp":1501195378000},{"PID":4,"Temperature":29.70,"Humidity":0.66,"Voltage":3.61,"L_wgs84":"","Timestamp":1501195436000}]}
XML
For example
<?xml version="1.0"?><Command xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Timestamp>1501225406521</Timestamp><Version>1</Version><Datas><CommandBody><PID>7</PID><Temperature>29.50</Temperature><Humidity>-1000</Humidity><Voltage>3.58</Voltage><L_wgs84 /><Timestamp>1501196493000</Timestamp></CommandBody></Datas><Method>POST</Method></Command>
Command Line Command line protocols
Description: Command line protocols, command line protocols encoding as Ascii. Every one commad is end with "\r\n"。
Formate specification:each parameter separate with“space symbol”
Type | Protocol version | Time | Detail(N) | CRC | End\r\n | |||||
---|---|---|---|---|---|---|---|---|---|---|
AA | : | 1 | 1501225869421 | …… | 254F |
Note:each parameter separate with"space symbol"
Time | Device IMEI | Temperature | Humidity | Voltage | Latitude and longitude | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
1501197059000 | | | 7 | | | 1501225869421 | | | 29.60 | | | -1000 | | | 3.58 | | |
For Example
AA:1 1501225869421 1501197059000|7|29.60|-1000|3.58|| 254F
Note: -1000=none
FixedHeader the fixed header protocols encoding 。
Description: the fixed header protocols, encoded as Hex. The protocols define the request mode as two parts, the first part define the basic information.Usually we call the first part information as header dat "request header(request name + len) + request body".
Format specification
Type | Lenght | Version | Time | Detail(N) | CRC | |
---|---|---|---|---|---|---|
Bytes | 1 bytes | 2 bytes | 1 bytes | 6 bytes | N bytes | 2 bytes |
Original Data | AA | 0035 | 01 | 11071C100515 | …… | 28CF |
Value | AA | 53 | 1 | 17-7-28 16:05:21 |
Contents Instruction
Time | Product IMEI | Temperature | Humidity | Voltage | Latitude and longitude | |
---|---|---|---|---|---|---|
Bytes | 6 bytes | 2 bytes | 3 bytes | 2 bytes | 2 bytes | 6 bytes |
Original Data | 11071C08042E | 0008 | 000A7A | 0030 | 0EE2 | 0000000000000000 |
Value | 17-07-28 16:04:46 | 8 | 26.82 | 0.48 | 3.81 |
For Example
AA00350111071C10051511071C08042E0008000A7A00300EE2000000000000000011071C0802100007000B9000000DFC000000000000000028CF
Note:
1、Temperature: 3byte,for the first byte,0 means positive ,1 means negative。The second and third byte change to decimalism, then divide by 100 divided by 100.
2、Humidity: 2byte, change to decimalism, then divide by 100.
3、Voltage:2byte, change to decimalism, then divide by 1000.
4、If it shows 0xffff, means no data.
Parameters
Name | Type | Description |
---|---|---|
Timestamp | Long | Data sending time |
Version | Int | Protocol version |
PID | Int | Device IMEI |
Temperature | Double | Temperature (-1000=none) |
Humidity | Double | Humidity (-1000=none) |
Voltage | Double | Voltage (--1000=none) |
L_wgs84 | String | Latitude and longitude (WGS-84 coordinates) |
Datas > Timestamp | Long | Device Time |
JOSN
For example
{"Timestamp":1501224426512,"Version":1,"Datas":[{"PID":7,"Temperature":29.50,"Humidity":-1000.0,"Voltage":3.58,"L_wgs84":"","Timestamp":1501195550000},{"PID":5,"Temperature":29.90,"Humidity":0.65,"Voltage":3.64,"L_wgs84":"","Timestamp":1501195229000},{"PID":3,"Temperature":25.80,"Humidity":-1000.0,"Voltage":3.63,"L_wgs84":"","Timestamp":1501195508000},{"PID":2,"Temperature":26.50,"Humidity":0.59,"Voltage":3.61,"L_wgs84":"","Timestamp":1501195378000},{"PID":4,"Temperature":29.70,"Humidity":0.66,"Voltage":3.61,"L_wgs84":"","Timestamp":1501195436000}]}