I didn't find much documentation about ESP promiscuous mode (just from the espressif sdk although I'm using ArduinoIDE https://docs.espressif.com/projects/esp8266-rtos-sdk/en/latest/api-reference/wifi/esp_wifi.html )
So from seeing some sample codes ( https://github.com/spacehuhn/ArduinoPcap/blob/master/examples/esp8266_pcap_serial/esp8266_pcap_serial.ino and https://www.youtube.com/watch?v=3Ac6X6ZBQ0g ) the esp8266 doesn't work properly for some people but for others (https://www.esp8266.com/viewtopic.php?t=12127) it seems to work properly, so I don't know if it's a hardware limitation.
I tried making a simple sketch to try it for my NodeMCU 0.9 and compared the packets from wireshark and I saw the majority of the packets come incomplete or with anomalies
#include <ESP8266WiFi.h>
#include <Arduino.h>
extern "C" {
#include <user_interface.h>
}
static void ICACHE_FLASH_ATTR handlePacket(unsigned char* buf, uint16_t len) {
for (int c=0; c < len; c++){
Serial.printf("%d:%d ", c, (int)buf[c]);
}
Serial.println();
}
void setup() {
Serial.begin(115200);
Serial. println();
wifi_set_opmode(STATION_MODE);
wifi_promiscuous_enable(0);
WiFi.disconnect();
wifi_set_promiscuous_rx_cb(handlePacket);
wifi_set_channel(6);
wifi_promiscuous_enable(1);
}
void loop(){}
From the example code that works, the guy seems to use esp8266 sdk, is the ArduinoIDE a limitation for this monitor mode thing?
https://bbs.espressif.com/viewtopic.php?t=3072
https://github.com/kieransimkin/esp8266-freedom