esp8266 работает с одновременно с двумя сетями . Почему?
const char* ssid = "name";
const char* password = "pas";
IPAddress ip(192,168,1,4); //статический IP
IPAddress gateway(192,168,1,1);
IPAddress subnet(255,255,255,0);
ESP8266WebServer server(80);
String s;
void setup() {
SPIFFS.begin();
Serial.begin(115200);
byte attempts = 0;
/////////////////////////////////////////////////////////////////////////////////////////////////////
WiFi.disconnect(true);
WiFi.begin(ssid, password);
WiFi.config(ip, gateway, subnet);
Serial.println(WiFi.status());
delay(2500);
while (WiFi.status() != WL_CONNECTED)
{
attempts++;
delay(1000);
Serial.print(" .");
if (attempts > 5)
{
delay(500);
WiFi.disconnect(true);
delay(500);
WiFi.softAP("ESP8266", "12345678");
Serial.println(WiFi.softAPIP());
delay(500);
break;
}
}
const char* ssid = "name";
const char* password = "pas";
IPAddress ip(192,168,1,4); //статический IP
IPAddress gateway(192,168,1,1);
IPAddress subnet(255,255,255,0);
ESP8266WebServer server(80);
String s;
void setup() {
SPIFFS.begin();
Serial.begin(115200);
byte attempts = 0;
/////////////////////////////////////////////////////////////////////////////////////////////////////
WiFi.disconnect(true);
WiFi.begin(ssid, password);
WiFi.config(ip, gateway, subnet);
Serial.println(WiFi.status());
delay(2500);
while (WiFi.status() != WL_CONNECTED)
{
attempts++;
delay(1000);
Serial.print(" .");
if (attempts > 5)
{
delay(500);
WiFi.disconnect(true);
delay(500);
WiFi.softAP("ESP8266", "12345678");
Serial.println(WiFi.softAPIP());
delay(500);
break;
}
}