UINT16 WF_Scan( UINT8 CpId );
Scan Functions
Directs the MRF24W to initiate a scan operation utilizing the input Connection Profile ID. The Host Application will be notified that the scan results are ready when it receives the WF_EVENT_SCAN_RESULTS_READY event. The eventInfo field for this event will contain the number of scan results. Once the scan results are ready they can be retrieved with WF_ScanGetResult().
Scan results are retained on the MRF24W until:
- Calling WF_Scan() again (after scan results returned from previous call).
- MRF24W reset.
MRF24WB0M & MRF24WG0M support up to max of 60 scan results (SSIDs).
MACInit must be called first.
Parameters |
Description |
CpId |
Connection Profile to use. If the CpId is valid then the values from that Connection Profile will be used for filtering scan results. If the CpId is set to WF_SCAN_ALL (0xFF) then a default filter will be used. Valid CpId
|
Operation results. Success or Failure
Host scan is allowed only in idle or connected state. If MRF24W FW is in the midst of connection ( or reconnection) process, then host scan can hammer connection process, and furthermore it may cause fatal failure in MRF24W FW operation. To use host scan, we strongly recommend the user to disable MRF24W FW connection manager by enabling #define DISABLE_MODULE_FW_CONNECT_MANAGER_IN_INFRASTRUCTURE in WF_Config.h