lriot 2.1.0.0
lr1110_modem_wifi_types.h
Go to the documentation of this file.
1
32#ifndef LR1110_MODEM_WIFI_TYPES_H
33#define LR1110_MODEM_WIFI_TYPES_H
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39/*
40 * -----------------------------------------------------------------------------
41 * --- DEPENDENCIES ------------------------------------------------------------
42 */
43
44#include <stdbool.h>
45#include <stdint.h>
46
47/*
48 * -----------------------------------------------------------------------------
49 * --- PUBLIC MACROS -----------------------------------------------------------
50 */
51
52/*
53 * -----------------------------------------------------------------------------
54 * --- PUBLIC CONSTANTS --------------------------------------------------------
55 */
56
60#define LR1110_MODEM_WIFI_RESULT_SSID_LENGTH ( 32 )
61
65#define LR1110_MODEM_WIFI_MAX_RESULTS ( 32 )
66
70#define LR1110_MODEM_WIFI_MAC_ADDRESS_LENGTH ( 6 )
71
75#define LR1110_MODEM_WIFI_STR_COUNTRY_CODE_SIZE ( 2 )
76
77#define LR1110_MODEM_WIFI_CHANNEL_1_POS ( 0U )
78#define LR1110_MODEM_WIFI_CHANNEL_1_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_1_POS )
79#define LR1110_MODEM_WIFI_CHANNEL_2_POS ( 1U )
80#define LR1110_MODEM_WIFI_CHANNEL_2_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_2_POS )
81#define LR1110_MODEM_WIFI_CHANNEL_3_POS ( 2U )
82#define LR1110_MODEM_WIFI_CHANNEL_3_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_3_POS )
83#define LR1110_MODEM_WIFI_CHANNEL_4_POS ( 3U )
84#define LR1110_MODEM_WIFI_CHANNEL_4_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_4_POS )
85#define LR1110_MODEM_WIFI_CHANNEL_5_POS ( 4U )
86#define LR1110_MODEM_WIFI_CHANNEL_5_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_5_POS )
87#define LR1110_MODEM_WIFI_CHANNEL_6_POS ( 5U )
88#define LR1110_MODEM_WIFI_CHANNEL_6_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_6_POS )
89#define LR1110_MODEM_WIFI_CHANNEL_7_POS ( 6U )
90#define LR1110_MODEM_WIFI_CHANNEL_7_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_7_POS )
91#define LR1110_MODEM_WIFI_CHANNEL_8_POS ( 7U )
92#define LR1110_MODEM_WIFI_CHANNEL_8_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_8_POS )
93#define LR1110_MODEM_WIFI_CHANNEL_9_POS ( 8U )
94#define LR1110_MODEM_WIFI_CHANNEL_9_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_9_POS )
95#define LR1110_MODEM_WIFI_CHANNEL_10_POS ( 9U )
96#define LR1110_MODEM_WIFI_CHANNEL_10_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_10_POS )
97#define LR1110_MODEM_WIFI_CHANNEL_11_POS ( 10U )
98#define LR1110_MODEM_WIFI_CHANNEL_11_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_11_POS )
99#define LR1110_MODEM_WIFI_CHANNEL_12_POS ( 11U )
100#define LR1110_MODEM_WIFI_CHANNEL_12_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_12_POS )
101#define LR1110_MODEM_WIFI_CHANNEL_13_POS ( 12U )
102#define LR1110_MODEM_WIFI_CHANNEL_13_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_13_POS )
103#define LR1110_MODEM_WIFI_CHANNEL_14_POS ( 13U )
104#define LR1110_MODEM_WIFI_CHANNEL_14_MASK ( 0x01UL << LR1110_MODEM_WIFI_CHANNEL_14_POS )
105
106/*
107 * -----------------------------------------------------------------------------
108 * --- PUBLIC TYPES ------------------------------------------------------------
109 */
110
133
150
162
197
203
208
213
218
223
228
243
252
270
281
311
315typedef struct
316{
317 uint8_t major;
318 uint8_t minor;
320
321#ifdef __cplusplus
322}
323#endif
324
325#endif // LR1110_MODEM_WIFI_TYPES_H
326
327/* --- EOF ------------------------------------------------------------------ */
lr1110_modem_wifi_mode_t
Wi-Fi capture mode.
Definition lr1110_modem_wifi_types.h:186
@ LR1110_MODEM_WIFI_SCAN_MODE_BEACON_AND_PKT
Definition lr1110_modem_wifi_types.h:189
@ LR1110_MODEM_WIFI_SCAN_MODE_FULL_BEACON
Definition lr1110_modem_wifi_types.h:192
@ LR1110_MODEM_WIFI_SCAN_MODE_BEACON
Exposes Beacons and Probe Responses Access Points frames until Period Beacon field (Basic result)
Definition lr1110_modem_wifi_types.h:187
lr1110_modem_wifi_signal_type_scan_t
Wi-Fi signal type for passive scanning configuration.
Definition lr1110_modem_wifi_types.h:144
@ LR1110_MODEM_WIFI_TYPE_SCAN_N
WiFi N.
Definition lr1110_modem_wifi_types.h:147
@ LR1110_MODEM_WIFI_TYPE_SCAN_B
WiFi B.
Definition lr1110_modem_wifi_types.h:145
@ LR1110_MODEM_WIFI_TYPE_SCAN_G
WiFi G.
Definition lr1110_modem_wifi_types.h:146
@ LR1110_MODEM_WIFI_TYPE_SCAN_B_G_N
Scan WiFi B and WiFi G/N.
Definition lr1110_modem_wifi_types.h:148
lr1110_modem_wifi_result_format_t
Definition lr1110_modem_wifi_types.h:199
@ LR1110_MODEM_WIFI_RESULT_FORMAT_BASIC_MAC_TYPE_CHANNEL
Definition lr1110_modem_wifi_types.h:201
@ LR1110_MODEM_WIFI_RESULT_FORMAT_BASIC_COMPLETE
Definition lr1110_modem_wifi_types.h:200
#define LR1110_MODEM_WIFI_RESULT_SSID_LENGTH
Length of SSID field (in bytes)
Definition lr1110_modem_wifi_types.h:60
lr1110_modem_wifi_signal_type_result_t
Wi-Fi signal type for passive scan results.
Definition lr1110_modem_wifi_types.h:157
@ LR1110_MODEM_WIFI_TYPE_RESULT_N
WiFi N.
Definition lr1110_modem_wifi_types.h:160
@ LR1110_MODEM_WIFI_TYPE_RESULT_G
WiFi G.
Definition lr1110_modem_wifi_types.h:159
@ LR1110_MODEM_WIFI_TYPE_RESULT_B
WiFi B.
Definition lr1110_modem_wifi_types.h:158
struct lr1110_modem_wifi_fcs_info_byte_s lr1110_modem_wifi_fcs_info_byte_t
Wi-Fi FCS info byte.
uint8_t lr1110_modem_wifi_mac_address_t[LR1110_MODEM_WIFI_MAC_ADDRESS_LENGTH]
Type to store a MAC address.
Definition lr1110_modem_wifi_types.h:207
#define LR1110_MODEM_WIFI_MAC_ADDRESS_LENGTH
Length of MAC address field (in bytes)
Definition lr1110_modem_wifi_types.h:70
uint16_t lr1110_modem_wifi_channel_mask_t
Type for channel mask.
Definition lr1110_modem_wifi_types.h:227
uint8_t lr1110_modem_wifi_frame_type_info_byte_t
Type for frame type info byte.
Definition lr1110_modem_wifi_types.h:222
uint8_t lr1110_modem_wifi_datarate_info_byte_t
Type for datarate info byte.
Definition lr1110_modem_wifi_types.h:212
lr1110_modem_wifi_channel_t
Wi-Fi Channels index.
Definition lr1110_modem_wifi_types.h:115
@ LR1110_MODEM_WIFI_CHANNEL_3
Channel at frequency 2.422 GHz.
Definition lr1110_modem_wifi_types.h:119
@ LR1110_MODEM_WIFI_NO_CHANNEL
Definition lr1110_modem_wifi_types.h:116
@ LR1110_MODEM_WIFI_CHANNEL_9
Channel at frequency 2.452 GHz.
Definition lr1110_modem_wifi_types.h:125
@ LR1110_MODEM_WIFI_CHANNEL_5
Channel at frequency 2.432 GHz.
Definition lr1110_modem_wifi_types.h:121
@ LR1110_MODEM_WIFI_CHANNEL_4
Channel at frequency 2.427 GHz.
Definition lr1110_modem_wifi_types.h:120
@ LR1110_MODEM_WIFI_CHANNEL_13
Channel at frequency 2.472 GHz.
Definition lr1110_modem_wifi_types.h:129
@ LR1110_MODEM_WIFI_CHANNEL_10
Channel at frequency 2.457 GHz.
Definition lr1110_modem_wifi_types.h:126
@ LR1110_MODEM_WIFI_CHANNEL_11
Channel at frequency 2.462 GHz.
Definition lr1110_modem_wifi_types.h:127
@ LR1110_MODEM_WIFI_CHANNEL_8
Channel at frequency 2.447 GHz.
Definition lr1110_modem_wifi_types.h:124
@ LR1110_MODEM_WIFI_CHANNEL_2
Channel at frequency 2.417 GHz.
Definition lr1110_modem_wifi_types.h:118
@ LR1110_MODEM_WIFI_CHANNEL_1
Channel at frequency 2.412 GHz.
Definition lr1110_modem_wifi_types.h:117
@ LR1110_MODEM_WIFI_CHANNEL_7
Channel at frequency 2.442 GHz.
Definition lr1110_modem_wifi_types.h:123
@ LR1110_MODEM_WIFI_ALL_CHANNELS
Definition lr1110_modem_wifi_types.h:131
@ LR1110_MODEM_WIFI_CHANNEL_14
Channel at frequency 2.484 GHz.
Definition lr1110_modem_wifi_types.h:130
@ LR1110_MODEM_WIFI_CHANNEL_12
Channel at frequency 2.467 GHz.
Definition lr1110_modem_wifi_types.h:128
@ LR1110_MODEM_WIFI_CHANNEL_6
Channel at frequency 2.437 GHz.
Definition lr1110_modem_wifi_types.h:122
uint8_t lr1110_modem_wifi_channel_info_byte_t
Type for channel info byte.
Definition lr1110_modem_wifi_types.h:217
Basic complete result structure.
Definition lr1110_modem_wifi_types.h:259
uint16_t beacon_period_tu
Beacon period of the corresponding beacon received.
Definition lr1110_modem_wifi_types.h:268
int8_t rssi
RSSI of scanned signal.
Definition lr1110_modem_wifi_types.h:262
lr1110_modem_wifi_channel_info_byte_t channel_info_byte
Channel info byte.
Definition lr1110_modem_wifi_types.h:261
lr1110_modem_wifi_mac_address_t mac_address
MAC address.
Definition lr1110_modem_wifi_types.h:264
int16_t phi_offset
Phi offset.
Definition lr1110_modem_wifi_types.h:265
uint32_t timestamp_us_high
Indicate the up-time of the Access Point transmitting the Beacon [us] - upper 32bits.
Definition lr1110_modem_wifi_types.h:266
uint32_t timestamp_us_low
Indicate the up-time of the Access Point transmitting the Beacon [us] - lower 32bits.
Definition lr1110_modem_wifi_types.h:267
lr1110_modem_wifi_datarate_info_byte_t data_rate_info_byte
Datarate info byte.
Definition lr1110_modem_wifi_types.h:260
lr1110_modem_wifi_frame_type_info_byte_t frame_type_info_byte
Frame type info byte.
Definition lr1110_modem_wifi_types.h:263
Basic MAC, type, channel result structure.
Definition lr1110_modem_wifi_types.h:275
int8_t rssi
RSSI of scanned signal.
Definition lr1110_modem_wifi_types.h:278
lr1110_modem_wifi_channel_info_byte_t channel_info_byte
Channel info byte.
Definition lr1110_modem_wifi_types.h:277
lr1110_modem_wifi_mac_address_t mac_address
MAC address.
Definition lr1110_modem_wifi_types.h:279
lr1110_modem_wifi_datarate_info_byte_t data_rate_info_byte
Datarate info byte.
Definition lr1110_modem_wifi_types.h:276
Cumulative timings.
Definition lr1110_modem_wifi_types.h:236
uint32_t demodulation_us
Definition lr1110_modem_wifi_types.h:240
uint32_t rx_detection_us
Cumulative time spent during NFE or TOA.
Definition lr1110_modem_wifi_types.h:237
uint32_t rx_correlation_us
Cumulative time spent during preamble detection.
Definition lr1110_modem_wifi_types.h:238
uint32_t rx_capture_us
Cumulative time spent during signal acquisition.
Definition lr1110_modem_wifi_types.h:239
Extended full result structure.
Definition lr1110_modem_wifi_types.h:288
uint16_t beacon_period_tu
Definition lr1110_modem_wifi_types.h:301
uint8_t current_channel
Current channel indicated in the Wi-Fi frame.
Definition lr1110_modem_wifi_types.h:305
uint16_t length
Length of MPDU (in microseconds for WiFi B, bytes for WiFi G)
Definition lr1110_modem_wifi_types.h:294
int8_t rssi
RSSI of scanned signal.
Definition lr1110_modem_wifi_types.h:291
lr1110_modem_wifi_channel_info_byte_t channel_info_byte
Channel info byte.
Definition lr1110_modem_wifi_types.h:290
lr1110_modem_wifi_mac_address_t mac_address_1
First MAC address of the frame.
Definition lr1110_modem_wifi_types.h:296
uint8_t io_regulation
Input Output Regulation.
Definition lr1110_modem_wifi_types.h:307
uint16_t country_code
Country Code.
Definition lr1110_modem_wifi_types.h:306
uint16_t frame_control
Frame Control structure.
Definition lr1110_modem_wifi_types.h:295
uint16_t seq_control
Sequence Control value.
Definition lr1110_modem_wifi_types.h:302
uint8_t rate
Rate index.
Definition lr1110_modem_wifi_types.h:292
lr1110_modem_wifi_mac_address_t mac_address_3
Third MAC address of the frame.
Definition lr1110_modem_wifi_types.h:298
int16_t phi_offset
Phi offset.
Definition lr1110_modem_wifi_types.h:309
uint32_t timestamp_us_high
Indicate the up-time of the Access Point transmitting the Beacon [us] - upper 32bits.
Definition lr1110_modem_wifi_types.h:299
lr1110_modem_wifi_fcs_info_byte_t fcs_check_byte
Definition lr1110_modem_wifi_types.h:308
lr1110_modem_wifi_mac_address_t mac_address_2
Second MAC address of the frame.
Definition lr1110_modem_wifi_types.h:297
uint16_t service
Service value.
Definition lr1110_modem_wifi_types.h:293
uint32_t timestamp_us_low
Indicate the up-time of the Access Point transmitting the Beacon [us] - lower 32bits.
Definition lr1110_modem_wifi_types.h:300
lr1110_modem_wifi_datarate_info_byte_t data_rate_info_byte
Datarate info byte.
Definition lr1110_modem_wifi_types.h:289
Wi-Fi FCS info byte.
Definition lr1110_modem_wifi_types.h:248
bool is_fcs_ok
True if the LR1110 has checked the FCS and the check succeeded.
Definition lr1110_modem_wifi_types.h:249
bool is_fcs_checked
True if the LR1110 has checked the FCS.
Definition lr1110_modem_wifi_types.h:250
Wi-Fi version parameters.
Definition lr1110_modem_wifi_types.h:316
uint8_t major
Major version number.
Definition lr1110_modem_wifi_types.h:317
uint8_t minor
Minor version number.
Definition lr1110_modem_wifi_types.h:318