Espressif ESP8266 Technical Reference page 91

Hide thumbs Also See for ESP8266:
Table of Contents

Advertisement

!
};
struct sniffer_buf2{
struct RxControl rx_ctrl;
u8 buf[112];
u16 cnt;
u16 len;
};
Callback wifi_promiscuous_rx has two parameters (buf and len). len means the
length of buf, it can be: len = 128, len = X * 10, len = 12:
Case of LEN == 128
buf contains structure sniffer_buf2: it is the management packet, it has 112
Bytes data.
sniffer_buf2.cnt is 1.
sniffer_buf2.len is the length of packet.
Case of LEN == X * 10
buf contains structure sniffer_buf: this structure is reliable, data packets
represented by it has been verified by CRC.
sniffer_buf.cnt means the count of packets in buf. The value of len depends
on sniffer_buf.cnt.
- sniffer_buf.cnt==0, invalid buf; otherwise, len = 50 + cnt * 10
sniffer_buf.buf contains the first 36 Bytes of IEEE80211 packet. Starting from
sniffer_buf.lenseq[0], each structure lenseq represent a length information of
packet. lenseq[0] represents the length of first packet. If there are two packets
where (sniffer_buf.cnt == 2), lenseq[1] represents the length of second
packet.
If sniffer_buf.cnt > 1, it is a AMPDU packet, head of each MPDU packets are
similar, so we only provide the length of each packet (from head of MAC packet to
FCS)
This structure contains: length of packet, MAC address of both sides of
communication, length of the head of packet.
Case of LEN == 12
buf contains structure RxControl; but this structure is not reliable, we can not get
neither MAC address of both sides of communication nor length of the head of
packet.
For AMPDU packet, we can not get the count of packets or the length of packet.
This structure contains: length of packet, rssi and FEC_CODING.
Espressif
//length of packet
82 86
!
/!
14. Sniffer Introduction
2016.05

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP8266 and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF