|
esp_iot_framework
v0.2.1
© 2026 AmakeSasha, distributed under a license Apache-2.0
|
CORE Kconfig configuration options.
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).
y: All traffic is fully encrypted using TLS. This provides a secure communication channel, preventing "Man-in-the-Middle" (MITM) attacks and ensuring that all data remains confidential and integral during transit.n: The server operates in plain text mode. ALL DATA sent between the client and the device is visible to anyone on the same network. Using simple packet sniffers, an attacker can easily intercept your session and compromise the system.HTTPS is resource-intensive for the ESP32. Enabling this feature will result in:
TLS is strongly discouraged for production environments. Modern browsers will mark the connection as Not Secure and may block access to critical web features.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.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.
y: Any access to system REST APIs, administrative paths, or managed assets requires a valid username (admin) and password verified against NVS storage.n: Access control for infrastructure layers is completely bypassed. Anyone on the local network can view telemetry, modify configurations, read logs, or trigger reboots.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.
0: None1: Error - EIF_LOG_E()Errors. Everything below (Warning, Info, Debug) is turned off.2: Warning - EIF_LOG_W()Warnings and Errors. Info and Debug logs are turned off.3: Info - EIF_LOG_I()Info, Warning, and Error. Only Debug logs are turned off.4: Debug - EIF_LOG_D()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).
y: n: Logging Settings -> EIF_CORE_LOG_ENABLE_MEM_MONITOR - bool (default: n) Name in the menuconfig: Enable memory status logging
If y: The monitor task dumps the total free heap, the largest free block, and the critical status flag to the console. This allows tracking memory leaks and fragmentation every EIF_CORE_MEM_MONITOR_CHECK_INTERVAL ms.
Example output:
n: Statistics are not printed. Only warnings (EIF_CORE_LOG_W()) and critical errors (EIF_CORE_LOG_E()) will be logged if memory pressure is detected.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.
y: The framework redirects all standard console output to a continuous FreeRTOS ring buffer. These logs can be read via the CORE Extension API (eif_core_log_pop_chunk()) and transmitted over network protocols (HTTP, MQTT, BLE, or WebSockets), eliminating the need for a physical UART/serial connection.n: Logs are routed strictly to the physical UART port. Remote logging APIs are completely compiled out to save flash and RAM.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.
8 times larger than EIF_CORE_REBOOT_TASK_STACK_SIZE (which is measured in 4-byte words).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):
EIF_CORE_MEM_MONITOR_CHECK_INTERVAL = 30000 (30 s) with EIF_CORE_MEM_MONITOR_NUMBER_CHECKS = 3 -> reboot after 90 seconds (1.5 min).EIF_CORE_MEM_MONITOR_CHECK_INTERVAL = 60000 (60 s) with EIF_CORE_MEM_MONITOR_NUMBER_CHECKS = 5 -> reboot after 300 seconds (5 min).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.