Last Updated on : 2024-11-20 02:13:26download
This topic describes the generic solution for interfacing with Tuya’s Wi-Fi modules, consisting of protocol features description and common troubleshooting questions.
The Wi-Fi generic firmware is developed by Tuya for adapting to different Wi-Fi chip platforms. Your MCU can interface with Tuya’s Wi-Fi modules that have the generic firmware flashed to enable your product to connect to the Tuya Developer Platform. Besides it, the generic firmware provides extended features such as OTA update, time sync, and weather services.
In a nutshell, the Wi-Fi generic firmware provides two essential functions.
Network connectivity: The Wi-Fi module flashed with the generic firmware and license can be connected to the Tuya Developer Platform.
Raw data pass-through: With the serial protocol, the Wi-Fi module can communicate with the MCU to achieve remote control of a smart device.
The generic firmware does not process the data received from the MCU but only verifies the data. The module serves as a mediator that connects the MCU with the cloud and transmits data between them.
The serial communication between the Wi-Fi module flashed with the generic firmware and the MCU follows the Wi-Fi generic serial protocol. The serial communication enables the Wi-Fi module to communicate the firmware features to the MCU.
This serial protocol comprises the basic features, such as heartbeat detection and status reporting, as well as extended features such as OTA update. For more information, see Wi-Fi Serial Communication Protocol.
Basic features: the essential functionality to make a device IoT-enabled, which is to implement the two-way communication between a device and the cloud. The features include module initialization, network reset, and data transmission, with the commands from 0x00
to 0x08
.
Extended features: a bunch of useful features to help you improve user experiences, such as OTA update, local time sync, and Wi-Fi functionality test.
Tuya continuously updates the generic firmware with fixed issues and added new features.
The MCU SDK contains the code used to implement the Wi-Fi generic serial protocol so that you can directly port the SDK to your target platform to enable your product to connect to the Tuya Developer Platform. For more information, see MCU SDK Porting.
The MCU SDK requirements for the MCU are as follows.
Steps to get the MCU SDK are as follows.
For more information about the development process, see Wi-Fi Common Solution.
If your MCU does not have sufficient resources or porting SDK is not feasible, you can interface the serial protocol yourself. Note that the basic features must be implemented. Otherwise, your product will not work properly. For more information, see Basic Features.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback