mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-25 01:37:22 +00:00
Merge branch 'doc/wifi_channel_state_information' into 'master'
add document of channel state information See merge request idf/esp-idf!2468
This commit is contained in:
@@ -981,7 +981,7 @@ esp_err_t esp_wifi_80211_tx(wifi_interface_t ifx, const void *buffer, int len, b
|
||||
* Each time a CSI data is received, the callback function will be called.
|
||||
*
|
||||
* @param ctx context argument, passed to esp_wifi_set_csi_rx_cb() when registering callback function.
|
||||
* @param data CSI data received.
|
||||
* @param data CSI data received. The memory that it points to will be deallocated after callback function returns.
|
||||
*
|
||||
*/
|
||||
typedef void (* wifi_csi_cb_t)(void *ctx, wifi_csi_info_t *data);
|
||||
|
@@ -97,8 +97,8 @@ typedef enum {
|
||||
|
||||
typedef enum {
|
||||
WIFI_SECOND_CHAN_NONE = 0, /**< the channel width is HT20 */
|
||||
WIFI_SECOND_CHAN_ABOVE, /**< the channel width is HT40 and the second channel is above the primary channel */
|
||||
WIFI_SECOND_CHAN_BELOW, /**< the channel width is HT40 and the second channel is below the primary channel */
|
||||
WIFI_SECOND_CHAN_ABOVE, /**< the channel width is HT40 and the secondary channel is above the primary channel */
|
||||
WIFI_SECOND_CHAN_BELOW, /**< the channel width is HT40 and the secondary channel is below the primary channel */
|
||||
} wifi_second_chan_t;
|
||||
|
||||
typedef enum {
|
||||
@@ -155,7 +155,7 @@ typedef struct {
|
||||
uint8_t bssid[6]; /**< MAC address of AP */
|
||||
uint8_t ssid[33]; /**< SSID of AP */
|
||||
uint8_t primary; /**< channel of AP */
|
||||
wifi_second_chan_t second; /**< second channel of AP */
|
||||
wifi_second_chan_t second; /**< secondary channel of AP */
|
||||
int8_t rssi; /**< signal strength of AP */
|
||||
wifi_auth_mode_t authmode; /**< authmode of AP */
|
||||
wifi_cipher_type_t pairwise_cipher; /**< pairwise cipher of AP */
|
||||
@@ -304,33 +304,33 @@ typedef struct {
|
||||
|
||||
/** @brief Received packet radio metadata header, this is the common header at the beginning of all promiscuous mode RX callback buffers */
|
||||
typedef struct {
|
||||
signed rssi:8; /**< signal intensity of packet */
|
||||
unsigned rate:5; /**< data rate */
|
||||
unsigned :1; /**< reserve */
|
||||
unsigned sig_mode:2; /**< 0:is not 11n packet; 1:is 11n packet */
|
||||
unsigned :16; /**< reserve */
|
||||
unsigned mcs:7; /**< if is 11n packet, shows the modulation(range from 0 to 76) */
|
||||
unsigned cwb:1; /**< if is 11n packet, shows if is HT40 packet or not */
|
||||
unsigned :16; /**< reserve */
|
||||
unsigned smoothing:1; /**< reserve */
|
||||
unsigned not_sounding:1; /**< reserve */
|
||||
unsigned :1; /**< reserve */
|
||||
unsigned aggregation:1; /**< Aggregation */
|
||||
unsigned stbc:2; /**< STBC */
|
||||
unsigned fec_coding:1; /**< Flag is set for 11n packets which are LDPC */
|
||||
unsigned sgi:1; /**< SGI */
|
||||
signed noise_floor:8; /**< noise floor */
|
||||
unsigned ampdu_cnt:8; /**< ampdu cnt */
|
||||
unsigned channel:4; /**< which primary channel this packet in */
|
||||
unsigned second_channel:4;/**< which second channel this packet in */
|
||||
unsigned :8; /**< reserve */
|
||||
unsigned timestamp:32; /**< timestamp, unit: microsecond */
|
||||
unsigned :32; /**< reserve */
|
||||
unsigned :31; /**< reserve */
|
||||
unsigned ant:1; /**< antenna number from which this packet is received */
|
||||
unsigned sig_len:12; /**< length of packet */
|
||||
unsigned :12; /**< reserve */
|
||||
unsigned rx_state:8; /**< rx state */
|
||||
signed rssi:8; /**< Received Signal Strength Indicator(RSSI) of packet. unit: dBm */
|
||||
unsigned rate:5; /**< PHY rate encoding of the packet. Only valid for non HT(11bg) packet */
|
||||
unsigned :1; /**< reserve */
|
||||
unsigned sig_mode:2; /**< 0: non HT(11bg) packet; 1: HT(11n) packet; 3: VHT(11ac) packet */
|
||||
unsigned :16; /**< reserve */
|
||||
unsigned mcs:7; /**< Modulation Coding Scheme. If is HT(11n) packet, shows the modulation, range from 0 to 76(MSC0 ~ MCS76) */
|
||||
unsigned cwb:1; /**< if is HT(11n) packet, shows if is HT40 packet or HT20 packet. 1: HT40 packet; 0: HT20 packet */
|
||||
unsigned :16; /**< reserve */
|
||||
unsigned smoothing:1; /**< reserve */
|
||||
unsigned not_sounding:1; /**< reserve */
|
||||
unsigned :1; /**< reserve */
|
||||
unsigned aggregation:1; /**< Aggregation. 0: MPDU packet; 1: AMPDU packet */
|
||||
unsigned stbc:2; /**< Space Time Block Code(STBC). 0: non STBC packet; 1: STBC packet */
|
||||
unsigned fec_coding:1; /**< Flag is set for 11n packets which are LDPC */
|
||||
unsigned sgi:1; /**< Short Guide Interval(SGI). 0: Long GI; 1: Short GI */
|
||||
signed noise_floor:8; /**< noise floor of Radio Frequency Module(RF). unit: 0.25dBm*/
|
||||
unsigned ampdu_cnt:8; /**< ampdu cnt */
|
||||
unsigned channel:4; /**< primary channel on which this packet is received */
|
||||
unsigned secondary_channel:4; /**< secondary channel on which this packet is received. 0: none; 1: above; 2: below */
|
||||
unsigned :8; /**< reserve */
|
||||
unsigned timestamp:32; /**< timestamp. The local time when this packet is received. It is precise only if modem sleep or light sleep is not enabled. unit: microsecond */
|
||||
unsigned :32; /**< reserve */
|
||||
unsigned :31; /**< reserve */
|
||||
unsigned ant:1; /**< antenna number from which this packet is received. 0: WiFi antenna 0; 1: WiFi antenna 1 */
|
||||
unsigned sig_len:12; /**< length of packet including Frame Check Sequence(FCS) */
|
||||
unsigned :12; /**< reserve */
|
||||
unsigned rx_state:8; /**< state of the packet. 0: no error; others: error numbers which are not public */
|
||||
} wifi_pkt_rx_ctrl_t;
|
||||
|
||||
/** @brief Payload passed to 'buf' parameter of promiscuous mode RX callback.
|
||||
@@ -387,10 +387,10 @@ typedef struct {
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
bool lltf_en; /**< enable to receive legacy long training field(lltf) data */
|
||||
bool htltf_en; /**< enable to receive HT long training field(htltf) data */
|
||||
bool stbcltf2_en; /**< enable to receive space time block code long training field(stbcltf2) data */
|
||||
bool manu_scale; /**< manually scale the CSI data by left shifting or automatically scale the CSI data. If set true, please set the shift bits. false: automatically. true: manually */
|
||||
bool lltf_en; /**< enable to receive legacy long training field(lltf) data. Default enabled */
|
||||
bool htltf_en; /**< enable to receive HT long training field(htltf) data. Default enabled */
|
||||
bool stbc_htltf2_en; /**< enable to receive space time block code HT long training field(stbc-htltf2) data. Default enabled */
|
||||
bool manu_scale; /**< manually scale the CSI data by left shifting or automatically scale the CSI data. If set true, please set the shift bits. false: automatically. true: manually. Default false */
|
||||
uint8_t shift; /**< manually left shift bits of the scale of the CSI data. The range of the left shift bits is 0~15 */
|
||||
} wifi_csi_config_t;
|
||||
|
||||
|
Reference in New Issue
Block a user