I can execute the command for esp_err_t esp_wifi_set_country(const wifi_country_t *country)
I have set the country to "US" with out getting an error.
I can not execute the command esp_err_t esp_wifi_get_country(const wifi_country_t *country)
country variable type I use is char*.
Are there any examples of retrieving the country code using the Arduino IDE?
I always get errors trying to get the country code
How to use: esp_wifi_get_country(wifi_country_t *country)
-
- Posts: 17
- Joined: Mon Nov 30, 2015 12:58 pm
Re: How to use: esp_wifi_get_country(wifi_country_t *country)
Try something like this.
Code: Select all
wifi_country_t myCountry;
if(esp_wifi_get_country(&myCountry) == ESP_OK){
Serial.print("Country Code: ");
Serial.println(myCountry.cc);
}
-
- Posts: 17
- Joined: Mon Nov 30, 2015 12:58 pm
Re: How to use: esp_wifi_get_country(wifi_country_t *country)
Thank you boarchuz, got it working now.
Who is online
Users browsing this forum: No registered users and 86 guests