This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好!
我使用的 是 SDK 1.3.0,我的问题是为什么 sl_Extt Lib_Mqtt txDelete()在 WiFi 连接被 AP 断开时失败,并且有一条没有干净会话的错误 qos1消息。
流程是:
clean
= false 期间、我不应该删除上下文? 谢谢
您好!
可能是 AP 已断开连接、但应用上层仍有数据。
这就是代码正在等待再次连接到代理的原因,一旦完成,也会建立代理连接。
sl_Extt Lib_Mqtt CtxDelete (((connect_config*)(RecvQue.hndl)->CLT_ctx);
if (! IS_CONNECTED (g_ulStatus)
{
uart_print ("设备已从 AP \n\r\n 断开连接);
uart_print ("重试连接到 AP\n\r\n ");
while (! (is_connected (g_ulStatus))||! (IS_IP_ACQUIRED (g_ulStatus))
{
OSI_SLEEP (10);
}
转到 connect_to_Broker;
}
什洛米
但在调用 Lib_Mqtt 后、删除返回-1
当器件重新检测到 AP 并在 调用时获取 IP 时
我明白了、让我来研究一下、如果我有权变措施、会告诉您。
您好!
有什么新想法吗?
谢谢