Wireless Network Scanner

The High MAC Framework can passively and actively scan wireless channels for 802.11 networks. Once configured and started, the network scanner will periodically tune to a different 802.11 wireless channel for a duration of time. After tuning to the a new channel, the framework will execute a callback so that the high MAC application can enqueue and transmit a Probe Request. The network scanner provides an automated way to populate the list of known wireless networks in the Network Information Tracker subsystem.

Network Scanner Parameters

The network scanner is configured by the following parameters in the scan_parameters_t structure:

Parameter Description
u32 time_per_channel_usec The duration (in microseconds) that the scanner will dwell on a given channel.
u32 probe_tx_interval_usec The interval (in microseconds) between calls to the high MAC application callback that is responsible for enqueuing and transmitting a probe request.
u8* channel_vec Pointer to an array of channel numbers over which the network scanner will iterate.
u32 channel_vec_len Length of the channel_vec array.

The current parameters being used by the network scanner can be retrieved by the following function call:

scan_parameters_t* wlan_mac_scan_get_parameters();

Example Usage

To begin a network scan over 2.4 GHz channels 1 through 11, the following code snippet can be used:

u8 channel_vec[] = {1,2,3,4,5,6,7,8,9,10,11};
scan_parameters_t* scan_parameters = wlan_mac_scan_get_parameters();

//Overwrite the default channel_vec with our own list of channels
scan_parameters->channel_vec = channel_vec;

//Start the scanner