diff --git a/libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino b/libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino index 4e3b78d5a..427e2afbd 100644 --- a/libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino +++ b/libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino @@ -26,6 +26,10 @@ void setup() { Serial.print("Connecting to "); Serial.println(ssid); + /* Explicitly set the ESP8266 to be a WiFi-client, otherwise, it by default, + would try to act as both a client and an access-point and could cause + network-issues with your other WiFi-devices on your WiFi-network. */ + WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { diff --git a/libraries/ESP8266WiFi/examples/WiFiClientEvents/WiFiClientEvents.ino b/libraries/ESP8266WiFi/examples/WiFiClientEvents/WiFiClientEvents.ino index bdad5be30..249e896e9 100644 --- a/libraries/ESP8266WiFi/examples/WiFiClientEvents/WiFiClientEvents.ino +++ b/libraries/ESP8266WiFi/examples/WiFiClientEvents/WiFiClientEvents.ino @@ -34,6 +34,10 @@ void setup() { WiFi.onEvent(WiFiEvent); + /* Explicitly set the ESP8266 to be a WiFi-client, otherwise, it by default, + would try to act as both a client and an access-point and could cause + network-issues with your other WiFi-devices on your WiFi-network. */ + WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); Serial.println();