mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/espnow_config_channel_v4.2' into 'release/v4.2'
esp_wifi: fix espnow example add peer fail when config channel(v4.2) See merge request espressif/esp-idf!23181
This commit is contained in:
commit
f06c39e9a6
@ -50,6 +50,7 @@ static void example_wifi_init(void)
|
|||||||
ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) );
|
ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) );
|
||||||
ESP_ERROR_CHECK( esp_wifi_set_mode(ESPNOW_WIFI_MODE) );
|
ESP_ERROR_CHECK( esp_wifi_set_mode(ESPNOW_WIFI_MODE) );
|
||||||
ESP_ERROR_CHECK( esp_wifi_start());
|
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) );
|
ESP_ERROR_CHECK( esp_wifi_set_protocol(ESPNOW_WIFI_IF, WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_LR) );
|
||||||
|
Loading…
Reference in New Issue
Block a user