The MCU sends the 0x07 command. After the module receives the production test command, it automatically scans for the Wi-Fi signal named tuya_mdev_test and returns the scan result along with the signal strength percentage.
Production Test Function Scenario Description
This is used for module production testing on the PCBA. The production test only verifies whether the Wi-Fi module's RF and serial port are functioning properly. The lock end needs to display the production test results to determine whether the module is normal. Other lock function production tests need to be completed by the customer independently.
Data Interaction Architecture
MCU Logic
Involved DPs & Protocols
Protocol used: 0x07 Wi-Fi module functional test
App Instance Operation Interface
This function does not involve app operations.
Set the router SSID to tuya_mdev_test. After the device is powered on, trigger the production test and wait for the module to return the test result.
Notes:
- The router does not need internet access. It only needs to produce a Wi-Fi signal named tuya_mdev_test. It is recommended to keep the router within approximately 5 meters of the device.
- Generally, a signal strength of 60% or above is considered a pass. This can be adjusted based on the production line and factory environment.
- The MCU must wait until the module initialization interaction is completed (the MCU has replied to the module's heartbeat and product query packets) before sending the production test command to the module. It is recommended to trigger the production test 5 seconds after power-on.
Protocol Instance Parsing Description
Send production test command
MCU report (data flow: MCU -> Module -> App/Cloud):
55 AA 00 07 00 00 06
Parsing:
55 AA // Header
00 // Version
07 // Command (Wi-Fi module functional test)
00 00 // Data length: 0
06 // Checksum (sum all bytes from the header, then take the remainder divided by 256)
Module reply (data flow: App/Cloud -> Gateway -> Module -> MCU):
55 AA 00 07 00 02 01 50 59
Parsing:
55 AA // Header
00 // Version
07 // Command (Wi-Fi module functional test)
00 02 // Data length: 2 (blue section)
01 // Flag (1: success; 0: failure)
50 // Signal strength: 80 (0–100%, 60% or above is a pass)
59 // Checksum (sum all bytes from the header, then take the remainder divided by 256)
Note: If the module returns a failure after receiving the production test command, please troubleshoot as follows: A return value of 0x00 indicates that the specified SSID was not found — verify that the router name is set correctly. A return value of 0x01 indicates that the authorization key has not been flashed to the module.