API有什么函数能用来确定是不是连接到局域网了吗?
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.
有一个异步事件:HCI_EVNT_WLAN_UNSOL_CONNECT会传到MCU端。
//*****************************************************************************
//
//! wlan_ioctl_statusget
//!
//! @param none
//!
//! @return WLAN_STATUS_DISCONNECTED, WLAN_STATUS_SCANING,
//! STATUS_CONNECTING or WLAN_STATUS_CONNECTED
//!
//! @brief get wlan status: disconnected, scanning, connecting or connected
//
//*****************************************************************************
API内的这个函数能实现判断联网情况吗?不过
WLAN_STATUS_DISCONNECTED, WLAN_STATUS_SCANING, STATUS_CONNECTING,WLAN_STATUS_CONNECTED
都没define
可以使用这个函数的
long wlan_ioctl_statusget(void) { long ret; unsigned char *ptr; ret = EFAIL; ptr = tSLInformation.pucTxCommandBuffer; hci_command_send(HCI_CMND_WLAN_IOCTL_STATUSGET,ptr, 0); // Wait for command complete event SimpleLinkWaitEvent(HCI_CMND_WLAN_IOCTL_STATUSGET, &ret); return(ret); }