Skip to content

Commit

Permalink
Fix: Access Point not working after firmware update
Browse files Browse the repository at this point in the history
Fixes #1613
  • Loading branch information
tbnobody committed Jan 3, 2024
1 parent cbbe053 commit c1fc907
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <cstdint>

#define CONFIG_FILENAME "/config.json"
#define CONFIG_VERSION 0x00011900 // 0.1.24 // make sure to clean all after change
#define CONFIG_VERSION 0x00011a00 // 0.1.26 // make sure to clean all after change

#define WIFI_MAX_SSID_STRLEN 32
#define WIFI_MAX_PASSWORD_STRLEN 64
Expand Down
9 changes: 9 additions & 0 deletions src/Configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "defaults.h"
#include <ArduinoJson.h>
#include <LittleFS.h>
#include <nvs_flash.h>

CONFIG_T config;

Expand Down Expand Up @@ -339,6 +340,14 @@ void ConfigurationClass::migrate()
config.Dtu.Nrf.PaLevel = dtu["pa_level"];
}

if (config.Cfg.Version < 0x00011a00) {
// This migration fixes this issue: https://github.com/espressif/arduino-esp32/issues/8828
// It occours when migrating from Core 2.0.9 to 2.0.14
// which was done by updating ESP32 PlatformIO from 6.3.2 to 6.5.0
nvs_flash_erase();
nvs_flash_init();
}

f.close();

config.Cfg.Version = CONFIG_VERSION;
Expand Down

0 comments on commit c1fc907

Please sign in to comment.