Manual

www.ydlidar.com Copyright 2015-2018 Ydlidar Team
8 / 12
FIG 9 YDLIDAR G4 DEVICE INFORMATION RESPONSE CONTENT DATA STRUCTURE DIAGRAM
Model numberOne byte device model, such as the G4 model code is 04.
Firmware Version2 bytes, the low byte is the major version number, and the high byte is the
minor version number.
Hardware version1 byte, representing the hardware version.
Serial number16 bytes, the only factory serial number.
Health status [A5 91]
When an external device sends a Get Device Health Status command (A5 91) to G4, G4 will
feedback the device's status code. The reply message is:
FIG 10 YDLIDAR G4 SCHEMATIC DIAGRAM OF DEVICE HEALTH MESSAGES
According to the protocol resolution: response length = 0x00000003, answer mode = 0x0, type code
= 0x06.
That is, the number of response content bytes is 3; this response is a single response and the type
code is 06. The type of response content satisfies the following data structure:
FIG 11 YDLIDAR G4 DEVICE HEALTH STATUS RESPONSE CONTENT DATA STRUCTURE DIAGRAM
Status code: 1 byte, 0x0 indicates that the device is running normally, 0x1 indicates a device
error warning, and 0x2 indicates a device running error.
Error code2 bytes. When a warning or error status occurs, the specific error code will be
recorded in this field. 0x00 indicates that the device is operating without error.
Low power consumption [A5 01]
When an external device sends a low-power enable command (A5 01) to G4, G4 automatically
enters a low-power state in idle mode (in standby: the motor is stopped and the distance-measuring
unit is powered down), reducing standby power consumption. The reply message is:
FIG 12 YDLIDAR G4 LOW POWER CONSUMPTION PACKETS
According to the protocol resolution: response length = 0x00000001, answer mode = 0x0, type code
= 0x04.
00
A5
5A
03
00
00
06
‥‥
Start sign
Length
Mode
Type code
Content
Byte offset
0
1
2
Status code
Error code
00
A5
5A
01
00
00
04
01
Start sign
Length
Mode
Type code
Content