自动重连建议参考这个demo,通过蓝牙配网成功后也会自动打开自动重连功能。
u8 auto_reconnect = 0xff;
tls_wifi_auto_connect_flag(WIFI_AUTO_CNT_FLAG_GET, &auto_reconnect);
if(auto_reconnect != WIFI_AUTO_CNT_ON)
{
auto_reconnect = WIFI_AUTO_CNT_ON;
tls_wifi_auto_connect_flag(WIFI_AUTO_CNT_FLAG_SET, &auto_reconnect);
tls_wifi_connect((u8 *)"w600", strlen("w600"), (u8 *)"12345678", strlen("12345678"));
printf("--->WIFI_AUTO_CNT_FLAG_SET ON\n");
}
问 W801的WiFi重连