Hi all,
I’m trying BlynkProvisioning for the first time.
My plan is to keep hardcoded the Authtoken, Host and Port, and just look for the SSID and Password.
I’m playing just with the Template_ESP8266,ino example.
It worked like a charm the first time I compiled the example and loaded it to the ESP8266.
And to try it again, I turned off the my Wifi, hoping that the ESP8266 would convert in AP as the first time.
But, surprisingly, it just try to reconect the same network I configured the first time again and again.
It doesn’t enter in AP mode again to enter a new SSID and Password.
It’s the way it works?
I just modified the following lines in ConfigMode.h:
const char* config_form = R"html(
<!DOCTYPE HTML><html>
<form method='get' action='config'>
<label>WiFi SSID: </label><input type="text" name="ssid" length=32 required="required"><br/>
<label>Password: </label><input type="text" name="pass" length=32><br/>
// <label>Auth token:</label><input type="text" name="blynk" placeholder="a0b1c2d..." pattern="[a-zA-Z0-9]{32}" maxlength="32" required="required"><br/>
// <label>Host: </label><input type="text" name="host" length=32><br/>
// <label>Port: </label><input type="number" name="port" value="8442" min="1" max="65535"><br/>
<input type='submit' value="Apply">
</form>
</html>
)html";
and
String ssid = server.arg("ssid");
String ssidManual = server.arg("ssidManual");
String pass = server.arg("pass");
if (ssidManual != "") {
ssid = ssidManual;
}
// String token = server.arg("blynk");
// String host = server.arg("host");
// String port = server.arg("port");
String token = "a20e960XXX9046f4bffXXXXX1381fbe0"; /some Xs to hide the real token
String host = "blynk-cloud.com";
String port = "8442";
String content;
unsigned statusCode;