Auto wipe & reset SSID name if AI-THINKER ssid found
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "routes.h"
|
||||
#include "user_main.h"
|
||||
#include "uart_driver.h"
|
||||
#include "ansi_parser_callbacks.h"
|
||||
|
||||
#ifdef ESPFS_POS
|
||||
CgiUploadFlashDef uploadParams={
|
||||
@@ -93,6 +94,15 @@ void ICACHE_FLASH_ATTR user_init(void)
|
||||
|
||||
ioInit();
|
||||
|
||||
// Change AP name if AI-THINKER found (means un-initialized device)
|
||||
struct softap_config apconf;
|
||||
wifi_softap_get_config(&apconf);
|
||||
if (strstarts((char*)apconf.ssid, "AI-THINKER")) {
|
||||
warn("Un-initialized device, performing factory reset.");
|
||||
apars_handle_OSC_FactoryReset();
|
||||
return;
|
||||
}
|
||||
|
||||
// 0x40200000 is the base address for spi flash memory mapping, ESPFS_POS is the position
|
||||
// where image is written in flash that is defined in Makefile.
|
||||
#ifdef ESPFS_POS
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef USER_MAIN_H_H
|
||||
#define USER_MAIN_H_H
|
||||
|
||||
#define FIRMWARE_VERSION "0.5.3"
|
||||
#define FIRMWARE_VERSION "0.5.4"
|
||||
#define TERMINAL_GITHUB_REPO "https://github.com/MightyPork/esp-vt100-firmware"
|
||||
|
||||
#endif //USER_MAIN_H_H
|
||||
|
||||
Reference in New Issue
Block a user