BT/WiFi coex fix needed for IDF4.1

This commit is contained in:
cyberman54 2021-03-06 16:20:26 +01:00
parent 6b3e8d00c2
commit dceab074ca

View File

@ -83,6 +83,11 @@ void wifi_sniffer_init(void) {
void switch_wifi_sniffer(uint8_t state) {
if (state) {
// start sniffer
#if (BLECOUNTER)
// workaround needed for IDF 4.1
// see https://github.com/espressif/esp-idf/issues/5427
esp_wifi_set_ps(WIFI_PS_MIN_MODEM);
#endif
esp_wifi_start();
esp_wifi_set_promiscuous(true);
esp_wifi_set_channel(WIFI_CHANNEL_MIN, WIFI_SECOND_CHAN_NONE);