WF_Scan Function

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
WF_Scan Function
C
UINT16 WF_Scan(
    UINT8 CpId
);
Description

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:

  1. Calling WF_Scan() again (after scan results returned from previous call).
  2. MRF24W reset.

 

MRF24WB0M & MRF24WG0M support up to max of 60 scan results (SSIDs).

Preconditions

MACInit must be called first.

Parameters
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
  • If CP has a defined SSID only scan results with that SSID are retained.
  • If CP does not have a defined SSID then all scanned SSID’s will be retained
  • Only scan results from Infrastructure or AdHoc networks are retained, depending on the value of networkType in the Connection Profile
  • The channel list that is scanned will be determined from channelList in the Connection Algorithm (which must be defined before calling this function).


CpId is equal to WF_SCAN_ALL

  • All scan results are retained (both Infrastructure and Ad Hoc networks).
  • All channels within the MRF24W’s regional domain will be scanned.
  • No Connection Profiles need to be defined before calling this function.
  • The Connection Algorithm does not need to be defined before calling this function.

 

Returns

Operation results. Success or Failure

Remarks

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

Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.