Production Test of Zigbee SDK

Last Updated on : 2022-02-23 06:44:20download

This topic describes the protocol specification of the standard general production test of Tuya Zigbee products, which standardizes the PC production test tool that applies to the PCBA and whole device test of different Zigbee products.

Application scope

  • Standardize the way that the Tuya Zigbee devices enter the production test mode.
  • Define the data points (DPs) of the Zigbee device to be tested.
  • Define the test process of the Tuya Zigbee device.

Production scope

  • Enter production test and reset test
  • Pairing test of the Zigbee device
  • DP test of the Zigbee device

Test topology

Production Test of Zigbee SDK

RF communication convention

Note: The Zigbee device needs to be paired to the specified gateway of the production test version.

The pairing steps are as follows:

  1. Enable the gateway to pair.
  2. Press and hold the pairing button until the device pairing indicator flickers and goes out, representing that the pairing is completed.
  3. The device pairing indicator is always on, which indicates the production test mode.

Production test process

The production test process of the standard general production test protocol of Tuya Zigbee products is as follows:

Production Test of Zigbee SDK

Frame format description

  • Format:

    Length 2 bytes 1 byte 1 byte 2 bytes X bytes 1 byte
    Format Header Version Command Data length Data Checksum field
  • Field description:

    Field Number of bytes Description
    Header 2 It is fixed as 0x55AA.
    Version 1 It is used for updates and extensions.
    Command 1 Specific frame type.
    Data length 2 The end mark is not included if the string is in JSON format.
    Data XXXX -
    Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Used command: 0x00–0x14, 0x80–0x87, and 0x90.

Required test items

The production test protocol of the Zigbee device applies to the entire test process including the RF communication (Using the Zigbee private cluster) between the gateway for the production test and the PCBA or the whole device, and the TCP communication between the gateway for production test and the PC host.

Enter production test mode (0x00)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x00
Data length 2 0x0001
Data 1 0x00
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Sending example in HEX format: 55 AA 00 00 00 01 00 00

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x00
Data length 2 0x0001
Data 2 The first byte is the channel number, and the second byte consists of the following elements:
  • bit 0: production test type. 0 represents the module production test and 1 represents the gateway production test.
  • bit 1: Whether to write PID. 0 means the PID is written and 1 means no PID is written.
  • bit 2: Whether to write firmware authorization code. 0 means no and 1 means yes.
  • bit 3: Whether to write the auzkey. 0 means no and 1 means yes.
  • bit 4-7: Reserved.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Returning example in HEX format:

  • Write the device ID: 55 AA 00 00 00 01 00 00
  • Gateway production test: 55 AA 00 00 00 01 01 01
  • Don’t write the device ID: 55 AA 00 00 00 01 02 02

Note: After receiving the command of entering the production test from the private Cluster, the device enters the process of gateway production test.

Read the MAC address (0x01)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x01
Data length 2 0x000E represents the following string length (excluding 0)
Data 14 {“mac”: “read”}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Sending example in HEX format: 55 AA 00 01 00 0E 7B 22 6D 61 63 22 3A 22 72 65 61 64 22 7D 95

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x01
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX Indicates the MAC address of the module to be tested {“mac”: “XX”};
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Note: The length of the MAC address is fixed at 8 bytes. As the unique identifier of the device, it must be supported.

GPIO test (optional) (0x02)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x02
Data length 2 0x0001
Data 1 0x00
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Sending example in HEX format: 55 AA 00 02 00 01 00 02

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x02
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“ret”:true} or {“ret”:false}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.
  • Successful returning example in HEX format: 55 AA 00 02 00 0C 7B 22 72 65 74 22 3A 74 72 75 65 7D 8E
  • Failed returning example in HEX format: 55 AA 00 02 00 0D 7B 22 72 65 74 22 3A 66 61 6C 73 65 7D DA

Note: The GPIO test is not required in the PCBA test and the whole device test.

Write device ID (optional) (0x05)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x03
Data length 2 0xXXXX
Data XX {“PID”: “XXXXXXXX”}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Sending example in HEX format: 55 AA 00 03 00 12 7B 22 50 49 44 22 3A 22 30 31 32 33 34 35 36 37 22 7D 47

If the returned data is 0x00 when the module enters the production test mode, the host needs to write the device ID.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x03
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“ret”:true} or {“ret”:false}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.
  • Successful returning example in HEX format: 55 AA 00 03 00 0C 7B 22 72 65 74 22 3A 74 72 75 65 7D 8F
  • Failed returning example in HEX format: 55 AA 00 03 00 0D 7B 22 72 65 74 22 3A 66 61 6C 73 65 7D DB

Note: The product ID is written in a string of 8 bytes.
The device must be reset after the PID is written and then the PID check is read.

Reset test of the module (0x04)

Production test software:

Field Number of bytes Description
Header 2 0x55aa
Version 1 0x00
Command 1 0x04
Data length 2 0x0001
Data XX 0x00
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder

Sending example in HEX format: 55 AA 00 04 00 01 00 04

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x04
Data length 2 0x0001
Data XX 0x00
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Returning example in HEX format: 55 AA 00 04 00 01 00 04

Note: The module resets after returning data.

Read device ID (optional) (0x05)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x05
Data length 2 0x000E represents the following string length (excluding 0)
Data 14 {“PID”: “read”}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Sending example in HEX format: 55 AA 00 05 00 0E 7B 22 50 49 44 22 3A 22 72 65 61 64 22 7D 45

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x05
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“PID”: “XXXXXXXX”}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Note: The length of the ID is 8 bytes.

Get the firmware fingerprint (0x06)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x06
Data length 2 0x0001
Data 1 0x00
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder

Sending example in HEX format: 55 AA 00 06 00 01 00 06

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x06
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX Serial port:{“ret”:true,“firmName”: “XX”,“firmVer”: “X.X.X”}
Gateway:{“ret”:true,“N”: “XX”,“V”: “X.X.X”}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder

Note: The product test software needs to verify the fingerprint information returned from the firmware, namely, to verify the name and the version of the firmware, in prevention from using the wrong authorization key or burning the wrong firmware.

Write the firmware authorization code (0xE0)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0xE0
Data length 2 0xXXXX represents the following string length (excluding 0)
Data 1 { “key”: “xxxxxxxxxxxxx” }
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0xE0
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“ret”:true} /{“ret”:false}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder

Device disconnection test (Networking exclusive command) (0x10)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x10
Data length 2 0x0001
Data 1 0x00
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Sending example in HEX format: 55 AA 00 10 00 01 00 10

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x10
Data length 2 0x000C represents the following string length (excluding 0)
Data 12 {“ret”:true}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Returning example in HEX format: 55 AA 00 10 00 0C 7B 22 72 65 74 22 3A 74 72 75 65 7D 9C

Note: The device returns successfully after receiving the disconnection command, and disconnects in one second. After being disconnected from the network, the device will no longer actively access the network before power on again.

Radio frequency (RF) test (0x07)

The RF test mode of the module is a loopback test between the device under test (DUT) and the golden unit (GU). The DUT sends a packet, and the GU forwards it to the DUT after receiving it. Then, the DUT receives the packet. After that, statistics are performed and the results are reported to the PC through the serial port.

Production test software:

Field Length (byte) Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x07
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“send”:XX} XX represents the number of test packets.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The DUT returns the following command:

Field Length (byte) Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x07
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“ret”:XX} or {“ret”:false} XX represents the number of received test packets
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder
  • Successful returning example in HEX format: 55 AA 00 06 00 09 7B 22 72 65 74 22 3A XX 7D XX
  • Return packet loss rate \≥85% example in HEX format: 55 AA 00 06 00 0D 7B 22 72 65 74 22 3A 66 61 6C 73 65 7D E3

Note:

  1. Both the DUT and GU must enter the production mode during the RF test and shall be set to the same channel.
  2. To send a test packet, only the number of transmissions is required, and the payload information of the packet is written into the DUT in advance.
  3. The RF test is not required in PCBA and the whole device test.

Optional test items of the device DP

Due to the different DPs of the devices, not all the items of the following protocol in the application layer are required to be implemented.

LED test (0x08)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x08
Data length 2 0x0001
Data 1
  • 0x00: Always on
  • 0x00: Always off
  • 0x02: Flickers alternatively (500 ms)
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x08
Data length 2 0x000C represents the following string length (excluding 0)
Data 12 Return {“ret”:true} if true and return nothing if false.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Returning example in HEX format: 55 AA 00 08 00 0C 7B 22 72 65 74 22 3A 74 72 75 65 7D 94

Note: Alternate flickering for the device with a few lights and all on for the device with many lights. The LED operation is decided manually.

Relay test (0x09)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x09
Data length 2 0x0001
Data 1 0x00: All on. 0x01: All off. 0x02: Alternate on and off for three times (500 ms)
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x09
Data length 2 0x000C represents the following string length (excluding 0)
Data 12 Return {“ret”:true} if true and return nothing if false.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Returning example in HEX format: 55 AA 00 09 00 0C 7B 22 72 65 74 22 3A 74 72 75 65 7D 95

Note: Alternate operations for the device with a few relays and all on for the device with many relays. The relay operation is decided manually.

Button test (0x0A)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x0A
Data length 2 0x0001
Data 1 0x00
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Sending example in HEX format: 55 AA 00 0A 00 01 00 0A

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x0A
Data length 2 0xXXXX
Data XX {“keyID”:n} N represents the button value. For example, {“keyID”:0}, {“keyID”:1}, and {“keyID”:2}.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Switching sensor test (0x0B)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x0B
Data length 2 0x0001
Data 1 0x00: Type identifier of sensors. Contact sensor: 0x00. Infrared: 0x01. Photosensitive sensor: 0x02. Smoke sensor: 0x03. Gas sensor: 0x04. Water detector: 0x05.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x0B
Data length 2 0xXXXX represents the following string length (excluding 0)
Data 1 {“Dtn”:true} or {“Dtn”:false}. ‘t’ represents the sensor type. ’n’ the number of the sensors in the same type. For example: two infrared {“D10”:true} or {“D11”:true}.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Note: Distinguish different types of switch sensors under the same device, and pinpoint the exact sensor in the same type.

Analog sensor test (0x0C) only for temperature and humidity sensor

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x0C
Data length 2 0x0001
Data 1 0x00: Type identifier of sensors. Temperature and humidity sensor: 0x00. The category will be extended.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.
Send the temperature and humidity in HEX format 55 AA 00 0C 00 01 00 0C

The module returns the following command:

Field Number of bytes Description
Header 2 0x55aa
Version 1 0x00
Command 1 0x0C
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“S1”:Value, “S2”:Value}. For example, S1: Temperature value, S2: Humidity value. S2 value shall be 0 if there is only one value.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Note: Return two analog values each time. Use only sensor 1 for less than two analog devices, and return multiple times for over two analog devices. The analog value is transmitted by int32_t. The sensor must eliminate the float decimal points and convert them into int32_t before sending.

Toning light (0x0D)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x0D
Data length 2 0x0001
Data 1 0x00: Red light. 0x01: Green light. 0x02: Blue light. 0x03: Cold (White) light test. 0x04: Warm light test. 0x04: Aging test (RGB lights should flicker alternately for 10 minutes. Cold and warm lights should flicker alternately at full power for 10 minutes)
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x0D
Data length 2 0x000C represents the following string length (excluding 0)
Data 12 Return {“ret”:true} if true and return nothing if false.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Returning example in HEX format: 55 AA 00 0D 00 0C 7B 22 72 65 74 22 3A 74 72 75 65 7D 99

Note: For a toning light, the base color is tested individually, and then the aging test is performed.

Motor test (0x0E)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x0E
Data length 2 0x0001
Data 1 0x00: Clockwise rotation. 0x01: Counterclockwise rotation. 0x02: Stop. 0x03: Reciprocating test
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x0E
Data length 2 0x000C represents the following string length (excluding 0)
Data 12 Return {“ret”:true} if true and return nothing if false.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Returning example in HEX format: 55 AA 00 0E 00 0C 7B 22 72 65 74 22 3A 74 72 75 65 7D 9A

RSSI value obtaining test (Networking exclusive command) (0x0F)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x0F
Data length 2 0x0001
Data 1 0x00
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Sending example in HEX format: 55 AA 00 0F 00 01 00 0F

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x0F
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX Return {“ret”:XX} if true and return nothing if false. XX is RSSI value.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Battery level reading test (0x11)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x11
Data length 2 0x0001
Data 1 0x00
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Sending example in HEX format: 55 AA 00 10 00 01 00 11

Note: Async test with the maximum timeout of 5 seconds.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x11
Data length 2 0xXXXX
Data XX Return {“ret”:true} if true and return {“ret”:false} if false.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Battery level calibration (0x12)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x12
Data length 2 0xXXXX
Data XX v represents the voltage (V), and p represents the power (W). The host software is required for the testers to edit the voltage and power APIs {“v”:220, “p”:1000}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Note: Synch test. Return the result immediately.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x12
Data length 2 0xXXXX
Data XX Return {“ret”:true} if true and return {“ret”:false} if false.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Analog sensor test (0X13)

This API is the new version of the analog sensor test command. The new analog sensor test command is included in the API. The original analog sensor test API is only used for the temperature and humidity sensor of the old firmware.

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x13
Data length 2 0x0003
Data 3 {“type”: “PM2.5”,“ch”:0}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Sending example of temperature and humidity in HEX format: 55 AA 00 0C 00 01 00 0C

The module returns the following command:

Field Number of bytes Description
Header 2 0x55aa
Version 1 0x00
Command 1 0x13
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“type”: “PM2.5”, “ch”:x,“val”:56.8}. val is the sensor value and ch in float type is the serial number of the sensor starting from 0.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The type and description of the analog sensor:

Type Description Example
PM1.0 PM1.0 concentration {“type”: “PM2.5”,“ch”:0}
PM2.5 PM2.5 concentration {“type”: “PM2.5”,“ch”:0}
PM10 PM10 concentration {“type”: “PM2.5”,“ch”:0}
luminance Luminance {“type”: “Iuminance”,“ch”:0}
SenseDistance PIR sensing range {“type”: " SenseDistance",“ch”:0}
SensePeriod PIR sensing cycle {“type”: " SensePeriod",“ch”:0}

Low power current test (0X14)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x14
Data length 2 0xxxx
Data 3 {“sleepTime”:5}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Sending example of temperature and humidity in HEX format: 55 AA 00 0C 00 01 00 0C

Note: Synch test. Return the result immediately.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55aa
Version 1 0x00
Command 1 0x14
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX Return {“ret”:true} if true and return {“ret”:false} if false.
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Note: After receiving the command from the host, the module enters the sleep mode immediately. After sleeping for sleepTime seconds, it wakes automatically and returns a result.

The serial port shall take up the command exclusively.

Configuration file downloading (0x80)

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x80
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX Binary byte flow
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x80
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“ret”:true,“crc32”: “XXXXXXXX”} or {“ret”:false}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Failed returning example in HEX format: 55 AA 00 10 00 0D 7B 22 72 65 74 22 3A 66 61 6C 73 65 7D E8

Note: Use the standard polynomial 0x04C11DB7 or 0xEDB88320 of CRC-32-IEEE 802.3. The returned crc32 is a hexadecimal string, and the character 0x is not included in the string header.

Configuration file query (0x81)

Production test software:

Field Length (byte) Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x81
Data length 2 0x0001
Data 1 00
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Sending example in HEX format: 55 AA 00 81 00 01 00 81

The module returns the following command:

Field Length (byte) Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x81
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“ret”:true,“crc32”: “XXXXXXXX”} or {“ret”:false}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Failed returning example in HEX format: 55 AA 00 81 00 0D 7B 22 72 65 74 22 3A 66 61 6C 73 65 7D 59

Note: Use the standard polynomial 0x04C11DB7 or 0xEDB88320 of CRC-32-IEEE 802.3. The returned crc32 is a hexadecimal string, and the character 0x is not included in the string header.

Write device ISN

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x82
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“ISN”: “XXXXXXXX”}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x82
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“ret”:true} or {“ret”:false}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Read device ISN

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x83
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“ISN”: “read”}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x83
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“ISN”: “XXXXXXXX”} or {“ret”:false}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Write device CMEI

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x84
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“CMEI”: “XXXXXXXX”}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x84
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“ret”:true} or {“ret”:false}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Read device CMEI

Production test software:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x85
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“CMEI”: “read”}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The module returns the following command:

Field Number of bytes Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x85
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“CMEI”: “XXXXXXXX”} or {“ret”:false}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Write authorization code (0x86)

This command is not supported by all firmware. It is necessary to determine whether it supports writing the authorization code according to the data returned from the production test.

If the second byte bit3 returned from the production test is 1, the authorization code writing is supported. Otherwise, the command is not supported.

Production test software:

Field Length (byte) Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x86
Data length 2 XXXX
Data 1 {“auzKey”: “xxxxxxxxx”}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The module returns the following command:

Field Length (byte) Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x86
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“ret”:true} or {“ret”:false}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Read authorization code (0x87)

This command is not supported by all firmware. It is necessary to determine whether it supports writing the authorization code according to the data returned from the production test.

If the second byte bit3 returned from the production test is 1, the authorization code reading is supported, otherwise, the command is not supported.

Production test software:

Field Length (byte) Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x87
Data length 2 XXXX
Data 1 -
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The module returns the following command:

Field Length (byte) Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x87
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX {“ret”:true,“auzKey”: “xxxxx”} or {“ret”:false}
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

Battery test (0x90)

Production test software:

Field Length (byte) Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x90
Data length 2 XXXX
Data 1 -
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.

The module returns the following command:

Field Length (byte) Description
Header 2 0x55AA
Version 1 0x00
Command 1 0x90
Data length 2 0xXXXX represents the following string length (excluding 0)
Data XX { “P”: 1, //1: Charging, 0: Not charging, “B”: 1600// Battery voltage, the unit is mv }
Checksum 1 Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder.