Asynchronous wi-fi connection function to a specific AP.
Prior to a successful connection, the application developers must know the SSID of the AP, the security type, the authentication information parameters and the channel number to which the connection will be established. The connection status is known when a response of M2M_WIFI_RESP_CON_STATE_CHANGED is received based on the states defined in tenuM2mConnState, successful connection is defined by M2M_WIFI_CONNECTED. If WILC didn't find the requested AP in its latest scan results, it would trigger a new scan. If the AP wasn't found after scanning, it will return a M2M_WIFI_RESP_CON_STATE_CHANGED with error M2M_ERR_AP_NOT_FOUND.
Functions | |
NMI_API sint8 | m2m_wifi_connect (char *pcSsid, uint8 u8SsidLen, uint8 u8SecType, tuniM2MWifiAuth *puniAuthInfo, uint16 u16Ch) |
NMI_API sint8 m2m_wifi_connect | ( | char * | pcSsid, |
uint8 | u8SsidLen, | ||
uint8 | u8SecType, | ||
tuniM2MWifiAuth * | puniAuthInfo, | ||
uint16 | u16Ch | ||
) |
References tuniM2MWifiAuth::au8PMK, tuniM2MWifiAuth::au8PSK, tstrM2mWifiConnect::au8SSID, tstrM2mWifiWepParams::au8WepKey, hif_send(), M2M_ERR, M2M_ERR_FAIL, M2M_MAX_PSK_LEN, M2M_MAX_SSID_LEN, m2m_memcpy(), M2M_REQ_GRP_WIFI, m2m_strlen(), M2M_SUCCESS, M2M_WIFI_CH_14, M2M_WIFI_CH_ALL, M2M_WIFI_REQ_CONNECT, M2M_WIFI_SEC_802_1X, M2M_WIFI_SEC_OPEN, M2M_WIFI_SEC_WEP, M2M_WIFI_SEC_WPA_PSK, NM_BSP_B_L_16, NULL, pbkdf2_sha1(), tuniM2MWifiAuth::strCred1x, tstrM2mWifiConnect::strSec, tuniM2MWifiAuth::strWepInfo, tstrM2mWifiConnect::u16Ch, tstrM2MWifiSecInfo::u8IsPMKUsed, tstrM2mWifiWepParams::u8KeyIndx, tstrM2mWifiWepParams::u8KeySz, tstrM2MWifiSecInfo::u8SecType, tstrM2mWifiWepParams::u8WepAuthType, tstrM2MWifiSecInfo::uniAuth, WEP_104_KEY_STRING_SIZE, WEP_40_KEY_STRING_SIZE, and WEP_KEY_MAX_INDEX.
Referenced by os_m2m_wifi_connect_imp().