Here are listed all the functions that implement the Wifi Scanning APIs.
Functions | |
uint8 | m2m_wifi_get_num_ap_found (void) |
Reads the number of AP's found in the last Scan Request, The function read the number of AP's from global variable which updated in the wifi_cb in M2M_WIFI_RESP_SCAN_DONE. More... | |
sint8 | m2m_wifi_req_scan_result (uint8 index) |
Reads the AP information from the Scan Result list with the given index, the response received in wifi_cb M2M_WIFI_RESP_SCAN_RESULT, the response pointer should be casted with tstrM2mWifiscanResult structure. More... | |
sint8 | m2m_wifi_request_scan (uint8 ch) |
Asynchronous API to request the WINC to scan for networks. More... | |
sint8 | m2m_wifi_request_scan_passive (uint8 ch, uint16 scan_time) |
Similar to m2m_wifi_request_scan but performs passive scanning instead of active scanning. More... | |
sint8 | m2m_wifi_request_scan_passive (uint8 ch) |
Similar to m2m_wifi_request_scan but performs passive scanning instead of active scanning. More... | |
sint8 | m2m_wifi_request_scan_ssid_list (uint8 ch, uint8 *u8Ssidlist) |
Asynchronous wi-fi scan request on the given channel and the hidden scan list. More... | |
sint8 | m2m_wifi_set_scan_options (tstrM2MScanOption *ptstrM2MScanOption) |
Synchronous API for configuring the behaviour of the WINC network scanning functions. More... | |
sint8 | m2m_wifi_set_scan_region (uint16 ScanRegion) |
Synchronous API for configuring the regulatory restrictions that may affect the WINC scanning behaviour. More... | |
sint8 | m2m_wifi_set_stop_scan_on_first (uint8 u8StopScanOption) |
Synchronous API for enabling/disabling the stop scan on first result of the WINC IC's network scanning functions. More... | |
Reads the number of AP's found in the last Scan Request, The function read the number of AP's from global variable which updated in the wifi_cb in M2M_WIFI_RESP_SCAN_DONE.
Synchronous function to retrieve the number of AP's found during the last scan operation.
This function allows the application to recover the number of access points discovered during the most recent scan activity. This is achieved via a global variable in the WINC driver that is populated when receiving the @ref M2M_WIFI_RESP_SCAN_DONE event. Function to be used in STA mode only.
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.
The function reads the number of APs from global variable which was updated in the Wi-Fi callback function through the @ref M2M_WIFI_RESP_SCAN_DONE event. Function used only in STA mode only.
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.
Referenced by app_wifi_handle_event(), and wifi_cb().
Reads the AP information from the Scan Result list with the given index, the response received in wifi_cb M2M_WIFI_RESP_SCAN_RESULT, the response pointer should be casted with tstrM2mWifiscanResult structure.
Synchronous call to read the AP information from the SCAN Result list.
Asynchronous API to request the information of an access point discovered via scanning.
[in] | index | Index for the requested result, the index range start from 0 till number of AP's found |
This function allows the information of any discovered access point to be retrieved. When a scan is completed, the application is informed of the number of networks (access points) discovered. Calling this function with an index, N, will return the information for the Nth access point. The information will be returned to the application via a @ref M2M_WIFI_RESP_SCAN_RESULT event, and the response data may be obtained through casting the pointer (pvMsg) to @ref tstrM2mWifiscanResult.
[in] | index | Index for the requested result, the index range start from 0 till number of AP's found. |
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 the response.
[in] | index | Index for the requested result, the index range start from 0 till number of AP's found |
Synchronous call to read the AP information from the SCAN Result list with the given index. This function is expected to be called when the response events @ref M2M_WIFI_RESP_SCAN_RESULT or @ref M2M_WIFI_RESP_SCAN_DONE are received in the wi-fi callback function. The response information received can be obtained through the casting to the @ref tstrM2mWifiscanResult structure.
[in] | index | Index for the requested result, the index range start from 0 till number of AP's found. |
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.
Referenced by app_wifi_handle_event(), and wifi_cb().
Asynchronous API to request the WINC to scan for networks.
Asynchronous API to request the WINC IC to scan for networks.
Scan statuses are delivered to the application via the Wi-Fi event callback (@ref tpfAppWifiCb) in three stages. The first step involves the event @ref M2M_WIFI_RESP_SCAN_DONE which, if successful, provides the number of detected networks (access points). The application must then read the list of access points via multiple calls to the asynchronous @ref m2m_wifi_req_scan_result API. For each call to this function, the application will receive (step three) the event @ref M2M_WIFI_RESP_SCAN_RESULT.
[in] | ch | RF Channel ID for SCAN operation. It should be set according to tenuM2mScanCh, with a value of M2M_WIFI_CH_ALL 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.
Scan statuses are delivered to the application via the Wi-Fi event callback (@ref tpfAppWifiCb) in three stages. The first step involves the event @ref M2M_WIFI_RESP_SCAN_DONE which, if successful, provides the number of detected networks (access points). The application must then read the list of access points via multiple calls to the asynchronous @ref m2m_wifi_req_scan_result API. For each call to this function, the application will receive (step three) the event @ref M2M_WIFI_RESP_SCAN_RESULT.
[in] | ch | RF Channel ID for SCAN operation. It should be set according to tenuM2mScanCh, with a value of M2M_WIFI_CH_ALL 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.
Referenced by ble_prov_process_event(), main(), wifi_cb(), and wifi_provision_app_scanning_handler().
Similar to m2m_wifi_request_scan but performs passive scanning instead of active scanning.
[in] | ch | RF Channel ID for SCAN operation. It should be set according to tenuM2mScanCh. With a value of M2M_WIFI_CH_ALL, means to scan all channels. |
[in] | scan_time | The time in ms that passive scan is listening for beacons on each channel per one slot, enter 0 for default setting. |
References gu8scanInProgress, hif_send(), M2M_ERR_INVALID_ARG, M2M_ERR_SCAN_IN_PROGRESS, M2M_REQ_GROUP_WIFI, M2M_SUCCESS, M2M_WIFI_CH_1, M2M_WIFI_CH_14, M2M_WIFI_CH_ALL, M2M_WIFI_REQ_PASSIVE_SCAN, NULL, tstrM2MScan::u16PassiveScanTime, and tstrM2MScan::u8ChNum.
Similar to m2m_wifi_request_scan but performs passive scanning instead of active scanning.
[in] | ch | RF Channel ID for SCAN operation. It should be set according to tenuM2mScanCh. With a value of M2M_WIFI_CH_ALL, means to scan all channels. |
References hif_send(), M2M_ERR_INVALID_ARG, M2M_REQ_GROUP_WIFI, M2M_SUCCESS, M2M_WIFI_CH_1, M2M_WIFI_CH_14, M2M_WIFI_CH_ALL, M2M_WIFI_REQ_PASSIVE_SCAN, NULL, and tstrM2MScan::u8ChNum.
Asynchronous wi-fi scan request on the given channel and the hidden scan list.
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 @ref M2M_WIFI_RESP_SCAN_DONE with the number of found APs. The application could read the list of APs by calling the function @ref m2m_wifi_req_scan_result N times.
[in] | ch | RF Channel ID for SCAN operation. It should be set according to tenuM2mScanCh. With a value of M2M_WIFI_CH_ALL, means to scan all channels. |
[in] | u8SsidList | u8SsidList is a buffer containing a list of hidden SSIDs to include during the scan. The first byte in the buffer, u8SsidList[0], is the number of SSIDs encoded in the string. The number of hidden SSIDs cannot exceed MAX_HIDDEN_SITES. All SSIDs are concatenated in the following bytes and each SSID is prefixed with a one-byte header containing its length. The total number of bytes in u8SsidList buffer, including length byte, cannot exceed 133 bytes (MAX_HIDDEN_SITES SSIDs x 32 bytes each, which is max SSID length). For instance, encoding the two hidden SSIDs "DEMO_AP" and "TEST" results in the following buffer content: |
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.
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 @ref M2M_WIFI_RESP_SCAN_DONE with the number of found APs. The application could read the list of APs by calling the function @ref m2m_wifi_req_scan_result N times.
[in] | ch | RF Channel ID for SCAN operation. It should be set according to tenuM2mScanCh. With a value of M2M_WIFI_CH_ALL, means to scan all channels. |
[in] | u8SsidList | u8SsidList is a buffer containing a list of hidden SSIDs to include during the scan. The first byte in the buffer, u8SsidList[0], is the number of SSIDs encoded in the string. The number of hidden SSIDs cannot exceed MAX_HIDDEN_SITES. All SSIDs are concatenated in the following bytes and each SSID is prefixed with a one-byte header containing its length. The total number of bytes in u8SsidList buffer, including length byte, cannot exceed 133 bytes (MAX_HIDDEN_SITES SSIDs x 32 bytes each, which is max SSID length). For instance, encoding the two hidden SSIDs "DEMO_AP" and "TEST" results in the following buffer content: |
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.
sint8 m2m_wifi_set_scan_options | ( | tstrM2MScanOption * | ptstrM2MScanOption | ) |
Synchronous API for configuring the behaviour of the WINC network scanning functions.
Synchronous API for configuring the behaviour of the WINC IC's network scanning functions.
This function allows the application to tune the scanning behaviour of the WINC using the parameters described in @ref tstrM2MScanOption.
[in] | ptstrM2MScanOption; | Pointer to the structure holding the Scan Parameters. |
This function sets the configuration parameters for the scan operation.
[in] | ptstrM2MScanOption; | Pointer to the structure holding the Scan Parameters. |
Synchronous API for configuring the regulatory restrictions that may affect the WINC scanning behaviour.
Synchronous API for configuring the regulatory restrictions that may affect the WINC ICs scanning behaviour.
This function sets a property called the scan region, a parameter that affects the range of channels that the WINC may legally scan given a geographic region. For 2.4GHz, supported in the current release, the requested scan region cannot exceed the maximum number of channels (14).
[in] | ScanRegion | ASIA EUROPE NORTH_AMERICA |
This function sets a property called the scan region, a parameter that affects the range of channels that the WINC IC may legally scan given a geographic region. For 2.4GHz, supported in the current release, the requested scan region can't exceed the maximum number of channels (14).
[in] | ScanRegion | ASIA NORTH_AMERICA |
Synchronous API for enabling/disabling the stop scan on first result of the WINC IC's network scanning functions.
Allows for enabling/disabling of stop scan on first result. When enabled, the WINC will stop the scan as soon as it detects a network and return the results to the host. Setting is persistent and will need to be explicitly reverted back by the application if it no longer wishes for it to be enabled.
[in] | u8StopScanOption; | Setting for enabling or disabling Stopping Scan on first result. 1 = Enabled, 0 = Disabled (Default) |