lriot 2.1.0.0
|
Wi-Fi passive scan driver types for LR1110. More...
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | lr1110_wifi_fcs_info_byte_s |
Wi-Fi FCS info byte. More... | |
struct | lr1110_wifi_cumulative_timings_s |
Cumulative timings. More... | |
struct | lr1110_wifi_basic_complete_result_s |
Basic complete result structure. More... | |
struct | lr1110_wifi_basic_mac_type_channel_result_s |
Basic MAC, type, channel result structure. More... | |
struct | lr1110_wifi_extended_full_result_t |
Extended full result structure. More... | |
struct | lr1110_wifi_country_code_s |
Wi-Fi country code structure. More... | |
struct | lr1110_wifi_version_s |
Wi-Fi firmware version. More... | |
Typedefs | |
typedef uint16_t | lr1110_wifi_channel_mask_t |
Type to store a Wi-Fi channel mask. | |
typedef uint8_t | lr1110_wifi_channel_info_byte_t |
Type to store a Wi-Fi channel info byte. | |
typedef uint8_t | lr1110_wifi_datarate_info_byte_t |
Type to store a Wi-Fi datarate info byte. | |
typedef uint8_t | lr1110_wifi_frame_type_info_byte_t |
Type to store a Wi-Fi frame type info byte. | |
typedef uint8_t | lr1110_wifi_frame_sub_type_t |
Type to store a Wi-Fi frame sub_type. | |
typedef struct lr1110_wifi_fcs_info_byte_s | lr1110_wifi_fcs_info_byte_t |
Wi-Fi FCS info byte. | |
typedef uint8_t | lr1110_wifi_mac_address_t[LR1110_WIFI_MAC_ADDRESS_LENGTH] |
Type to store a MAC address. | |
typedef struct lr1110_wifi_cumulative_timings_s | lr1110_wifi_cumulative_timings_t |
Cumulative timings. | |
typedef struct lr1110_wifi_basic_complete_result_s | lr1110_wifi_basic_complete_result_t |
Basic complete result structure. | |
typedef struct lr1110_wifi_basic_mac_type_channel_result_s | lr1110_wifi_basic_mac_type_channel_result_t |
Basic MAC, type, channel result structure. | |
typedef struct lr1110_wifi_country_code_s | lr1110_wifi_country_code_t |
Wi-Fi country code structure. | |
typedef struct lr1110_wifi_version_s | lr1110_wifi_version_t |
Wi-Fi firmware version. | |
Wi-Fi passive scan driver types for LR1110.
The Clear BSD License Copyright Semtech Corporation 2021. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define LR1110_WIFI_CHANNEL_10_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_10_POS ) |
#define LR1110_WIFI_CHANNEL_10_POS ( 9U ) |
Channel at frequency 2.457 GHz.
#define LR1110_WIFI_CHANNEL_11_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_11_POS ) |
#define LR1110_WIFI_CHANNEL_11_POS ( 10U ) |
Channel at frequency 2.462 GHz.
#define LR1110_WIFI_CHANNEL_12_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_12_POS ) |
#define LR1110_WIFI_CHANNEL_12_POS ( 11U ) |
Channel at frequency 2.467 GHz.
#define LR1110_WIFI_CHANNEL_13_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_13_POS ) |
#define LR1110_WIFI_CHANNEL_13_POS ( 12U ) |
Channel at frequency 2.472 GHz.
#define LR1110_WIFI_CHANNEL_14_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_14_POS ) |
#define LR1110_WIFI_CHANNEL_14_POS ( 13U ) |
Channel at frequency 2.484 GHz.
#define LR1110_WIFI_CHANNEL_1_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_1_POS ) |
#define LR1110_WIFI_CHANNEL_1_POS ( 0U ) |
Channel at frequency 2.412 GHz.
#define LR1110_WIFI_CHANNEL_2_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_2_POS ) |
#define LR1110_WIFI_CHANNEL_2_POS ( 1U ) |
Channel at frequency 2.417 GHz.
#define LR1110_WIFI_CHANNEL_3_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_3_POS ) |
#define LR1110_WIFI_CHANNEL_3_POS ( 2U ) |
Channel at frequency 2.422 GHz.
#define LR1110_WIFI_CHANNEL_4_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_4_POS ) |
#define LR1110_WIFI_CHANNEL_4_POS ( 3U ) |
Channel at frequency 2.427 GHz.
#define LR1110_WIFI_CHANNEL_5_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_5_POS ) |
#define LR1110_WIFI_CHANNEL_5_POS ( 4U ) |
Channel at frequency 2.432 GHz.
#define LR1110_WIFI_CHANNEL_6_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_6_POS ) |
#define LR1110_WIFI_CHANNEL_6_POS ( 5U ) |
Channel at frequency 2.437 GHz.
#define LR1110_WIFI_CHANNEL_7_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_7_POS ) |
#define LR1110_WIFI_CHANNEL_7_POS ( 6U ) |
Channel at frequency 2.442 GHz.
#define LR1110_WIFI_CHANNEL_8_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_8_POS ) |
#define LR1110_WIFI_CHANNEL_8_POS ( 7U ) |
Channel at frequency 2.447 GHz.
#define LR1110_WIFI_CHANNEL_9_MASK ( 0x01UL << LR1110_WIFI_CHANNEL_9_POS ) |
#define LR1110_WIFI_CHANNEL_9_POS ( 8U ) |
Channel at frequency 2.452 GHz.
#define LR1110_WIFI_MAC_ADDRESS_LENGTH ( 6 ) |
#define LR1110_WIFI_MAX_COUNTRY_CODE ( 16 ) |
#define LR1110_WIFI_MAX_RESULTS ( 10 ) |
#define LR1110_WIFI_RESULT_SSID_LENGTH ( 32 ) |
#define LR1110_WIFI_STR_COUNTRY_CODE_SIZE ( 2 ) |
Basic complete result structure.
The beacon period is expressed in TU (Time Unit). 1 TU is 1024 microseconds.
typedef struct lr1110_wifi_basic_mac_type_channel_result_s lr1110_wifi_basic_mac_type_channel_result_t |
Basic MAC, type, channel result structure.
typedef uint8_t lr1110_wifi_channel_info_byte_t |
Type to store a Wi-Fi channel info byte.
typedef uint16_t lr1110_wifi_channel_mask_t |
Type to store a Wi-Fi channel mask.
typedef struct lr1110_wifi_country_code_s lr1110_wifi_country_code_t |
Wi-Fi country code structure.
typedef struct lr1110_wifi_cumulative_timings_s lr1110_wifi_cumulative_timings_t |
Cumulative timings.
This structure is representing the cumulative time spent in the different modes of Wi-Fi passive scanning procedure. All timings are provided in [us].
typedef uint8_t lr1110_wifi_datarate_info_byte_t |
Type to store a Wi-Fi datarate info byte.
typedef struct lr1110_wifi_fcs_info_byte_s lr1110_wifi_fcs_info_byte_t |
Wi-Fi FCS info byte.
typedef uint8_t lr1110_wifi_frame_sub_type_t |
Type to store a Wi-Fi frame sub_type.
typedef uint8_t lr1110_wifi_frame_type_info_byte_t |
Type to store a Wi-Fi frame type info byte.
typedef uint8_t lr1110_wifi_mac_address_t[LR1110_WIFI_MAC_ADDRESS_LENGTH] |
Type to store a MAC address.
typedef struct lr1110_wifi_version_s lr1110_wifi_version_t |
Wi-Fi firmware version.
Wi-Fi Channels index.
WiFi theoretical Datarates.
The WiFi MAC address origin.
enum lr1110_wifi_mode_t |
Wi-Fi capture mode.
The result type available depends on the Wi-Fi capture mode selected when calling the Wi-Fi scan API as follows:
Scan Mode | Type/Sub-type selected | Corresponding read result function | ||
---|---|---|---|---|
LR1110_WIFI_SCAN_MODE_BEACON | Management/Beacon and Management/Probe Response | lr1110_wifi_read_basic_complete_results, lr1110_wifi_read_basic_mac_type_channel_results | ||
LR1110_WIFI_SCAN_MODE_BEACON_AND_PKT | Some from Management, Control and Data Types | |||
LR1110_WIFI_SCAN_MODE_FULL_BEACON | Management/Beacon and Management/Probe Response | lr1110_wifi_read_extended_full_results LR1110_WIFI_SCAN_MODE_UNTIL_SSID | Management/Beacon and Management/Probe Response - until SSID field | lr1110_wifi_read_extended_full_results |
When the LR1110 receives a Wi-Fi frame, it starts demodulating it. Depending on the scan mode selected, only some Wi-Fi frame type/sub-types are to be kept. The demodulation step is stopped as soon as the LR1110 detects the current Wi-Fi frame is not of the required type/sub-types. This saves scan time and consumption.
A Wi-Fi frame is never completely demodulated. The LR1110_WIFI_SCAN_MODE_FULL_BEACON uses a special configuration allowing to demodulate more fields (until Frame Check Sequence field), at a price of higher scan duration and higher consumption.
Wi-Fi signal type for passive scanning configuration.
Note it is not possible to configure the WiFi passive scanning to search Wi-Fi type N GreenField. Only Wi-Fi type N Mixed Mode can be scanned by LR1110.
Enumerator | |
---|---|
LR1110_WIFI_TYPE_SCAN_B | Wi-Fi B. |
LR1110_WIFI_TYPE_SCAN_G | Wi-Fi G. |
LR1110_WIFI_TYPE_SCAN_N | Wi-Fi N. |
LR1110_WIFI_TYPE_SCAN_B_G_N | Wi-Fi B and Wi-Fi G/N. |