diff --git a/.cproject b/.cproject
index 9ac2a5c..52c447e 100644
--- a/.cproject
+++ b/.cproject
@@ -28,6 +28,15 @@
+
+
+
+
+
+
+
+
+
@@ -42,6 +51,15 @@
+
+
+
+
+
+
+
+
+
@@ -56,6 +74,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..226c1d2
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+MKS_WIFI_source
\ No newline at end of file
diff --git a/.idea/aws.xml b/.idea/aws.xml
new file mode 100644
index 0000000..ec328d0
--- /dev/null
+++ b/.idea/aws.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..ebe0173
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.project b/.project
index b4bfbba..5b50194 100644
--- a/.project
+++ b/.project
@@ -34,47 +34,47 @@
core/core
2
- ECLIPSE_HOME/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/cores/esp8266
+ D:/program/Sloeber/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/cores/esp8266
core/variant
2
- ECLIPSE_HOME/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/variants/nodemcu
+ D:/program/Sloeber/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/variants/nodemcu
libraries/ArduinoJson
2
- ECLIPSE_HOME/arduinoPlugin/libraries/ArduinoJson/6.18.3
+ D:/program/Sloeber/arduinoPlugin/libraries/ArduinoJson/6.19.4
libraries/EEPROM
2
- ECLIPSE_HOME/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/libraries/EEPROM
+ D:/program/Sloeber/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/libraries/EEPROM
libraries/ESP8266HTTPClient
2
- ECLIPSE_HOME/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/libraries/ESP8266HTTPClient
+ D:/program/Sloeber/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/libraries/ESP8266HTTPClient
libraries/ESP8266WiFi
2
- ECLIPSE_HOME/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/libraries/ESP8266WiFi
+ D:/program/Sloeber/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/libraries/ESP8266WiFi
libraries/ESP8266mDNS
2
- ECLIPSE_HOME/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/libraries/ESP8266mDNS
+ D:/program/Sloeber/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/libraries/ESP8266mDNS
libraries/Hash
2
- ECLIPSE_HOME/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/libraries/Hash
+ D:/program/Sloeber/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/libraries/Hash
libraries/WebSockets
2
- ECLIPSE_HOME/arduinoPlugin/libraries/WebSockets/2.3.5
+ D:/program/Sloeber/arduinoPlugin/libraries/WebSockets/2.3.6
diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index a387c95..9e72bf7 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -2,7 +2,7 @@
-
+
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
index ec68452..d5d2dce 100644
--- a/.settings/org.eclipse.core.resources.prefs
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -1,2 +1,2 @@
eclipse.preferences.version=1
-encoding/MKS_WIFI_source.ino=UTF-8
+encoding/MKS_WIFI_upgrade_with_BeePrint_web_interface.ino=UTF-8
diff --git a/.sproject b/.sproject
index c2775bb..7997e5e 100644
--- a/.sproject
+++ b/.sproject
@@ -1,17 +1,17 @@
Config.Release.board.BOARD.ID=nodemcuv2
Config.Release.board.BOARD.MENU.baud=921600
Config.Release.board.BOARD.MENU.dbg=Disabled
-Config.Release.board.BOARD.MENU.eesz=4M3M
+Config.Release.board.BOARD.MENU.eesz=4M2M
Config.Release.board.BOARD.MENU.exception=enabled
Config.Release.board.BOARD.MENU.ip=lm2f
Config.Release.board.BOARD.MENU.led=2
-Config.Release.board.BOARD.MENU.lvl=SSLTLS_MEM
+Config.Release.board.BOARD.MENU.lvl=None____
Config.Release.board.BOARD.MENU.ssl=all
Config.Release.board.BOARD.MENU.vt=flash
Config.Release.board.BOARD.MENU.wipe=none
-Config.Release.board.BOARD.MENU.xtal=160
+Config.Release.board.BOARD.MENU.xtal=80
Config.Release.board.BOARD.TXT=${SLOEBER_HOME}/arduinoPlugin/packages/esp8266/hardware/esp8266/2.7.4/boards.txt
-Config.Release.board.PROGRAMMER.NAME=Default
+Config.Release.board.PROGRAMMER.NAME=
Config.Release.board.UPLOAD.PORT=COM3
Config.Release.compile.sloeber.extra.all=
Config.Release.compile.sloeber.extra.archive=
@@ -20,7 +20,8 @@ Config.Release.compile.sloeber.extra.c.compile=
Config.Release.compile.sloeber.extra.compile=
Config.Release.compile.sloeber.extra.cpp.compile=
Config.Release.compile.sloeber.extra.link=
-Config.Release.compile.sloeber.size.switch=false
+Config.Release.compile.sloeber.size.custom=
+Config.Release.compile.sloeber.size.type=RAW_RESULT
Config.Release.compile.sloeber.warning_level=NONE
Config.Release.compile.sloeber.warning_level.custom=
Config.Release.other.IS_VERSION_CONTROLLED=false
diff --git a/MKS_WIFI_source.ino b/MKS_WIFI_upgrade_with_BeePrint_web_interface.ino
similarity index 93%
rename from MKS_WIFI_source.ino
rename to MKS_WIFI_upgrade_with_BeePrint_web_interface.ino
index 3fb7e17..f656e36 100644
--- a/MKS_WIFI_source.ino
+++ b/MKS_WIFI_upgrade_with_BeePrint_web_interface.ino
@@ -131,7 +131,7 @@ MksHTTPUpdateServer httpUpdater;
char cloud_host[96] = "baizhongyun.cn";
int cloud_port = 12345;
boolean cloud_enable_flag = false;
-int cloud_link_state = 0; // 0:??¨®?¡ê?1:¨º1?¨¹¡ê??¡ä¨¢??¨®¡ê?2:¨°?¨¢??¨®¡ê??¡ä¡ã¨®?¡§¡ê?3:¨°?¡ã¨®?¡§
+int cloud_link_state = 0; // 0:??¨®?¡ê?1:¨º1?¨¹¡ê??¡ä¨¢??¨®¡ê?2:¨°?¨¢??¨®¡ê??¡ä¡ã¨®?¡§¡ê?3:¨°?¡ã¨®?¡§
#ifdef SEND_EMAIL
//EMailSender emailSend("", "");
@@ -229,9 +229,9 @@ void cloud_get_file_list();
typedef enum
{
TRANSFER_IDLE,
- TRANSFER_BEGIN, //?a篓垄???篓篓Y隆盲拢陇?篓垄篓掳??隆茫娄脤?D-篓掳篓娄(D篓篓篓掳a?篓�篓潞?M110)
- TRANSFER_GET_FILE, //?篓垄篓篓????t篓潞y?Y隆锚?篓�D篓潞y?Y篓陇-??ready篓掳y??
- TRANSFER_READY, //娄脤篓篓隆盲ystm32篓�|隆盲e篓掳y??D?o?
+ TRANSFER_BEGIN, //?a篓垄???篓篓Y隆盲拢陇?篓垄篓掳??隆茫娄脤?D-篓掳篓娄(D篓篓篓掳a?篓�篓潞?M110)
+ TRANSFER_GET_FILE, //?篓垄篓篓????t篓潞y?Y隆�?篓�D篓潞y?Y篓陇-??ready篓掳y??
+ TRANSFER_READY, //娄脤篓篓隆盲ystm32篓�|隆盲e篓掳y??D?o?
TRANSFER_FRAGMENT
} TRANS_STATE;
@@ -392,7 +392,7 @@ private:
};
-class FILE_FIFO gFileFifo; //?-??隆�????篓娄鈧??篓C??????隆茫??????fifo
+class FILE_FIFO gFileFifo; //?-??隆�????篓娄鈧??篓C??????隆茫??????fifo
@@ -2754,20 +2754,20 @@ void do_transfer()
#define ESP_TYPE_WIFI_CTRL (uint8_t)0x9
-uint8_t esp_msg_buf[UART_RX_BUFFER_SIZE] = {0}; //麓忙麓垄麓媒麓娄脌铆碌脛脢媒戮脻
-uint16_t esp_msg_index = 0; //脨麓脰赂脮毛
+uint8_t esp_msg_buf[UART_RX_BUFFER_SIZE] = {0}; //麓忙麓垄麓媒麓娄脌铆碌脛脢媒戮脻
+uint16_t esp_msg_index = 0; //脨麓脰赂脮毛
typedef struct
{
uint8_t head; //0xa5
- uint8_t type; //0x0:脡猫脰脙脥酶脗莽�脦脢媒,0x1:麓貌脫隆禄煤脨脜脧垄,0x2:脥赂麓芦脨脜脧垄,0x3:脪矛�拢脨脜脧垄
- uint16_t dataLen; //脢媒戮脻é²�陇露è„
- uint8_t *data; //脫脨脨�脢媒戮脻
+ uint8_t type; //0x0:脡猫脰脙脥酶脗莽�脦脢媒,0x1:麓貌脫隆禄煤脨脜脧垄,0x2:脥赂麓芦脨脜脧垄,0x3:脪矛�拢脨脜脧垄
+ uint16_t dataLen; //脢媒戮脻é²�陇露è„Â
+ uint8_t *data; //脫脨脨�脢媒戮脻
uint8_t tail; // 0xfc
} ESP_PROTOC_FRAME;
-/*路碌禄脴脢媒脳茅脰脨脛é²�脳脰路没é²�枚脧脰脳å�¯è„莽碌脛脣梅脪媒潞脜拢å�¢éº“è„«0驴陋脢录,è„ ä¹ˆè™�禄麓忙è„è„·è„貌路碌禄脴-1*/
+/*路碌禄脴脢媒脳茅脰脨脛é²�脳脰路没é²�枚脧脰脳å�¯è„Â莽碌脛脣梅脪媒潞脜拢�麓脫0驴陋脢录,脠么è™�禄麓忙è„Âè„·è„Â貌路碌禄脴-1*/
static int32_t charAtArray(const uint8_t *_array, uint32_t _arrayLen, uint8_t _char)
{
uint32_t i;
@@ -2823,7 +2823,7 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen)
//0x01:AP
//0x02:Client
- //0x03:AP+Client(?Y2??隆矛3?)
+ //0x03:AP+Client(?Y2??隆矛3?)
if((msg[0] != 0x01) && (msg[0] != 0x02))
return;
cfg_mode = msg[0];
@@ -3200,7 +3200,7 @@ void esp_data_parser(char *cmdRxBuf, int len)
int32_t head_pos;
int32_t tail_pos;
uint16_t cpyLen;
- int16_t leftLen = len; //脢拢脫脿é²�陇露è„
+ int16_t leftLen = len; //脢拢脫脿é²�陇露è„Â
uint8_t loop_again = 0;
int i;
@@ -3217,7 +3217,7 @@ void esp_data_parser(char *cmdRxBuf, int len)
{
loop_again = 0;
- /* 1. �茅脮脪脰隆脥路*/
+ /* 1. �茅脮脪脰隆脥路*/
if(esp_msg_index != 0)
{
head_pos = 0;
@@ -3233,7 +3233,7 @@ void esp_data_parser(char *cmdRxBuf, int len)
// net_print((const uint8_t *)esp_msg_buf, esp_msg_index);
if(tail_pos == -1)
{
- //脙禄脫脨脰隆脦�
+ //脙禄脫脨脰隆脦�
if(esp_msg_index >= sizeof(esp_msg_buf))
{
memset(esp_msg_buf, 0, sizeof(esp_msg_buf));
@@ -3249,12 +3249,12 @@ void esp_data_parser(char *cmdRxBuf, int len)
// net_print((const uint8_t *)"esp_data_parser1\n");
if(head_pos == -1)
{
- //脙禄脫脨脰隆脥路
+ //脙禄脫脨脰隆脥路
return;
}
else
{
- //è„§è„ ç¦„æ½žéº“å¿™ç¢Œé™†buf
+ //脧脠禄潞麓忙碌陆buf
memset(esp_msg_buf, 0, sizeof(esp_msg_buf));
memcpy(esp_msg_buf, &cmdRxBuf[len - leftLen + head_pos], leftLen - head_pos);
@@ -3269,14 +3269,14 @@ void esp_data_parser(char *cmdRxBuf, int len)
//net_print((const uint8_t *)"esp_data_parser2\n", strlen((const char *)"esp_data_parser2\n"));
if(tail_pos == -1)
{
- //脮脪碌陆脰隆脥路拢�脙禄脫脨脰隆脦�
+ //脮脪碌陆脰隆脥路拢�脙禄脫脨脰隆脦�
return;
}
}
}
//net_print((const uint8_t *)"esp_data_parser3\n");
- /*3. 脮脪碌陆脥锚脮没碌脛脪禄脰隆 , 脜脨露脧脢媒戮脻é²�é™‡éœ²è„ */
+ /*3. 脮脪碌陆脥�脮没碌脛脪禄脰隆, 脜脨露脧脢媒戮脻�陇露脠*/
esp_frame.type = esp_msg_buf[1];
if((esp_frame.type != ESP_TYPE_NET) && (esp_frame.type != ESP_TYPE_PRINTER)
@@ -3285,7 +3285,7 @@ void esp_data_parser(char *cmdRxBuf, int len)
&& (esp_frame.type != ESP_TYPE_WID) && (esp_frame.type != ESP_TYPE_SCAN_WIFI)
&& (esp_frame.type != ESP_TYPE_MANUAL_IP) && (esp_frame.type != ESP_TYPE_WIFI_CTRL))
{
- //脢媒戮脻脌脿脨脥è™�ç¦„è„®åª’è„ è·¯æ‹¢å�¢éœ²é™‹è„�ç…¤
+ //脢媒戮脻脌脿脨脥�禄脮媒脠路拢�露陋�煤
memset(esp_msg_buf, 0, sizeof(esp_msg_buf));
esp_msg_index = 0;
//net_print((const uint8_t *)"type err\n", strlen("type err\n"));
@@ -3294,10 +3294,10 @@ void esp_data_parser(char *cmdRxBuf, int len)
//net_print((const uint8_t *)"esp_data_parser4\n");
esp_frame.dataLen = esp_msg_buf[2] + (esp_msg_buf[3] << 8);
- /*脢媒戮脻é²�é™‡éœ²è„ è™�ç¦„è„®åª’è„ è·¯*/
+ /*脢媒戮脻�陇露脠�禄脮媒脠路*/
if(4 + esp_frame.dataLen > sizeof(esp_msg_buf))
{
- //脢媒戮脻é²�é™‡éœ²è„ è™�ç¦„è„®åª’è„ è·¯æ‹¢å�¢éœ²é™‹è„�ç…¤
+ //脢媒戮脻�陇露脠�禄脮媒脠路拢�露陋�煤
memset(esp_msg_buf, 0, sizeof(esp_msg_buf));
esp_msg_index = 0;
//net_print((const uint8_t *)"len err\n", strlen("len err\n"));
@@ -3306,14 +3306,14 @@ void esp_data_parser(char *cmdRxBuf, int len)
if(esp_msg_buf[4 + esp_frame.dataLen] != ESP_PROTOC_TAIL)
{
- //脰隆脦è™�è™�ç¦„è„®åª’è„ è·¯æ‹¢å�¢éœ²é™‹è„�ç…¤
+ //脰隆脦��禄脮媒脠路拢�露陋�煤
memset(esp_msg_buf, 0, sizeof(esp_msg_buf));
//net_print((const uint8_t *)"tail err\n", strlen("tail err\n"));
esp_msg_index = 0;
return;
}
- /*4. 掳麓脮脮脌脿脨脥路脰�冒麓娄脌铆脢媒戮脻*/
+ /*4. 掳麓脮脮脌脿脨脥路脰�冒麓娄脌铆脢媒戮脻*/
esp_frame.data = &esp_msg_buf[4];
@@ -3371,7 +3371,7 @@ void esp_data_parser(char *cmdRxBuf, int len)
default:
break;
}
- /*5. 掳脩脪脩麓娄脌铆碌脛脢媒戮脻陆脴碌么*/
+ /*5. 掳脩脪脩麓娄脌铆碌脛脢媒戮脻陆脴碌么*/
esp_msg_index = cut_msg_head(esp_msg_buf, esp_msg_index, esp_frame.dataLen + 5);
if(esp_msg_index > 0)
{
@@ -3577,18 +3577,18 @@ uint8_t refreshApWeb()
wifiConfigHtml += F("