Thanks for your encouraging words.
There are several ESP8266 AT-command libraries developed with similar functionalities such as:
You’re very welcome to use and give feedbacks, enhancement requests, bug reports, etc.
Regards,
Thanks for your encouraging words.
There are several ESP8266 AT-command libraries developed with similar functionalities such as:
You’re very welcome to use and give feedbacks, enhancement requests, bug reports, etc.
Regards,
@khoih
Thanks for this clear overview!
For an Arduino Mega + ESP8266 shield libray to use for dynamic WifiManager functionality is ESP_AT_WM_Lite. Light means fewer parameters to configure? Ex. SSID and PW is fixed to the ugly ESP_AT_**** MyESP_AT_***?
It’s good that you start exploring the libs.
Depending on how much memory you can spare, you can turn ON or OFF the dynamic params by using
#define USE_DYNAMIC_PARAMETERS true
Ex. SSID and PW is fixed to the ugly ESP_AT_**** MyESP_AT_***?
The SSID and PW for Config Portal are configurable by using the function
void setConfigPortal(String ssid = "", String pass = "")
For example, in README
In
Configuration Portal Mode
, it starts an AP calledESP_AT_XXXXXX
. Connect to it using theconfigurable password
you can define in the code. For example,MyESP_AT_XXXXXX
(see examples):// SSID and PW for Config Portal String ssid = "Your-Config-Portal-SSID"; String password = "Your-Config-Portal-SSID-PW";
And use the function in setup()
void setup()
{
// Debug console
Serial.begin(115200);
while (!Serial);//delay(1000);
Serial.print(F("\nStart Mega_ESP8266Shield on "));
Serial.println(BOARD_TYPE);// initialize serial for ESP module
EspSerial.begin(115200);ESP_AT_WiFiManager = new ESP_AT_WiFiManager_Lite(&EspSerial, ESP8266_BAUD);
// Optional to change default AP IP(192.168.4.1) and channel(10)
//ESP_AT_WiFiManager->setConfigPortalIP(IPAddress(192, 168, 120, 1));
ESP_AT_WiFiManager->setConfigPortalChannel(1);// To configure Config Portal SSID and PW
ESP_AT_WiFiManager->setConfigPortal(ssid, password);ESP_AT_WiFiManager->begin();
}
Works perfectly … Great work on the lib!
khoih,
We are currently converting our project from wired to wifi functionality and further link it to blynk (and removing node-red dependency).
FYI: We noticed your lib has a EEPROM.h lib dependency what can be a challenge for projects using the much more functional EEPROMex.h lib as if you include both libs in your project there will be a conflict because the simple one defines “static EEPROMClass EEPROM” and the extended lib defines “external EEPROMClassEx EEPROM” so the compiler sees 2 classes with the same EEPROM name.
(Ugly) solution is to rename one of them in the lib and code will compile fine with both libraries used.
The easiest solution, if you insist of using the EEPROMex library, is to change the file
Esp8266_AT_WM_Lite.h of Esp8266_AT_WM_Lite library , assuming you’re using Mega, from
#include <EEPROM.h>
into
#include <EEPROMex.h>
Just recheck / retest the code to see if changing the lib breaking anything.
Also remember that some EEPROM locations have been reserved for the WM + dynamicParams purposes and use different location to store your params.
I also suggest to move this discussion to the correct topic from now on
BTW, I’ll add in next release v1.0.3
Anything you’d like to suggest to add into that new release?
Sounds great. Think your library is already very complete. We noted using some of the setConfigPortal call some weird behavior on iPhones with WEP2 and security but we are still debugging to see what is causing it, apart from that great library.
Dear @khoih. Congratulations on your work, it has helped me a lot. I would like to know how to prevent a failure / oscillation in the power supply causing the DoubleResetDetector to be involuntarily triggered? I have faced this problem and I do not know how to solve it. My devices after 2 consecutive power outages they enter the Config Portal, that is, the devices understand this power failure as triggering the DoubleResetDetector and do not leave the Config Portal until the information is filled, this is not good because the devices will be disconnected from the server while in the Config Portal in an undesired manner. is this possible to fix? thanks
It’s nice to know the library can somehow help you.
The power failure issue can be hopefully solved by
// Number of seconds after reset during which a
// subsequent reset will be considered a double reset.
#define DRD_TIMEOUT 10
Good Luck,
It sounds like there should be a timeout added to the double reset config so that it will not hangup for too long.
The DRD is a different and independent library and you certainly can configure its features to whatever way you’d like.
For example, in the ConfigOnDoubleReset example, the time spent in Config Portal (CP) is forced to be indefinite by disable time-out, as this is considered as intentional to do some change to the Credentials. So the CP will stay until valid / new data are entered and saved.
Have a look at ConfigOnDoubleReset.ino Line 666-673 for a way to change the time-out
if (drd->detectDoubleReset())
{
// DRD, disable timeout.
ESP_wifiManager.setConfigPortalTimeout(0);
Serial.println("Open Config Portal without Timeout: Double Reset Detected");
initialConfig = true;
}
If you don’t like to disable time-out, just specify the time-out different from 0.
if (drd->detectDoubleReset())
{
// DRD, using timeout 180s
ESP_wifiManager.setConfigPortalTimeout(180);
Serial.println("Open Config Portal with 180s Timeout: Double Reset Detected");
initialConfig = true;
}
Looks like a reasonable way to handle the problem.
Bạn là người Việt Nam phải không?
Dear @khoih , congratulations on your work.
I realized that when the wi-fi + internet access are working normally and there is a failure in both due to a power outage or other similar problem that leaves them off for a time greater than or equal to 15 minutes and when they are turned on (wifi + access to internet working) esp8266 reconnects to wifi but cannot connect to the blynk-cloud server. Could you tell me why this is happening? thanks.
Sorry I have no idea what’s happening there as it doesn’t make sense at all.
What if you turn OFF power to the board more than 15 mins
then turn back ON?
It’s possibly something wrong in your program and/or your network settings and only you can find out why. I’m afraid I can’t help you anything.
Good Luck,
15 minutes sounds like the amount of time that the router will hold a routing table entry for a device after it disappears off the network, but why that would prevent it re-connecting to the router later is a mystery to me.
I’d start by turning everything off then on again
Pete.