1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
void connectsoftAP() { IPAddress softLocal(192, 168, 128, 1); IPAddress softGateway(192, 168, 128, 1); IPAddress softSubnet(255, 255, 255, 0); WiFi.softAPConfig(softLocal, softGateway, softSubnet); String apName = ("ESP8266_" + (String)ESP.getChipId()); const char* softAPName = apName.c_str(); WiFi.softAP(softAPName, "adminadmin"); Serial.print("AP IP address: "); Serial.println(WiFi.localIP()); Serial.print("softAPName: "); Serial.println(apName); }
|