From 9aaa045347c847c70b00bc8314f17dab70513d60 Mon Sep 17 00:00:00 2001 From: luc Date: Fri, 29 May 2015 20:35:08 +0800 Subject: [PATCH] Add page to configure Access Point Fix wrong size for SSID/password Add minimum size for easy change Workaround missing strncpy_P missig issue --- esp8266/config.h | 4 +- esp8266/esp8266.ino | 5 +- esp8266/webinterface.cpp | 542 +++++++++++++++++++++++++++++++++++---- esp8266/webinterface.h | 3 + esp8266/wifi.h | 1 - 5 files changed, 495 insertions(+), 60 deletions(-) diff --git a/esp8266/config.h b/esp8266/config.h index 066b7fcd..66130c53 100644 --- a/esp8266/config.h +++ b/esp8266/config.h @@ -84,7 +84,9 @@ const char LOCAL_NAME[] PROGMEM = "esp8266"; //sizes #define EEPROM_SIZE 256 //max is 512 #define MAX_SSID_LENGH 32 -#define MAX_PASSWORD_LENGH 64 +#define MIN_SSID_LENGH 1 +#define MAX_PASSWORD_LENGH 64 +#define MIN_PASSWORD_LENGH 8 #define IP_LENGH 4 #define BAUD_LENGH 4 diff --git a/esp8266/esp8266.ino b/esp8266/esp8266.ino index e8ddd317..3b67eafa 100644 --- a/esp8266/esp8266.ino +++ b/esp8266/esp8266.ino @@ -15,8 +15,7 @@ along with Repetier-Firmware. If not, see . This firmware is using the standard arduino IDE with module to support ESP8266: - https://github.com/sandeepmistry/esp8266-Arduino based on : - https://github.com/esp8266/Arduino + https://github.com/esp8266/Arduino from Bootmanager Latest version of the code and documentation can be found here : https://github.com/luc-github/ESP8266 @@ -46,7 +45,7 @@ extern "C" { void setup() { // init : - ESP.wdtDisable(); + // ESP.wdtDisable(); delay(8000); EEPROM.begin(EEPROM_SIZE); bool breset_config=false; diff --git a/esp8266/webinterface.cpp b/esp8266/webinterface.cpp index 0eae2e6e..a20a97a7 100644 --- a/esp8266/webinterface.cpp +++ b/esp8266/webinterface.cpp @@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include "config.h" #include "webinterface.h" #include "wifi.h" @@ -43,9 +44,10 @@ const char NAV_START[] PROGMEM = "