Overview

All messages are based on following format (HEX), the Parameter/Data field should follow little-endian:
Command ID Parameter/Data ...
N Bytes 0-N Byte ...

For decoder and encoder examples please find files on https://github.com/Milesight-IoT/SensorDecoders.

When sending downlink commands while enabling Confirmed mode, the device will send replies as below format:
Table 1. Reply Format:
Command (1B) Result & Length (1B) Command ID (1-N Byte) ...
ef Bit 7-4: result code, 0=success, 5=parameter error, 7=execute error, 10=association error

Bit 3-0: command length

Same as downlink command ...