[GH-ISSUE #1567] DFRobot FireBeetle 2 (ESP32-E) Unable to compile - esp_wifi_set_country_code not declared #1337

Closed
opened 2026-02-28 01:29:39 +03:00 by kerem · 1 comment
Owner

Originally created by @Astaroth368 on GitHub (Feb 24, 2023).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1567

Basic Infos

Hardware

WiFimanager Branch/Release: Master (Installed via Arduino Library Manager)

Esp32: ESP32-WROOM-32E

Hardware: DFRobot Firebeetle 2 ( https://wiki.dfrobot.com/FireBeetle_Board_ESP32_E_SKU_DFR0654 )

Description

I'm unable to compile any of the WiFiManager example sketches. Even a blank sketch as below will fail to compile because 'esp_wifi_set_country_code' is not declared. I'm not sure why that would be missing from DFRobot's library (assuming that's where it should be), but I'm new to Arduino/ESP development and I'm not sure what to do to work around/resolve the issue. I've also installed Espressif's board libraries using this URL: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json but it includes ESP32, ESP32-S2, ESP32-S3 and ESP32-C3 (mine is ESP32-E) so I don't know what to do. I assume DFRobot say to install their library for a reason too, so don't know if using one from Espressif could cause another problem? (I imagine pin constants will be incorrect - D1, D2 etc.). Any help would be appreciated.

Settings in IDE

IDE: Arduino IDE 2.0.3
Board Manager URL: http://download.dfrobot.top/FireBeetle/package_DFRobot_index.json
Board Selected: FireBeetle ESP32-E

Additional libraries: None

Sketch

#include <WiFiManager.h>

void setup() {

}

void loop() {

}

Debug Messages

d:\Users\...\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp: In member function 'bool WiFiManager::WiFiSetCountry()':
d:\Users\...\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:3531:11: error: 'esp_wifi_set_country_code' was not declared in this scope
     err = esp_wifi_set_country_code(_wificountry.c_str(), true);
           ^~~~~~~~~~~~~~~~~~~~~~~~~
d:\Users\...\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:3531:11: note: suggested alternative: 'esp_wifi_set_country'
     err = esp_wifi_set_country_code(_wificountry.c_str(), true);
           ^~~~~~~~~~~~~~~~~~~~~~~~~
           esp_wifi_set_country

exit status 1

Compilation error: exit status 1
Originally created by @Astaroth368 on GitHub (Feb 24, 2023). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1567 ### Basic Infos #### Hardware WiFimanager Branch/Release: Master (Installed via Arduino Library Manager) Esp32: ESP32-WROOM-32E Hardware: DFRobot Firebeetle 2 ( https://wiki.dfrobot.com/FireBeetle_Board_ESP32_E_SKU_DFR0654 ) ### Description I'm unable to compile any of the WiFiManager example sketches. Even a blank sketch as below will fail to compile because 'esp_wifi_set_country_code' is not declared. I'm not sure why that would be missing from DFRobot's library (assuming that's where it should be), but I'm new to Arduino/ESP development and I'm not sure what to do to work around/resolve the issue. I've also installed Espressif's board libraries using this URL: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json but it includes ESP32, ESP32-S2, ESP32-S3 and ESP32-C3 (mine is ESP32-E) so I don't know what to do. I assume DFRobot say to install their library for a reason too, so don't know if using one from Espressif could cause another problem? (I imagine pin constants will be incorrect - D1, D2 etc.). Any help would be appreciated. ### Settings in IDE IDE: Arduino IDE 2.0.3 Board Manager URL: http://download.dfrobot.top/FireBeetle/package_DFRobot_index.json Board Selected: FireBeetle ESP32-E Additional libraries: None ### Sketch ```cpp #include <WiFiManager.h> void setup() { } void loop() { } ``` ### Debug Messages ``` d:\Users\...\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp: In member function 'bool WiFiManager::WiFiSetCountry()': d:\Users\...\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:3531:11: error: 'esp_wifi_set_country_code' was not declared in this scope err = esp_wifi_set_country_code(_wificountry.c_str(), true); ^~~~~~~~~~~~~~~~~~~~~~~~~ d:\Users\...\Documents\Arduino\libraries\WiFiManager\WiFiManager.cpp:3531:11: note: suggested alternative: 'esp_wifi_set_country' err = esp_wifi_set_country_code(_wificountry.c_str(), true); ^~~~~~~~~~~~~~~~~~~~~~~~~ esp_wifi_set_country exit status 1 Compilation error: exit status 1 ```
kerem closed this issue 2026-02-28 01:29:39 +03:00
Author
Owner

@tablatronix commented on GitHub (Feb 24, 2023):

your esp lib is old

<!-- gh-comment-id:1444046667 --> @tablatronix commented on GitHub (Feb 24, 2023): your esp lib is old
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1337
No description provided.