Page 1 of 1

WIFI-SNIFFER EXAMPLE ON ESP SDK

Posted: Tue May 19, 2015 6:01 pm
by bonchenko
Hi, anybody tried the wifi-sniffer example on ESP SDK 0.9.5? I compiled and flashed the fw to my ESP-01 but I cannot see any packet being sniffed. This is the UART output,

Image

Also, after several minutes, it will behave strangely - wdt triggered but not restarted.

Anybody successful in trying this example? The code also seems correct according to SDK doc, it got sniffing rx callback that is supposed to be called when a packet is received/sniffed

Re: WIFI-SNIFFER EXAMPLE ON ESP SDK

Posted: Tue May 19, 2015 6:04 pm
by ESP_Faye
Hi,

Here is a sniffer demo for the latest SDK_v1.0.1 ,please have a try.

Re: WIFI-SNIFFER EXAMPLE ON ESP SDK

Posted: Wed May 20, 2015 4:06 pm
by bonchenko
Hi there. I tried your code and use SDK v1.01, but still not entering the sniffer rx promiscuous callback. Then I change the mode to station mode, previously you use stationap mode ( wifi_set_opmode(STATION_MODE); ) and now I can get the packet :D :D

One more thing, can I get the IP adress and MAC address of the packet sender?

Re: WIFI-SNIFFER EXAMPLE ON ESP SDK

Posted: Mon Jun 15, 2015 2:23 pm
by nissimzur
I look for the MAC too. We hope that Espressif_Faye will see this and reply.
Bonchenko please call my Skype skype:nissim.test and we can share research and reply here results.
-Nissim

Re: WIFI-SNIFFER EXAMPLE ON ESP SDK

Posted: Wed Jun 17, 2015 10:20 am
by ESP_Faye
Hi,

IP address and MAC address of the packet sender can not be got in sniffer now.

Sorry for the inconvenience.

Re: WIFI-SNIFFER EXAMPLE ON ESP SDK

Posted: Thu Jun 18, 2015 2:03 am
by kissste
MAC Addresses are available in the MAC Header.

google: 802.11 packet format

Image

There are Address 1, 2 and 3 which are populated based on Frame Control - 'DS From'/'DS To' bits

Re: WIFI-SNIFFER EXAMPLE ON ESP SDK

Posted: Thu Jun 18, 2015 2:18 pm
by nissimzur
Did you mean that MAC address of the packet sender can be extracted from the sniffer demo ?

Espressif_Faye : if the sniffer demo can’t do it, which demo apps can do it ? (detection all MAC Smartphone, as station, around looking for gateway to connect)

…Without the sender MAC, all sniffer application is useless. The main idea of sniffer is to recognize “who is around” and what it send,index by MAC of course