Skip to content

Commit

Permalink
Merge pull request #567 from KipK/regulatorydomain
Browse files Browse the repository at this point in the history
change default "CN" country code to "world safe mode" ("01")
  • Loading branch information
jeremypoulter committed Mar 10, 2023
2 parents 518808d + c94b0ad commit 301f390
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/net_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#ifdef ESP32
#include <WiFi.h>
#include <esp_wifi.h>
#include <ESPmDNS.h> // Resolve URL for update server etc.
#elif defined(ESP8266)
#include <ESP8266WiFi.h>
Expand Down Expand Up @@ -92,7 +93,8 @@ void NetManagerTask::wifiStartAccessPoint()
WiFi.enableAP(true);
WiFi.enableSTA(true); // Needed for scanning
WiFi.softAPConfig(_apIP, _apIP, _apNetMask);

// set country code to "world safe mode"
esp_wifi_set_country_code("01", true);
// Create Unique SSID e.g "emonESP_XXXXXX"
String softAP_ssid_ID =
String(_softAP_ssid) + "_" + ESPAL.getShortId();
Expand Down

0 comments on commit 301f390

Please sign in to comment.