|
9 | 9 | Built by Khoi Hoang https://github.com/khoih-prog/ESPAsync_WiFiManager_Lite
|
10 | 10 | Licensed under MIT license
|
11 | 11 |
|
12 |
| - Version: 1.8.2 |
| 12 | + Version: 1.9.0 |
13 | 13 |
|
14 | 14 | Version Modified By Date Comments
|
15 | 15 | ------- ----------- ---------- -----------
|
|
25 | 25 | 1.8.0 K Hoang 10/02/2022 Add support to new ESP32-S3
|
26 | 26 | 1.8.1 K Hoang 11/02/2022 Add LittleFS support to ESP32-C3. Use core LittleFS instead of Lorol's LITTLEFS for v2.0.0+
|
27 | 27 | 1.8.2 K Hoang 21/02/2022 Optional Board_Name in Menu. Optimize code by using passing by reference
|
| 28 | + 1.9.0 K Hoang 09/09/2022 Fix ESP32 chipID and add getChipOUI() |
28 | 29 | *****************************************************************************************************************************/
|
29 | 30 |
|
30 | 31 | #pragma once
|
|
55 | 56 | #endif
|
56 | 57 |
|
57 | 58 | #ifndef ESP_ASYNC_WIFI_MANAGER_LITE_VERSION
|
58 |
| - #define ESP_ASYNC_WIFI_MANAGER_LITE_VERSION "ESPAsync_WiFiManager_Lite v1.8.2" |
| 59 | + #define ESP_ASYNC_WIFI_MANAGER_LITE_VERSION "ESPAsync_WiFiManager_Lite v1.9.0" |
59 | 60 |
|
60 | 61 | #define ESP_ASYNC_WIFI_MANAGER_LITE_VERSION_MAJOR 1
|
61 |
| - #define ESP_ASYNC_WIFI_MANAGER_LITE_VERSION_MINOR 8 |
62 |
| - #define ESP_ASYNC_WIFI_MANAGER_LITE_VERSION_PATCH 2 |
| 62 | + #define ESP_ASYNC_WIFI_MANAGER_LITE_VERSION_MINOR 9 |
| 63 | + #define ESP_ASYNC_WIFI_MANAGER_LITE_VERSION_PATCH 0 |
63 | 64 |
|
64 |
| - #define ESP_ASYNC_WIFI_MANAGER_LITE_VERSION_INT 1008002 |
| 65 | + #define ESP_ASYNC_WIFI_MANAGER_LITE_VERSION_INT 1009000 |
65 | 66 | #endif
|
66 | 67 |
|
67 | 68 | #ifdef ESP8266
|
|
178 | 179 | }
|
179 | 180 |
|
180 | 181 | #define ESP_getChipId() (ESP.getChipId())
|
| 182 | + |
181 | 183 | #else //ESP32
|
| 184 | + |
182 | 185 | #include <esp_wifi.h>
|
183 |
| - #define ESP_getChipId() ((uint32_t)ESP.getEfuseMac()) |
| 186 | + |
| 187 | + uint32_t getChipID(); |
| 188 | + uint32_t getChipOUI(); |
| 189 | + |
| 190 | + #if defined(ESP_getChipId) |
| 191 | + #undef ESP_getChipId |
| 192 | + #endif |
| 193 | + |
| 194 | + #if defined(ESP_getChipOUI) |
| 195 | + #undef ESP_getChipOUI |
| 196 | + #endif |
| 197 | + |
| 198 | + #define ESP_getChipId() getChipID() |
| 199 | + #define ESP_getChipOUI() getChipOUI() |
184 | 200 | #endif
|
185 | 201 |
|
| 202 | + |
186 | 203 | #include <ESPAsync_WiFiManager_Lite_Debug.h>
|
187 | 204 |
|
188 | 205 | //////////////////////////////////////////////
|
@@ -464,6 +481,38 @@ const char WM_HTTP_CORS_ALLOW_ALL[] PROGMEM = "*";
|
464 | 481 |
|
465 | 482 | //////////////////////////////////////////
|
466 | 483 |
|
| 484 | +#if (ESP32) |
| 485 | + |
| 486 | +uint32_t getChipID() |
| 487 | +{ |
| 488 | + uint64_t chipId64 = 0; |
| 489 | + |
| 490 | + for (int i = 0; i < 6; i++) |
| 491 | + { |
| 492 | + chipId64 |= ( ( (uint64_t) ESP.getEfuseMac() >> (40 - (i * 8)) ) & 0xff ) << (i * 8); |
| 493 | + } |
| 494 | + |
| 495 | + return (uint32_t) (chipId64 & 0xFFFFFF); |
| 496 | +} |
| 497 | + |
| 498 | +////////////////////////////////////////// |
| 499 | + |
| 500 | +uint32_t getChipOUI() |
| 501 | +{ |
| 502 | + uint64_t chipId64 = 0; |
| 503 | + |
| 504 | + for (int i = 0; i < 6; i++) |
| 505 | + { |
| 506 | + chipId64 |= ( ( (uint64_t) ESP.getEfuseMac() >> (40 - (i * 8)) ) & 0xff ) << (i * 8); |
| 507 | + } |
| 508 | + |
| 509 | + return (uint32_t) (chipId64 >> 24); |
| 510 | +} |
| 511 | + |
| 512 | +#endif |
| 513 | + |
| 514 | +////////////////////////////////////////// |
| 515 | + |
467 | 516 | String IPAddressToString(const IPAddress& _address)
|
468 | 517 | {
|
469 | 518 | String str = String(_address[0]);
|
|
0 commit comments