Closed danricho closed 5 years ago
ElegantOTA doesn't handle networking part. You can modify WiFi settings according to your need.. In your case:
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ElegantOTA.h>
ESP8266WebServer server(80);
void setup(void) {
Serial.begin(115200);
WiFi.mode(WIFI_AP);
WiFi.softAP("ElegantOTADevice", "");
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
server.on("/", []() {
server.send(200, "text/plain", "Hi! I am ESP8266.");
});
ElegantOTA.begin(&server); // Start ElegantOTA
server.begin();
Serial.println("HTTP server started");
}
void loop(void) {
server.handleClient();
}
If this could provide an AP mode initially to allow a user to set the Wifi credentials and .bin path, this firmware would be great to flash to an ESP prior to soldering (via a programming jig).