Applicable models: AG-RS485 and AG-RS232 sensors. The default baud rate is 9600. You can also use PC tools to check or modify the sensor's baud rate. Supported baud rates include: 2400, 4800, 9600, 19200, 38400, 57600, 115200.
The following table defines the structure of the request and response packets for communicating with the sensor:
Request | ||||
---|---|---|---|---|
Head | Address | Event | Data | CRC-8/MAXIM |
1 byte | 1 byte | 1 byte | [0-128] byte | 1 byte |
0x31 | 0x01 | 0x06 | - | 0x6C |
Response | ||||
Head | Address | Event | Data | CRC-8/MAXIM |
1 byte | 1 byte | 1 byte | [0-128] byte | 1 byte |
0x3E | 0x01 | 0x06 | - | - |
Request data from a sensor with address 1 (AG-RS485 default address is 1, AG-RS232 default address is 0). Note: If connecting two AG-RS485 sensors, do not set the same address for both sensors. Use the configuration tool to modify the sensor address. Valid address range: 1-253.
Command Sent by GPS Tracker | Sensor Response Data |
---|---|
31
01
06
6C
31: Head (0x31)
01: Sensor Address (0x01). Adjust based on the actual sensor address. Note: RS232 default address is 0x00.
06: Event Code (0x06 indicates reading sensor data)
6C: CRC-8/MAXIM Checksum (Calculated from: 0x31 0x01 0x06)
|
3E
01
06
21
96
00
A7
E7
FD
3E: Head (0x3E)
01: Sensor Address (0x01)
06: Event Code (Matches the request event code)
21: Temperature (33°C)
96 00: Fuel Value (0x0096 = 150)
A7 E7: Reserved Value - Can be ignored (0xE7A7 = 59303)
FD: CRC-8/MAXIM Checksum
|
Sensor Response HEX Format Conversion: