1.2.3 Client - BSS Find APIs
The application can use this interface to request a scan for local BSSs. Once requested, the device will conduct the search using the configured search parameters and report the results back to the application one BSS at a time. This interface can be used in either a callback mode, a polled mode, or a combination of both callback and polled depending on how the application wishes to receive the BSS information.
How a scan is conducted depends on the parameters and channel lists provided by the application?
The channels which can be scanned may be set by calling
WDRV_PIC32MZW_BSSFindSetEnabledChannels24.
When an application wishes to begin a scan operation it must call WDRV_PIC32MZW_BSSFindFirst. It is possible to request a scan on only a single channel or on all channels enabled by calling WDRV_PIC32MZW_BSSFindSetEnabledChannels. The scan can be performed using active mode (where probe requests are transmitted) or passive mode (where beacons are listened for).
WDRV_PIC32MZW_BSSFindFirst takes an optional callback function to use for notifying the application when the scan operation is complete, and the first result is available. If this isn’t provided, the application can poll this interface using WDRV_PIC32MZW_BSSFindInProgress to determine if the device is still scanning.