Hi
I am running softap and I am trying to implement a special protocol and parts of it implies that I need to listen for a Vendor Specific Action frame. Is the only way to enable sniffer mode?
Sniffer mode seems very unconvenient and power hungry so I would like to avoid it if possible.
Since the packet is directed to my esp32 I would think that there should be some kind of callback I could use to get the data. Is there such a callback or is sniffer mode my only option?
Kind regards
Jens
Receive Vendor Specific Action frame without enabling sniffer mode
Re: Receive Vendor Specific Action frame without enabling sniffer mode
And even sniffer mode does not seem to be sufficient. I can see the Action Frame in Wireshark but I cannot receive them in sniffer mode with the esp32... Can this be a bug?
This is how I set up sniffer mode:
Here is a dump from Wireshark on one of the action frames I do not see in sniffer mode
This is how I set up sniffer mode:
Code: Select all
void wifi_init_sniffer(void) {
const wifi_promiscuous_filter_t filt = {
.filter_mask = WIFI_EVENT_MASK_ALL
};
ESP_ERROR_CHECK(esp_wifi_set_promiscuous_filter(&filt));
ESP_ERROR_CHECK(esp_wifi_set_promiscuous_rx_cb(wifi_sniffer_packet_handler));
ESP_ERROR_CHECK(esp_wifi_set_promiscuous(true));
}
Code: Select all
IEEE 802.11 wireless LAN management frame
Fixed parameters (12 bytes)
Timestamp: 0x000000000c6892a1
Beacon Interval: 0.102400 [Seconds]
Capabilities Information: 0x0431
.... .... .... ...1 = ESS capabilities: Transmitter is an AP
.... .... .... ..0. = IBSS status: Transmitter belongs to a BSS
.... ..0. .... 00.. = CFP participation capabilities: No point coordinator at AP (0x0000)
.... .... ...1 .... = Privacy: AP/STA can support WEP
.... .... ..1. .... = Short Preamble: Allowed
.... .... .0.. .... = PBCC: Not Allowed
.... .... 0... .... = Channel Agility: Not in use
.... ...0 .... .... = Spectrum Management: Not Implemented
.... .1.. .... .... = Short Slot Time: In use
.... 0... .... .... = Automatic Power Save Delivery: Not Implemented
...0 .... .... .... = Radio Measurement: Not Implemented
..0. .... .... .... = DSSS-OFDM: Not Allowed
.0.. .... .... .... = Delayed Block Ack: Not Implemented
0... .... .... .... = Immediate Block Ack: Not Implemented
Tagged parameters (239 bytes)
Tag: SSID parameter set: DIRECT-XX-deadlock
Tag Number: SSID parameter set (0)
Tag length: 20
SSID: DIRECT-XX-deadlock
Tag: Supported Rates 5.5(B), 11(B), 1(B), 2(B), 6, 12, 24, 48, [Mbit/sec]
Tag Number: Supported Rates (1)
Tag length: 8
Supported Rates: 5.5(B) (0x8b)
Supported Rates: 11(B) (0x96)
Supported Rates: 1(B) (0x82)
Supported Rates: 2(B) (0x84)
Supported Rates: 6 (0x0c)
Supported Rates: 12 (0x18)
Supported Rates: 24 (0x30)
Supported Rates: 48 (0x60)
Tag: DS Parameter set: Current Channel: 1
Tag Number: DS Parameter set (3)
Tag length: 1
Current Channel: 1
Tag: Traffic Indication Map (TIM): DTIM 0 of 0 bitmap
Tag Number: Traffic Indication Map (TIM) (5)
Tag length: 6
DTIM count: 0
DTIM period: 2
Bitmap control: 0x00
.... ...0 = Multicast: False
0000 000. = Bitmap Offset: 0x00
Partial Virtual Bitmap: 000000
Tag: Country Information: Country Code CN, Environment Any
Tag Number: Country Information (7)
Tag length: 6
Code: CN
Environment: Any (0x20)
Country Info: First Channel Number: 1, Number of Channels: 13, Maximum Transmit Power Level: 20 dBm
First Channel Number: 1
Number of Channels: 13
Maximum Transmit Power Level (in dBm): 20
Tag: ERP Information
Tag Number: ERP Information (42)
Tag length: 1
ERP Information: 0x00
.... ...0 = Non ERP Present: Not set
.... ..0. = Use Protection: Not set
.... .0.. = Barker Preamble Mode: Not set
0000 0... = Reserved: 0x00
Tag: Extended Supported Rates 54, 9, 18, 36, [Mbit/sec]
Tag Number: Extended Supported Rates (50)
Tag length: 4
Extended Supported Rates: 54 (0x6c)
Extended Supported Rates: 9 (0x12)
Extended Supported Rates: 18 (0x24)
Extended Supported Rates: 36 (0x48)
Tag: RSN Information
Tag Number: RSN Information (48)
Tag length: 24
RSN Version: 1
Group Cipher Suite: 00-0f-ac TKIP
Group Cipher Suite OUI: 00-0f-ac
Group Cipher Suite type: TKIP (2)
Pairwise Cipher Suite Count: 2
Pairwise Cipher Suite List 00-0f-ac AES (CCM) 00-0f-ac TKIP
Pairwise Cipher Suite: 00-0f-ac AES (CCM)
Pairwise Cipher Suite OUI: 00-0f-ac
Pairwise Cipher Suite type: AES (CCM) (4)
Pairwise Cipher Suite: 00-0f-ac TKIP
Pairwise Cipher Suite OUI: 00-0f-ac
Pairwise Cipher Suite type: TKIP (2)
Auth Key Management (AKM) Suite Count: 1
Auth Key Management (AKM) List 00-0f-ac PSK
Auth Key Management (AKM) Suite: 00-0f-ac PSK
Auth Key Management (AKM) OUI: 00-0f-ac
Auth Key Management (AKM) type: PSK (2)
RSN Capabilities: 0x0000
.... .... .... ...0 = RSN Pre-Auth capabilities: Transmitter does not support pre-authentication
.... .... .... ..0. = RSN No Pairwise capabilities: Transmitter can support WEP default key 0 simultaneously with Pairwise key
.... .... .... 00.. = RSN PTKSA Replay Counter capabilities: 1 replay counter per PTKSA/GTKSA/STAKeySA (0x0000)
.... .... ..00 .... = RSN GTKSA Replay Counter capabilities: 1 replay counter per PTKSA/GTKSA/STAKeySA (0x0000)
.... .... .0.. .... = Management Frame Protection Required: False
.... .... 0... .... = Management Frame Protection Capable: False
.... ...0 .... .... = Joint Multi-band RSNA: False
.... ..0. .... .... = PeerKey Enabled: False
Tag: Vendor Specific: 00:50:f2: WPA Information Element
Tag Number: Vendor Specific (221)
Tag length: 26
OUI: 00-50-f2
Vendor Specific OUI Type: 1
Type: WPA Information Element (0x01)
WPA Version: 1
Multicast Cipher Suite: 00-50-f2 TKIP
Multicast Cipher Suite OUI: 00-50-f2
Multicast Cipher Suite type: TKIP (2)
Unicast Cipher Suite Count: 2
Unicast Cipher Suite List 00-50-f2 AES (CCM) 00-50-f2 TKIP
Unicast Cipher Suite: 00-50-f2 AES (CCM)
Unicast Cipher Suite OUI: 00-50-f2
Unicast Cipher Suite type: AES (CCM) (4)
Unicast Cipher Suite: 00-50-f2 TKIP
Unicast Cipher Suite OUI: 00-50-f2
Unicast Cipher Suite type: TKIP (2)
Auth Key Management (AKM) Suite Count: 1
Auth Key Management (AKM) List 00-50-f2 PSK
Auth Key Management (AKM) Suite: 00-50-f2 PSK
Auth Key Management (AKM) OUI: 00-50-f2
Auth Key Management (AKM) type: PSK (2)
Tag: HT Capabilities (802.11n D1.10)
Tag Number: HT Capabilities (802.11n D1.10) (45)
Tag length: 26
HT Capabilities Info: 0x116e
.... .... .... ...0 = HT LDPC coding capability: Transmitter does not support receiving LDPC coded packets
.... .... .... ..1. = HT Support channel width: Transmitter supports 20MHz and 40MHz operation
.... .... .... 11.. = HT SM Power Save: SM Power Save disabled (0x0003)
.... .... ...0 .... = HT Green Field: Transmitter is not able to receive PPDUs with Green Field (GF) preamble
.... .... ..1. .... = HT Short GI for 20MHz: Supported
.... .... .1.. .... = HT Short GI for 40MHz: Supported
.... .... 0... .... = HT Tx STBC: Not supported
.... ..01 .... .... = HT Rx STBC: Rx support of one spatial stream (0x0001)
.... .0.. .... .... = HT Delayed Block ACK: Transmitter does not support HT-Delayed BlockAck
.... 0... .... .... = HT Max A-MSDU length: 3839 bytes
...1 .... .... .... = HT DSSS/CCK mode in 40MHz: Will/Can use DSSS/CCK in 40 MHz
..0. .... .... .... = HT PSMP Support: Won't/Can't support PSMP operation
.0.. .... .... .... = HT Forty MHz Intolerant: Use of 40 MHz transmissions unrestricted/allowed
0... .... .... .... = HT L-SIG TXOP Protection support: Not supported
A-MPDU Parameters: 0x00
.... ..00 = Maximum Rx A-MPDU Length: 0x00 (8191[Bytes])
...0 00.. = MPDU Density: no restriction (0x00)
000. .... = Reserved: 0x00
Rx Supported Modulation and Coding Scheme Set: MCS Set
Rx Modulation and Coding Scheme (One bit per modulation): 1 spatial stream
.... .... .... .... .... .... 1111 1111 = Rx Bitmask Bits 0-7: 0x000000ff
.... .... .... .... 0000 0000 .... .... = Rx Bitmask Bits 8-15: 0x00000000
.... .... 0000 0000 .... .... .... .... = Rx Bitmask Bits 16-23: 0x00000000
0000 0000 .... .... .... .... .... .... = Rx Bitmask Bits 24-31: 0x00000000
.... .... .... .... .... .... .... ...0 = Rx Bitmask Bit 32: 0x00000000
.... .... .... .... .... .... .000 000. = Rx Bitmask Bits 33-38: 0x00000000
.... .... ...0 0000 0000 0000 0... .... = Rx Bitmask Bits 39-52: 0x00000000
...0 0000 0000 0000 0000 0000 000. .... = Rx Bitmask Bits 53-76: 0x00000000
.... ..00 0000 0000 = Highest Supported Data Rate: 0x0000
.... .... .... ...1 = Tx Supported MCS Set: Defined
.... .... .... ..0. = Tx and Rx MCS Set: Equal
.... .... .... 00.. = Maximum Number of Tx Spatial Streams Supported: 0x0000, 1 spatial stream
.... .... ...0 .... = Unequal Modulation: Not supported
HT Extended Capabilities: 0x0000
.... .... .... ...0 = Transmitter supports PCO: Not supported
.... .... .... .00. = Time needed to transition between 20MHz and 40MHz: No Transition (0x0000)
.... ..00 .... .... = MCS Feedback capability: STA does not provide MCS feedback (0x0000)
.... .0.. .... .... = High Throughput: Not supported
.... 0... .... .... = Reverse Direction Responder: Not supported
Transmit Beam Forming (TxBF) Capabilities: 0x00000000
.... .... .... .... .... .... .... ...0 = Transmit Beamforming: Not supported
.... .... .... .... .... .... .... ..0. = Receive Staggered Sounding: Not supported
.... .... .... .... .... .... .... .0.. = Transmit Staggered Sounding: Not supported
.... .... .... .... .... .... .... 0... = Receive Null Data packet (NDP): Not supported
.... .... .... .... .... .... ...0 .... = Transmit Null Data packet (NDP): Not supported
.... .... .... .... .... .... ..0. .... = Implicit TxBF capable: Not supported
.... .... .... .... .... .... 00.. .... = Calibration: incapable (0x00000000)
.... .... .... .... .... ...0 .... .... = STA can apply TxBF using CSI explicit feedback: Not supported
.... .... .... .... .... ..0. .... .... = STA can apply TxBF using uncompressed beamforming feedback matrix: Not supported
.... .... .... .... .... .0.. .... .... = STA can apply TxBF using compressed beamforming feedback matrix: Not supported
.... .... .... .... ...0 0... .... .... = Receiver can return explicit CSI feedback: not supported (0x00000000)
.... .... .... .... .00. .... .... .... = Receiver can return explicit uncompressed Beamforming Feedback Matrix: not supported (0x00000000)
.... .... .... ...0 0... .... .... .... = STA can compress and use compressed Beamforming Feedback Matrix: not supported (0x00000000)
.... .... .... .00. .... .... .... .... = Minimal grouping used for explicit feedback reports: No grouping supported (0x00000000)
.... .... ...0 0... .... .... .... .... = Max antennae STA can support when CSI feedback required: 1 TX antenna sounding (0x00000000)
.... .... .00. .... .... .... .... .... = Max antennae STA can support when uncompressed Beamforming feedback required: 1 TX antenna sounding (0x00000000)
.... ...0 0... .... .... .... .... .... = Max antennae STA can support when compressed Beamforming feedback required: 1 TX antenna sounding (0x00000000)
.... .00. .... .... .... .... .... .... = Maximum number of rows of CSI explicit feedback: 1 row of CSI (0x00000000)
...0 0... .... .... .... .... .... .... = Maximum number of space time streams for which channel dimensions can be simultaneously estimated: 1 space time stream (0x00000000)
000. .... .... .... .... .... .... .... = Reserved: 0x00000000
Antenna Selection (ASEL) Capabilities: 0x00
.... ...0 = Antenna Selection Capable: Not supported
.... ..0. = Explicit CSI Feedback Based Tx ASEL: Not supported
.... .0.. = Antenna Indices Feedback Based Tx ASEL: Not supported
.... 0... = Explicit CSI Feedback: Not supported
...0 .... = Antenna Indices Feedback: Not supported
..0. .... = Rx ASEL: Not supported
.0.. .... = Tx Sounding PPDUs: Not supported
0... .... = Reserved: 0x00
Tag: HT Information (802.11n D1.10)
Tag Number: HT Information (802.11n D1.10) (61)
Tag length: 22
Primary Channel: 1
HT Information Subset (1 of 3): 0x05
.... ..01 = Secondary channel offset: Secondary channel is above the primary channel (0x01)
.... .1.. = Supported channel width: Channel of any width supported
.... 0... = Reduced Interframe Spacing (RIFS): Prohibited
...0 .... = Power Save Multi-Poll (PSMP) stations only: Association requests are accepted regardless of PSMP capability
000. .... = Shortest service interval: 5 ms (0x00)
HT Information Subset (2 of 3): 0x0000
.... .... .... ..00 = Operating mode of BSS: All STAs are - 20/40 MHz HT or in a 20/40 MHz BSS or are 20 MHz HT in a 20 MHz BSS (0x0000)
.... .... .... .0.. = Non-greenfield STAs present: All associated STAs are greenfield capable
.... .... .... 0... = Transmit burst limit: No limit
.... .... ...0 .... = OBSS non-HT STAs present: Use of protection for non-HT STAs by overlapping BSSs is not needed
0000 0000 000. .... = Reserved: 0x0000
HT Information Subset (3 of 3): 0x0000
.... .... ..00 0000 = Reserved: 0x0000
.... .... .0.. .... = Dual beacon: No second beacon is transmitted
.... .... 0... .... = Dual Clear To Send (CTS) protection: Not required
.... ...0 .... .... = Beacon ID: Primary beacon
.... ..0. .... .... = L-SIG TXOP Protection Full Support: One or more HT STAs in the BSS do not support L-SIG TXOP protection
.... .0.. .... .... = Phased Coexistence Operation (PCO): Inactive
.... 0... .... .... = Phased Coexistence Operation (PCO) Phase: Switch to or continue 20 MHz phase
0000 .... .... .... = Reserved: 0x0000
Rx Supported Modulation and Coding Scheme Set: Basic MCS Set
Rx Modulation and Coding Scheme (One bit per modulation): Reserved:8
.... .... .... .... .... .... 0000 0000 = Rx Bitmask Bits 0-7: 0x00000000
.... .... .... .... 0000 0000 .... .... = Rx Bitmask Bits 8-15: 0x00000000
.... .... 0000 0000 .... .... .... .... = Rx Bitmask Bits 16-23: 0x00000000
0000 0000 .... .... .... .... .... .... = Rx Bitmask Bits 24-31: 0x00000000
.... .... .... .... .... .... .... ...0 = Rx Bitmask Bit 32: 0x00000000
.... .... .... .... .... .... .000 000. = Rx Bitmask Bits 33-38: 0x00000000
.... .... ...0 0000 0000 0000 0... .... = Rx Bitmask Bits 39-52: 0x00000000
...0 0000 0000 0000 0000 0000 000. .... = Rx Bitmask Bits 53-76: 0x00000000
.... ..00 0000 0000 = Highest Supported Data Rate: 0x0000
.... .... .... ...0 = Tx Supported MCS Set: Not defined
.... .... .... ..0. = Tx and Rx MCS Set: Equal
.... .... .... 00.. = Maximum Number of Tx Spatial Streams Supported: 0x0000, TX MCS Set Not Defined
.... .... ...0 .... = Unequal Modulation: Not supported
Tag: Vendor Specific: 00:50:f2: WMM/WME: Parameter Element
Tag Number: Vendor Specific (221)
Tag length: 24
OUI: 00-50-f2
Vendor Specific OUI Type: 2
Type: WMM/WME (0x02)
WME Subtype: Parameter Element (1)
WME Version: 1
WME QoS Info: 0x04
0... .... = U-APSD: Disabled
.... 0100 = Parameter Set Count: 0x04
.000 .... = Reserved: 0x00
Reserved: 00
Ac Parameters ACI 0 (Best Effort), ACM no, AIFSN 3, ECWmin 4, ECWmax 10, TXOP 0
ACI / AIFSN Field: 0x03
.00. .... = ACI: Best Effort (0)
...0 .... = Admission Control Mandatory: No
.... 0011 = AIFSN: 3
0... .... = Reserved: 0
ECW: 0xa4
1010 .... = ECW Max: 10
.... 0100 = ECW Min: 4
TXOP Limit: 0
Ac Parameters ACI 1 (Background), ACM no, AIFSN 7, ECWmin 4, ECWmax 10, TXOP 0
ACI / AIFSN Field: 0x27
.01. .... = ACI: Background (1)
...0 .... = Admission Control Mandatory: No
.... 0111 = AIFSN: 7
0... .... = Reserved: 0
ECW: 0xa4
1010 .... = ECW Max: 10
.... 0100 = ECW Min: 4
TXOP Limit: 0
Ac Parameters ACI 2 (Video), ACM no, AIFSN 2, ECWmin 3, ECWmax 4, TXOP 94
ACI / AIFSN Field: 0x42
.10. .... = ACI: Video (2)
...0 .... = Admission Control Mandatory: No
.... 0010 = AIFSN: 2
0... .... = Reserved: 0
ECW: 0x43
0100 .... = ECW Max: 4
.... 0011 = ECW Min: 3
TXOP Limit: 94
Ac Parameters ACI 3 (Voice), ACM no, AIFSN 2, ECWmin 2, ECWmax 3, TXOP 47
ACI / AIFSN Field: 0x62
.11. .... = ACI: Voice (3)
...0 .... = Admission Control Mandatory: No
.... 0010 = AIFSN: 2
0... .... = Reserved: 0
ECW: 0x32
0011 .... = ECW Max: 3
.... 0010 = ECW Min: 2
TXOP Limit: 47
Tag: Vendor Specific: 50:6f:9a: P2P
Tag Number: Vendor Specific (221)
Tag length: 45
OUI: 50-6f-9a
Vendor Specific OUI Type: 9
P2P Capability: Device 0x25 Group 0x0
Attribute Type: P2P Capability (2)
Attribute Length: 2
Device Capability Bitmap: 0x25
.... ...1 = Service Discovery: 0x01
.... ..0. = P2P Client Discoverability: 0x00
.... .1.. = Concurrent Operation: 0x01
.... 0... = P2P Infrastructure Managed: 0x00
...0 .... = P2P Device Limit: 0x00
..1. .... = P2P Invitation Procedure: 0x01
Group Capability Bitmap: 0x00
.... ...0 = P2P Group Owner: 0x00
.... ..0. = Persistent P2P Group: 0x00
.... .0.. = P2P Group Limit: 0x00
.... 0... = Intra-BSS Distribution: 0x00
...0 .... = Cross Connection: 0x00
..0. .... = Persistent Reconnect: 0x00
.0.. .... = Group Formation: 0x00
P2P Device Info
Attribute Type: P2P Device Info (13)
Attribute Length: 33
P2P Device address: 94:b9:7e:6b:70:69
Config Methods: 0x0188
.... .... .... ...0 = USBA (Flash Drive): 0x0000
.... .... .... ..0. = Ethernet: 0x0000
.... .... .... .0.. = Label: 0x0000
.... .... .... 1... = Display: 0x0001
.... .... ...0 .... = External NFC Token: 0x0000
.... .... ..0. .... = Integrated NFC Token: 0x0000
.... .... .0.. .... = NFC Interface: 0x0000
.... .... 1... .... = PushButton: 0x0001
.... ...1 .... .... = Keypad: 0x0001
Primary Device Type: 00060050f2040001
Primary Device Type: Category: 6
Primary Device Type: OUI: 0050f204
Primary Device Type: Subcategory: 1
Number of Secondary Device Types: 0
Device Name attribute type: 0x1011
Device Name attribute length: 12
Device Name: amba-07aa9a9
Who is online
Users browsing this forum: ESP_Roland and 281 guests