Show SSID in logs
This commit is contained in:
@@ -300,7 +300,7 @@ static void show_status_led() {
|
|||||||
#ifdef CONFIG_BSP_CONFIG_GPIO
|
#ifdef CONFIG_BSP_CONFIG_GPIO
|
||||||
if (!is_ap && gpio_get_level(CONFIG_BSP_CONFIG_GPIO) == 0) {
|
if (!is_ap && gpio_get_level(CONFIG_BSP_CONFIG_GPIO) == 0) {
|
||||||
if (now - reset_pressed_time > 1000) {
|
if (now - reset_pressed_time > 1000) {
|
||||||
ESP_LOGW(TAG, "Factory Reset Triggered via GPIO %d", CONFIG_BSP_CONFIG_GPIO);
|
ESP_LOGW(TAG, "Reset to WiFi-AP mode triggered via GPIO %d", CONFIG_BSP_CONFIG_GPIO);
|
||||||
wifi_manager_erase_config();
|
wifi_manager_erase_config();
|
||||||
esp_restart();
|
esp_restart();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ static httpd_handle_t s_server_handle = NULL;
|
|||||||
#define AP_SSID "ESP-Scope"
|
#define AP_SSID "ESP-Scope"
|
||||||
#define AP_PASS ""
|
#define AP_PASS ""
|
||||||
|
|
||||||
|
// Current NVS specified ssid
|
||||||
|
static char ssid[33] = {0};
|
||||||
|
|
||||||
// Forward decls
|
// Forward decls
|
||||||
|
|
||||||
static void wifi_init_softap(void);
|
static void wifi_init_softap(void);
|
||||||
@@ -321,9 +324,9 @@ bool wifi_manager_init_wifi(void) {
|
|||||||
|
|
||||||
// 2. Check NVS
|
// 2. Check NVS
|
||||||
nvs_handle_t nvs_handle;
|
nvs_handle_t nvs_handle;
|
||||||
char ssid[33] = {0};
|
|
||||||
char pass[64] = {0};
|
char pass[64] = {0};
|
||||||
size_t ssid_len = sizeof(ssid);
|
size_t ssid_len = sizeof(ssid);
|
||||||
|
memset(ssid, 0, sizeof ssid);
|
||||||
size_t pass_len = sizeof(pass);
|
size_t pass_len = sizeof(pass);
|
||||||
bool has_creds = false;
|
bool has_creds = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user