esp_iot_framework  v0.2.1
© 2026 AmakeSasha, distributed under a license Apache-2.0
Kconfig

CORE Kconfig configuration options.

Kconfig esp_iot_framework_core

This section describes the esp_iot_framework_core configuration parameters. All settings are available in the idf.py menuconfig configuration utility within the ESP IoT framework, CORE menu.


EIF_CORE_ENABLE_TLS - bool (default: y)

Name in the menuconfig: Enable HTTPS (TLS/SSL) Support

Switch the web server from insecure HTTP to encrypted HTTPS (Port 443).

HTTPS is resource-intensive for the ESP32. Enabling this feature will result in:

Warning
Disabling TLS is strongly discouraged for production environments. Modern browsers will mark the connection as Not Secure and may block access to critical web features.

Note that even with TLS enabled, browsers will still display a warning (e.g., NET::ERR_CERT_AUTHORITY_INVALID) for the entire site, including any web pages, resources, or API requests. This happens because the device uses a self-signed certificate from an untrusted authority, which you must manually bypass in the browser to establish a secure session.

Don't worry, the device generates TLS credentials completely autonomously and doesn't share encryption keys with anyone. If necessary, you can request regeneration of TLS credentials at any time through the admin panel.

EIF_CORE_ENABLE_BASIC_AUTH - bool (default: y)

Name in the menuconfig: Enable Basic Authentication for systemic resources

Enables mandatory HTTP Basic Authentication for secure system-level resources, administrative endpoints, and protected infrastructure nodes.

Warning
Disabling authentication is highly dangerous for production. If EIF_CORE_ENABLE_TLS is disabled, credentials travel in plain text (Base64) and can be easily sniffed out of the air.

Logging Settings -> EIF_CORE_LOG_LEVEL - int (range: 0 - 4, default: 3)

Name in the menuconfig: Framework log verbosity

Global logging level for all esp_iot_framework modules. Choosing a level enables it and all less verbose levels, while completely turning off more detailed lower levels.


Logging Settings -> EIF_CORE_LOG_SHOW_METADATA - bool (default: n)

Name in the menuconfig: Show metadata in logs (path, line, function)

Show metadata in logs (path, line, function).


Logging Settings -> EIF_CORE_LOG_ENABLE_MEM_MONITOR - bool (default: n)

Name in the menuconfig: Enable memory status logging


Logging Settings -> EIF_CORE_LOG_ENABLE_REMOTE_DEBUG - bool (default: n)

Name in the menuconfig: Enable remote diagnostic logging engine

Intercepts all system and application logs into an internal RAM ring buffer for network-based diagnostics.

Warning
Enabling this feature requires additional heap memory allocated for the buffer. The buffer size must be configured via EIF_CORE_LOG_REMOTE_BUFFER_SIZE.

Logging Settings -> EIF_CORE_LOG_REMOTE_BUFFER_SIZE - int (range: 1024 - 51200, default: 4096)

Name in the menuconfig: Remote log ring buffer size (bytes)

Size of the internal FreeRTOS ring buffer in RAM. 4096 bytes can store around 50-70 log lines. Higher values consume more heap memory.


Memory Monitor Settings -> EIF_CORE_MEM_MONITOR_CRITICAL_SIZE - int (range: 12288 - 65536, default: 12288)

Name in the menuconfig: The minimum allowed size of the largest block

Minimum free block size (in bytes) that must be available for stable operation. If the largest free block is smaller than this value, the system will reboot. Setting too low may cause missed fragmentation issues; too high may lead to unnecessary reboots.

Warning
To ensure the reboot task can be created, this value MUST be at least 8 times larger than EIF_CORE_REBOOT_TASK_STACK_SIZE (which is measured in 4-byte words).

Formula: EIF_CORE_MEM_MONITOR_CRITICAL_SIZE >= EIF_CORE_REBOOT_TASK_STACK_SIZE * 8.

Memory Monitor Settings -> EIF_CORE_MEM_MONITOR_CHECK_INTERVAL - int (range: 1000 - 3600000, default: 30000)

Name in the menuconfig: Memory check interval (ms)

How often to check memory fragmentation (in milliseconds). This parameter defines the time interval between consecutive memory fragmentation checks performed by the memory monitor task. The actual time to reboot = EIF_CORE_MEM_MONITOR_CHECK_INTERVAL × EIF_CORE_MEM_MONITOR_NUMBER_CHECKS.

Examples (when memory is fragmented):


Memory Monitor Settings -> EIF_CORE_MEM_MONITOR_NUMBER_CHECKS - int (range: 2 - 60, default: 3)

Name in the menuconfig: Number of fragmentation confirmations before reboot

Number of consecutive memory fragmentation checks that must detect a critical condition before the system initiates a safe reboot.

This parameter prevents false reboots due to temporary memory spikes. The system will only trigger a reboot if the largest free memory block remains below the critical threshold (EIF_CORE_MEM_MONITOR_CRITICAL_SIZE) for the specified number of consecutive checks.


Memory Monitor Settings -> EIF_CORE_REBOOT_TASK_STACK_SIZE - int (range: 1536 - 16384, default: 1536)

Name in the menuconfig: Reboot task stack size (words - 4 bytes)

Stack size for the task that manages the system shutdown sequence.

The task stops the Wi-Fi driver halts the HTTP server, and executes the handler_system_reboot (registered using the eif_register_handler_system_reboot()) before calling esp_restart(). Increase this value if handler_system_reboot performs stack-heavy operations like NVS writes or complex logging.

Defined in 4-byte words. To ensure the task can be successfully created in low-memory conditions, EIF_CORE_MEM_MONITOR_CRITICAL_SIZE must be at least 8 times larger than this value.