WiFi Packet Capture Using Sniffer in ESP32

rajvrk36@gmail.com
Posts: 18
Joined: Fri May 28, 2021 10:58 am

WiFi Packet Capture Using Sniffer in ESP32

Postby rajvrk36@gmail.com » Thu Jul 22, 2021 2:08 pm

Hello,

Hardware specification: ESP32 Dev kit (Wroom).
And using ESP-MDF.

Details:

1. In promiscuous mode, the data sniffed will have a structure of header and payload.
2. If you extract this payload, you will get the WiFi data frame. This in turn have a header and payload.
3. If you extract this payload, you will get the ESP-Mesh packet. This is basically your WIFI IEEE80211 PACKET-NETWORK DATA This will
also have a header and payload which is created by ESP-MDF.
4. Our interest is this ESP-MESH header which will have the initial source MAC and final destination MAC address
So once you are able to read WIFI IEEE80211 PACKET-NETWORK DATA it will contain the ESP-MESH header.

Question:

1. Is the above understanding is correct?
2. How to decode/extract payload(PACKET-NETWORK DATA) to readable format?

Thanks for the answers :)

Best,
Rajkumar

prateekn9
Posts: 4
Joined: Mon Feb 22, 2021 11:38 am

Re: WiFi Packet Capture Using Sniffer in ESP32

Postby prateekn9 » Fri Jul 23, 2021 5:30 am

Hi,

Your understanding is correct to extract that information you can create your own struct by looking into 802.11 standard as per your desired frame.
Take a look at this one, this repo can help you:
https://github.com/skywa04885/esp32-pac ... eee80211.h

rajvrk36@gmail.com
Posts: 18
Joined: Fri May 28, 2021 10:58 am

Re: WiFi Packet Capture Using Sniffer in ESP32

Postby rajvrk36@gmail.com » Wed Jul 28, 2021 2:12 pm

Hi prateekn9,

Thank you so much for the answer. We will try it out. Fingers crossed! And also some other solutions are welcomed.

Who is online

Users browsing this forum: No registered users and 122 guests