【已同步】TuyaOS wifi得有没有主动断开WIFI得指令

Wi-Fi 设备、Wi-Fi 低功耗设备、Wi-Fi BLE 双模设备、Ethernet设备、Ethernet+Wi-Fi设备等
Post Reply
Daan
Posts: 79

您们好,TuyaOS wifi得有没有主动断开WIFI得指令.8720 WBR3得模组。

愚者千虑必有一得
Posts: 435

Re: 【求助】TuyaOS wifi得有没有主动断开WIFI得指令

1,断开wifi:tal_wifi_station_disconnect
2,关闭重连机制(如果不关闭,tuyaos会去重连。):tuya_wifi_monitor_stop
3,如果想重新连接:tuya_wifi_monitor_start

Code: Select all


/**
 * @brief disconnect wifi from connect ap
 * 
 * @return  OPRT_OK on success. Others on error, please refer to tuya_error_code.h
 */
OPERATE_RET tal_wifi_station_disconnect(VOID_T);

/**
 * @brief start wifi monitor: 1s once .
 *
 *
 * @note called after wifi connection.
 *
 * @return OPRT_OK on success. Others on error, please refer to tuya_error_code.h
 */
OPERATE_RET tuya_wifi_monitor_start(VOID_T);

/**
 * @brief stop wifi monitor .
 *
 *
 * @note when reconnection is going on, close wifi monitor.
 *
 * @return OPRT_OK on success. Others on error, please refer to tuya_error_code.h
 */
OPERATE_RET tuya_wifi_monitor_stop(VOID_T);

Post Reply