Why network pairing in EZ mode fails? Views: 678568 Author: Site Editor Publish Time: 2024-06-01 Origin: Site
Why network pairing in EZ mode fails? Check whether the parameters in the following interfaces are set based on the demo code. Other interfaces do not need to be modified.
1. This interface is used to obtain the mode of a Wi-Fi module. The default mode is the sniffer mode.
OPERATE_RET tuya_adapter_wifi_get_work_mode(OUT WF_WK_MD_E *mode)
2. This interface is used to scan all channels and transmit the scanned information to AP_IF_S**ap.
OPERATE_RET tuya_adapter_wifi_assign_ap_scan(IN CONST CHAR_T *ssid,OUT AP_IF_S **ap)
3. This interface is used to set the Wi-Fi mode. When the SDK determines that the Wi-Fi input air interface packet data is correct, the SDK sets the Wi-Fi status to the station mode.
OPERATE_RET tuya_adapter_wifi_set_work_mode(IN CONST WF_WK_MD_E mode)
4. This interface is used to register the sniffer mode callback function.
int tuya_adapter_wifi_sniffer_set(const bool en, const SNIFFER_CALLBACK cb)
5. This interface is used to perform network pairing based on parsed data.
OPERATE_RET tuya_adapter_wifi_station_connect(IN CONST CHAR_T *ssid,IN CONST CHAR_T *passwd)
6. After network pairing is successful, this interface is used to notify the SDK that the IP address is obtained. This interface is frequently called.
OPERATE_RET tuya_adapter_wifi_station_get_status(OUT WF_STATION_STAT_E *stat)