Last Updated on : 2023-12-19 08:36:57download
The mobile app sends the token to the device on the same LAN. The device then completes the binding and activation process after receiving the token. This solution applies to devices that can complete the pairing process independently, such as wired devices and those with a screen for entering Wi-Fi network credentials.
Open tuya_iot_config.h
and check if the following macro is defined.
#define ENABLE_TUYA_LAN 1
For a wired device, you can directly call the wired device initialization API.
For a wireless device, after the wireless device initialization API is called, the application proactively calls the Wi-Fi network connection API.
When the development framework detects that the device is connected to the router, it enables binding over a LAN and sends advertising packets over the LAN.
LAN protocol versions 3.3, 3.4, and 3.5 are supported. The cryptographic keys vary by LAN protocol versions. The LAN protocol of the development framework must match the one used on the mobile app. Otherwise, data parsing will fail.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback