diff --git a/WiFiManager.cpp b/WiFiManager.cpp index 4979a92..01e4528 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -1307,12 +1307,17 @@ String WiFiManager::getInfoData(String id){ p = FPSTR(HTTP_INFO_chipid); p.replace(FPSTR(T_1),(String)WIFI_getChipId()); } + #ifdef ESP32 else if(id==F("chiprev")){ - #ifdef ESP32 p = FPSTR(HTTP_INFO_chiprev); - p.replace(FPSTR(T_1),(String)ESP.getChipRevision()); - #endif + #ifdef _SOC_EFUSE_REG_H_ + String revb = (String)(REG_READ(EFUSE_BLK0_RDATA3_REG) >> (EFUSE_RD_CHIP_VER_RESERVE_S)&&EFUSE_RD_CHIP_VER_RESERVE_V); + p.replace(FPSTR(T_1),rev+"
"+revb); + #else + p.replace(FPSTR(T_1),rev); + #endif } + #endif else if(id==F("fchipid")){ #ifdef ESP8266 p = FPSTR(HTTP_INFO_fchipid); diff --git a/WiFiManager.h b/WiFiManager.h index b4aa59e..af8d3d9 100644 --- a/WiFiManager.h +++ b/WiFiManager.h @@ -20,6 +20,8 @@ // #define WM_ERASE_NVS // esp32 erase(true) will erase NVS // #define WM_RTC // esp32 info page will include reset reasons +// #include "soc/efuse_reg.h" // include to add efuse chip rev to info, getChipRevision() is almost always the same though, so not sure why it matters. + #define WM_WEBSERVERSHIM // use webserver shim lib #ifdef ESP8266