Autoconnect Blynk (WifiManager Alternative) - ESP8266/ESP32

Wow! this Google search thingy is quite something!

Maybe one day it will catch on and everybody will be using it? :roll_eyes:



First of all, I thank you for sharing your work.

I can’t find example sketch in the attached file … what am I doing wrong?

I think you are using arduino IDE, i am using platformIO, its a VSCode extension for programming arduino devices.
If you wanna stick to arduino IDE , copy all the files in my attachment into a new folder, rename main.cpp to main.ino, open it with arduino IDE!

1 Like

i am trying to download your source code but i am not able to download them . i got exhausted and tried downloading through an android mobile , then found an read only document . so i typed the whole code in arduino ide as i do not know how to use an platformIO and got a hell a lot of error codes . as i am new to this topic i am not able to correct the error . is there any way to help me out with your code ? looking forward an positive response!!!@Nilava_Chowdhury

If you’re talking about the GitHub library then the “Clone or Download” button will allow you to download a .zip file.
You then import the .zip library into in the Arduino IDE.


no i am talking about the code posted by @Nilava_Chowdhury and it is not working at all !!! @PeteKnight

I tried to compile these sketch but got some errors:
What to do ??
Thank you for some hints.

sketch\webpages.h: In function ‘String saveDone(AutoConnectAux&, PageArgument&)’:
webpages.h:150:50: error: cannot convert ‘String’ to ‘AutoConnectAux*’ in initialization
AutoConnectAux* blynk_setting = portal.where();


,hi @DrDigital i tried your example, but i got this in serial monitor,

 Mounting FS...
Failed to read file, using default configuration
Valid config file.
Config read
Print config file after reading...
Failed to read file
APID : ESP-57f98
[AC] Element<caption1> not registered
[AC] caption1<8> of /Settings created
[AC] *noname placed on /Settings
[AC] caption1<8> of /Settings loaded
[AC] Element<caption2> not registered
[AC] caption2<8> of /Settings created
[AC] *noname placed on /Settings
[AC] caption2<8> of /Settings loaded
[AC] Element<blynkserver> not registered
[AC] blynkserver<4> of /Settings created
[AC] *noname placed on /Settings
[AC] blynkserver<4> of /Settings loaded
[AC] Element<blynkport> not registered
[AC] blynkport<4> of /Settings created
[AC] *noname placed on /Settings
[AC] blynkport<4> of /Settings loaded
[AC] Element<blynktoken> not registered
[AC] blynktoken<4> of /Settings created
[AC] *noname placed on /Settings
[AC] blynktoken<4> of /Settings loaded
[AC] Element<devicename> not registered
[AC] devicename<4> of /Settings created
[AC] *noname placed on /Settings
[AC] devicename<4> of /Settings loaded
[AC] Element<save> not registered
[AC] save<7> of /Settings created
[AC] *noname placed on /Settings
[AC] save<7> of /Settings loaded
[AC] Element<discard> not registered
[AC] discard<7> of /Settings created
[AC] *noname placed on /Settings
[AC] discard<7> of /Settings loaded
[AC] /Settings on hands
[AC] Element<caption> not registered
[AC] caption<8> of /savedone created
[AC] *noname placed on /savedone
[AC] caption<8> of /savedone loaded
[AC] Element<parameters> not registered
[AC] parameters<8> of /savedone created
[AC] *noname placed on /savedone
[AC] parameters<8> of /savedone loaded
[AC] Element<settings> not registered
[AC] settings<7> of /savedone created
[AC] *noname placed on /savedone
[AC] settings<7> of /savedone loaded
[AC] Element<clear> not registered
[AC] clear<7> of /savedone created
[AC] *noname placed on /savedone
[AC] clear<7> of /savedone loaded
[AC] /savedone on hands
[AC] Element<caption> not registered
[AC] caption<8> of /discard created
[AC] *noname placed on /discard
[AC] caption<8> of /discard loaded
[AC] Element<settings> not registered
[AC] settings<7> of /discard created
[AC] *noname placed on /discard
[AC] settings<7> of /discard loaded
[AC] /discard on hands
[AC] SoftAP configure,, 

Exception (28):
epc1=0x4021fa08 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont 
sp: 3fff22e0 end: 3fff24f0 offset: 01a0

3fff2480:  3fff0a54 3fff0b40 3fff1404 402094f0  
3fff2490:  40208ec4 00000000 4021f0bc 4021f09c  
3fff24a0:  00000000 00000000 00000000 00000000  
3fff24b0:  00000000 00000000 feefeffe feefeffe  
3fff24c0:  feefeffe feefeffe feefeffe 3fff14c4  
3fff24d0:  3fffdad0 00000000 3fff14bd 4021dfdc  
3fff24e0:  feefeffe feefeffe 3fff14d0 40100710  

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d

Is this really the result of running code from @DrDigital?
Personally, I’d guess that it is the example sketch from @Nilava_Chowdhury.

Did you use the Arduino IDE to compile and upload the code? If so, what upload settings did you use, and which board are you using?


Hi there, not sure you are running my code. The snippet I gave above is not complete and is just an example to give you an idea of how I use it. More than happy to help if you give more info.

1 Like

@Nilava_Chowdhury hi
I just tried you example today but I need to know what I should write in “declarations.h” (the Format)

// ==========================================
// All Blynk settings goes in here
// ==========================================

//Config Blynk structure
struct BlynkConfig {
  String devicename;
  String blynkServer;
  String blynkPort;
  String blynkToken;

const char *fileName = "/config.txt";  // filename of config file.
BlynkConfig blynkconfig;                   // global configuration object

int port;
IPAddress ip;

I am using “” and port 80

I’ve not tried this software library, but I did have a quick look at the code.
My thoughts are this is where you define the custom fields that will appear in the captive portal, so in this case there would be fields allowing you to input a device name (presumably for OTA) and the Blynk server, port and Auth code.

So, as the OP said, this SHOULD work as it stands and you’ll then get captive portal fields to allow you to add your Blynk related credentials.

As I said, I’ve not tried it.


Good morning @PeteKnight
as you know I am not a coder
after compiling the sketch I am receiving this error

In file included from C:\Users\------------\main.ino:19:0:
sketch\webpages.h: In function 'String saveDone(AutoConnectAux&, PageArgument&)':
webpages.h:150: error: cannot convert 'String' to 'AutoConnectAux*' in initialization
   AutoConnectAux*   blynk_setting = portal.where();

exit status 1
cannot convert 'String' to 'AutoConnectAux*' in initialization

I really don’t know what I am missing.

same error was posted here by @Brummer but no reply from @Nilava_Chowdhury

Not sure. As I said, I’ve never tried the software.
If I get chance I’ll give it a try later, but I’m quite busy at the moment :slightly_smiling_face:

The OP was last seen on 22nd April.


I installed the libraries and tried to compile the code and get exactly the same error message.


Sorry guys, i had been busy with my exams, i tried out the code, the issue is with the latest library, i need to make changes for the latest library, in the mean time you guys can try with arduino json v5 and it should work perfect!
@PeteKnight @Ze_Pico

Arduino Json V6 causes another error message. Downgrading to v5 eliminates that message, but then results in this compiler error:

error: cannot convert ‘String’ to ‘AutoConnectAux*’ in initialization
AutoConnectAux* blynk_setting = portal.where();


Use AutoConnect library version 0.9.7

How can I use this with the ESP32 instead of the ESP8266? I am not that great at coding.

It compiles correctly when using v0.9.7 :slightly_smiling_face:


1 Like