diff --git a/ESP32-IDF_ESPNOW-Receiver/main/receiver.c b/ESP32-IDF_ESPNOW-Receiver/main/receiver.c index d4ac997dc..a8ad53343 100644 --- a/ESP32-IDF_ESPNOW-Receiver/main/receiver.c +++ b/ESP32-IDF_ESPNOW-Receiver/main/receiver.c @@ -19,6 +19,9 @@ static sensors_data_t buf; /* WiFi should start before using ESPNOW */ void wifi_init() { + /* + * STAND-ALONE ESP-NOW + */ ESP_ERROR_CHECK(esp_netif_init()); ESP_ERROR_CHECK(esp_event_loop_create_default()); wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); @@ -27,9 +30,9 @@ void wifi_init() ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA));//ESPNOW_WIFI_MODE)); ESP_ERROR_CHECK( esp_wifi_start()); ESP_ERROR_CHECK( esp_wifi_set_channel(CONFIG_ESPNOW_CHANNEL, WIFI_SECOND_CHAN_NONE)); - //#if CONFIG_ESPNOW_ENABLE_LONG_RANGE + #if CONFIG_ESPNOW_ENABLE_LONG_RANGE ESP_ERROR_CHECK( esp_wifi_set_protocol(ESPNOW_WIFI_IF, WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_LR) ); - //#endif + #endif } void transmission_init() {