Last Updated on : 2024-05-14 08:00:15download
When you use the gateway MCU SDK to connect to Tuya’s gateway Wi-Fi module, you must conduct production tests before the embedded application development is completed and the finished product is produced.
The production test is intended to check whether the gateway module works properly, whether the radio frequency works properly, and whether the module can be networked. You can also use the production test to check whether the serial communication between the MCU and the gateway module is normal and whether the data is sent and received as expected.
After the MCU and the gateway are powered on and the production test conditions are triggered, the MCU sends a command to instruct the gateway to scan the specified router. The gateway will scan the wireless hotspot named tuya_mdev_test
, and then return the result to the MCU. The MCU parses the returned result to determine whether the production test is passed. This process can be repeated.
The MCU code implements the conditions that trigger the production test, completes the SDK for the production test process, and displays the production test results. It is recommended to add prompts at important nodes in the production test process to facilitate the operation. For example,
In most cases, you can trigger the production test by button operations. For example, press and hold the power button for three seconds. It can also be triggered in other ways. We recommend that common operations are not used to trigger the production test. Otherwise, this type of operation during the normal use of the product might trigger the production test.
Complete the production test process code in the SDK.
protocol.h
file in the SDK package, run the macro WIFI_TEST_ENABLE
.mcu_start_wifitest()
function in the mcu_api.c
file. The MCU sends the command of scanning the specified router to the gateway, and the gateway will scan the tuya_mdev_test
hotspot.protocol.h
file in the SDK package, configure the wifi_test_result
function.Show production test results.
When you configure the wifi_test_result
function, you can add processing functions such as LED, buzzer, and display screen to display the production test results. They must be easy to use, and the process is as simple as possible.
Prepare a router (a computer or mobile phone) to create a hotspot, set the hotspot name to tuya_mdev_test
. The name is written by the firmware and cannot be changed. The frequency is 2.4 GHz.
Determine whether the product is qualified according to the method of entering the production test developed by the MCU and the display of the results.
The operation process of the production line is shown as follows.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback