Blynk Provisioning. Once connected, It allways tries to reconnect the same SSID

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(
<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">


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  = "";
String port  = "8442";
String content;
unsigned statusCode;

Are you running Blynk Provisioning via My Apps? You basically have 2 options, static or dynamic provisioning.

There is a hardware reset button in the last tab to clear credentials from EEPROM. You can also use a Blynk button to clear credentials via software but you must remember to do it before you set off to your next AP site. Alternatively you have the credentials set to your phone’s 3G shared network and then you can change to a local AP at any time via software if you don’t want to use a hardware button.

We also did some experimenting with GitHub - datacute/DoubleResetDetector: Library to detect a double reset, using ESP8266 RTC User Memory but you have to be careful as part of the provisioning includes a coded double reset.

You shouldn’t have to do that.

1 Like

Facing the same issue. Is there a way to resolve it on the hardware itself?

What precisely is that?

After testing dynamic provisioning once, it keeps on trying to connect to the same ssid with the old auth code and hence shows an error for invalid auth code.

OK in the last tab of the provisioning it tells you which pin you need to set high / low to clear the credentials in the EEPROM which is not cleared by flashing a standard sketch.

Alternatively ask Google for an “ESP8266 EEPROM clearing” sketch. You will find one on my website.

Thanks Costas. I found a sketch online. It worked. :slight_smile: