API有什么函数能用来确定是不是连接到局域网了吗?
Yonghua Pan:
有一个异步事件:HCI_EVNT_WLAN_UNSOL_CONNECT会传到MCU端。
jun chen7:
回复 Yonghua Pan:
//*****************************************************************************////! 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
Susan Yang:
回复 jun chen7:
可以使用这个函数的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); }
jun chen7:
回复 Susan Yang:
WLAN_STATUS_DISCONNECTED,
WLAN_STATUS_SCANING,
STATUS_CONNECTING,
WLAN_STATUS_CONNECTED
这四个值你们API里没define
都是什么值
Yonghua Pan:
回复 jun chen7:
0, 1, 2, 3