Asynchronous wi-fi scan request on the given channel.
Asynchronous wi-fi scan request on the given channel, and scan for hidden APs with the given ssid.
The scan status is delivered in the wi-fi event callback and then the application is to read the scan results sequentially. The number of APs found (N) is returned in event M2M_WIFI_RESP_SCAN_DONE with the number of found APs. The application could read the list of APs by calling the function m2m_wifi_req_scan_result N times.
Functions | |
NMI_API sint8 | m2m_wifi_request_scan (uint8 ch) |
NMI_API sint8 | m2m_wifi_request_scan_ssid (uint8 ch, char *pcssid) |
[in] | ch | RF Channel ID for SCAN operation. It should be set according to tenuM2mScanCh. With a value of M2M_WIFI_CH_ALL(255)), means to scan all channels. |
The code snippet demonstrates an example of how the scan request is called from the application's main function and the handling of the events received in response.
References gu8scanInProgress, hif_send(), M2M_ERR, M2M_ERR_SCAN_IN_PROGRESS, m2m_memset(), M2M_REQ_GRP_WIFI, M2M_SUCCESS, M2M_WIFI_REQ_SCAN, NULL, and tstrM2MScan::u8ChNum.
Referenced by os_m2m_wifi_request_scan().
[in] | ch | RF Channel ID for SCAN operation. It should be set according to tenuM2mScanCh. With a value of M2M_WIFI_CH_ALL(255)), means to scan all channels. |
pcssid Null terminated string holding SSID to include in probe requests to scan for hidden AP having the same SSID
The code snippet demonstrates an example of how the scan request is called from the application's main function and the handling of the events received in response.
References tstrM2MScan::au8SSID, gu8scanInProgress, hif_send(), M2M_ERR, M2M_ERR_SCAN_IN_PROGRESS, m2m_memcpy(), m2m_memset(), M2M_REQ_GRP_WIFI, m2m_strlen(), M2M_SUCCESS, M2M_WIFI_REQ_SCAN, NULL, and tstrM2MScan::u8ChNum.
Referenced by os_m2m_wifi_request_scan_ssid_imp().