-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update/upgrade OTAWebUpdater.ino example #8839
Conversation
#include <Ticker.h> | ||
#include "html.h" | ||
|
||
#define SSID_FORMAT "ESP32-%06X" // 12 chars total |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define SSID_FORMAT "ESP32-%06lX"
}); | ||
server.onNotFound([]() {server.send(200, "text/html", indexHtml);}); | ||
server.begin(); | ||
Serial.printf("Web Server ready at http://esp32.local or http://%s\n", WiFi.softAPIP().toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WiFi.softAPIP().toString().c_str()
#ifdef PASSWORD | ||
snprintf(passwd, 11, PASSWORD); | ||
#else | ||
snprintf(passwd, 11, "%s", generatePass(10).c_str()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure why the compiler is complaining about truncation, but I suggest you make passwd
be 16 bytes long instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The size is actually fairly specific, as it allows you to do a wifi: QR code in a 64 bit square. I'll figure it out.
Streamlined a lot of the code
HTML now sends file size
HTML has better progress graphics
HTML redirects back to root after completion
WebServer uses POST and GET to differentiate b/w status
Includes a lot more examples: generate passwords, functionalized setup, ticker, functionalized WebServer response, sending a const file
literal & C-style strings included in a separate header file
Moved to Update library- this does not use ArduinoOTA