TI工程师:
你们好,想请问下3200不运行系统,怎么样自动检测到断网事件,联网事件可以检测的到,但是断网事件无法检测到;没有采用smartconfig联网配置,用的是flash读取密码联网;
那么:(1)是否类似联网事件要清除一个标志位;
(2)是否需要调用某一个专用函数
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.
TI工程师:
你们好,想请问下3200不运行系统,怎么样自动检测到断网事件,联网事件可以检测的到,但是断网事件无法检测到;没有采用smartconfig联网配置,用的是flash读取密码联网;
那么:(1)是否类似联网事件要清除一个标志位;
(2)是否需要调用某一个专用函数
CC3200断网的时候会返回一个DISCONNECT的时间,请问你有收到这个世界吗?
会产生 SL_WLAN_DISCONNECT_EVENT事件:
void SimpleLinkWlanEventHandler(SlWlanEvent_t *pWlanEvent)
{
if(pWlanEvent == NULL)
{
UART_PRINT("Null pointer\n\r");
LOOP_FOREVER();
}
switch(pWlanEvent->Event)
{
case SL_WLAN_DISCONNECT_EVENT:
{
slWlanConnectAsyncResponse_t* pEventData = NULL;
CLR_STATUS_BIT(g_ulStatus, STATUS_BIT_CONNECTION);
CLR_STATUS_BIT(g_ulStatus, STATUS_BIT_IP_AQUIRED);
pEventData = &pWlanEvent->EventData.STAandP2PModeDisconnected;
// If the user has initiated 'Disconnect' request,
//'reason_code' is SL_USER_INITIATED_DISCONNECTION
if(SL_USER_INITIATED_DISCONNECTION == pEventData->reason_code)
{
UART_PRINT("[WLAN EVENT]Device disconnected from the AP: %s, "
"BSSID: %x:%x:%x:%x:%x:%x on application's "
"request \n\r",
g_ucConnectionSSID,g_ucConnectionBSSID[0],
g_ucConnectionBSSID[1],g_ucConnectionBSSID[2],
g_ucConnectionBSSID[3],g_ucConnectionBSSID[4],
g_ucConnectionBSSID[5]);
}
else
{
UART_PRINT("[WLAN ERROR]Device disconnected from the AP AP: %s, "
"BSSID: %x:%x:%x:%x:%x:%x on an ERROR..!! \n\r",
g_ucConnectionSSID,g_ucConnectionBSSID[0],
g_ucConnectionBSSID[1],g_ucConnectionBSSID[2],
g_ucConnectionBSSID[3],g_ucConnectionBSSID[4],
g_ucConnectionBSSID[5]);
}
memset(g_ucConnectionSSID,0,sizeof(g_ucConnectionSSID));
memset(g_ucConnectionBSSID,0,sizeof(g_ucConnectionBSSID));
}
break;