What is strange is that when the system restarts, it will typically work the next time.
I'm working with the Nodemcu LUA firmware (I'm one of the contributors) so there isn't a simple reproduction. The particular code that sets up the promiscuous mode is
Code: Select all
wifi_station_set_auto_connect(0);
os_delay_us(1000);
wifi_set_opmode_current(1);
os_delay_us(1000);
wifi_promiscuous_enable(0);
os_delay_us(1000);
wifi_station_disconnect();
os_delay_us(1000);
wifi_set_promiscuous_rx_cb(wifi_rx_cb);
wifi_set_channel(1);
wifi_promiscuous_enable(1);
I added the os_delay_us calls just in case it would help, but it didn't seem to make any difference.
Two questions:
1) Has anybody else seen this failure?
2) Does the above look like a reasonable sequence to get into promiscuous monitor mode?
Thanks
Philip