Hey everybody,
could sombebody help me out with the following problem.
I would like
- To open an WiFi-AccessPoint with my NodeMCU ESP8266
- Enter my home SSID + password
- Safe this so later without changing something in the code my microcontroller could log data over the entnered SSID + password WIfi Station
The problem is. I can run the Access Point
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
/* Set these to your desired credentials. */
const char *ssid = "ESPap";
const char *password = "thereisnospoon";
ESP8266WebServer server(80);
/* Just a little test message. Go to http://192.168.4.1 in a web browser
* connected to this access point to see it.
*/
void handleRoot() {
server.send(200, "text/html", "<h1>You are connected</h1>");
}
void setup() {
delay(1000);
Serial.begin(115200);
Serial.println();
Serial.print("Configuring access point...");
/* You can remove the password parameter if you want the AP to be open. */
WiFi.softAP(ssid, password);
IPAddress myIP = WiFi.softAPIP();
Serial.print("AP IP address: ");
Serial.println(myIP);
server.on("/", handleRoot);
server.begin();
Serial.println("HTTP server started");
}
void loop() {
server.handleClient();
}
But how can I enter an inputbox is this http ?
How can the inputbox enry be safed and later be used.
Is this all happening in the setup section ?
The loop section is my data checking and logging right ?
That´s how I did it without Wifi Access Point.
#include <ESP8266WiFi.h>
String deviceId = "v2BF998C4A53E641";
String deviceIdE = "v22A9CF37D02083B";
const char* logServer = "api.pushingbox.com";
//const char* ssid = "Brni";
//const char* password = "9897";
Cheers and Thanks for any help