- bugfix: changed
#ifdef H_PEER_DATA_TRANSFERto#if H_PEER_DATA_TRANSFERto fix build errors when Peer Data Transfer feature is disabled. - fixed transport restart for SPI-HD and UART transports
- fixed sdio incorrect identification of all-ones bus read
- removed memory leaks caused by mempool
- fixed SDIO deinit tearing down the shared SDMMC host (broke a co-existing SD card on the other slot)
- fixed public headers failing to build under
-Werror=undef(e.g. Matter/external host consumers)
- added
esp_wifi_disable_pmf_config()support (host ↔ co-processor RPC); previously returnedESP_ERR_NOT_SUPPORTED - fixed SDIO RX heap corruption on transport deinit and hardened RX buffer allocation
- added gpios for
ESP32_P4X_C5_Function_EV_Board V2.0 - fix build break for IDF v6 when enable power save (API renamed)
- update Kconfig to check for config
SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUPintroduced in IDF v6 - fixed bug causing a crash in SPI-HD interface with IDF v6.1 due to new uninitialised member in
spi_bus_config_t - reduced default number of buffers for SPI-HD and SPI-FD to resolve memory issues
- Zigbee:
- added support for Zigbee
- added Home Automation thermostat on a Zigbee Coordinator example
- added support for SPI-HD 1-bit mode (SPI 3-wire interface)
- NOTE: SPI-HD 1-bit mode is only supported on ESP-IDF v6.1 and above and requires git Commit bf10423
- updated
_h_get_semaphoreand_h_lock_mutexto use milliseconds instead of seconds as a timeout parameter - added
_h_thread_yieldfor use by threads to request a context switch
- SDIO: added
ESP_HOSTED_MEMPOOL_PREFER_SPIRAMto allocate transport buffers from PSRAM (e.g. ESP32-P4), saving internal RAM; off by default - OS APIs:
_h_get_semaphoreand_h_lock_mutexnow take timeout in milliseconds (was seconds) - added
_h_thread_yieldfor threads to request a context switch
- OpenThread: added OpenThread over dedicated UART support
- co-processor is the OpenThead RCP (Radio Co-Processor)
- added host examples:
host_openthread_border_router,host_openthread_cli
- Common Mempool: fixed build error on ESP-IDF v6.x when using PicolibC with
CONFIG_LIBC_PICOLIBC_NEWLIB_COMPATIBILITYdisabled - Host: removed Unicode encoded characters in cmake file to prevent Windows build failure
- make
TAGinmempool.cstatic to avoid link-time clash with other components (#187)
- Aligned Kconfig with IDF change that relaxes
ESP_COEX_EXTERNAL_COEXIST_ENABLEdependency - On chips with
SOC_EXTERNAL_COEX_ADVANCE, external coexistence now works alongside BT controller - Updated compile-time checks in
slave_ext_coex.hto match (includessoc/soc_caps.h)
- fixed CI to allow building ESP32 co-processor with ESP-IDF v5.5 for SPI-FD and UART transports: was running out of IRAM space
- fixed CI build failure when building co-processor with ESP-IDF release/v5.3
- added more ESP-IDF releases to CI for testing
- Add 16-byte alignment padding before SHA256 hash in image size parser
- Previously sent 15 fewer bytes than actual image, causing hash mismatch
- fix build break on co-processor if using SPI-HD interface with 2 data lines
- Allows passing per-callback context without global state
- User pointer is returned as-is on every invocation
esp_hosted_register_custom_callback
// Old
esp_err_t esp_hosted_register_custom_callback(
uint32_t msg_id,
void (*callback)(uint32_t msg_id, const uint8_t *data, size_t data_len));
// New
esp_err_t esp_hosted_register_custom_callback(
uint32_t msg_id,
void (*callback)(uint32_t msg_id, const uint8_t *data, size_t data_len, void *user),
void *user);- used common mempool code for both Host and Co-processor
- made ESP-Hosted mempool code private to fix build break
- added parameter checking for RPC calls
- Host: added NULL or validation checks for exposed user APIs
- Fixed
esp_wifi_scan_get_ap_recordsto set the actual AP number this API returns
- Add slave target strings to
Kconfig(required by Arduino build)
- Add api to get the co-processor name and chip id to identify the co-processor
- API Added
esp_hosted_get_cp_info
- Updated
examples/host_bt_controller_mac_addrto request this information - Extended RPC for GetCoprocessorFwVersion to include the co-processor name and chip id
- Added Co-processor option to disable Wi-Fi support (for Bluetooth-only support)
- Re-organised co-processor code: moved Wi-Fi, Wi-Fi Enterprise and Network Split code into individual files
- Added initial support for ESP32-H4 as co-processor
- only works with UART interface as ESP-Hosted Transport. SPI to be enabled later.
- Bluetooth not yet enabled in ESP-IDF
- Add support to manage co-processor external Wi-Fi coexistence from the host.
- APIs Added
esp_hosted_cp_ext_coex_set_work_modeesp_hosted_cp_ext_coex_set_gpio_pinesp_hosted_cp_ext_coex_set_grant_delayesp_hosted_cp_ext_coex_set_validate_highesp_hosted_cp_ext_coex_disable
- Host Example Added
- examples/host_manage_copro_ext_coex
- Documentation
- examples/host_manage_copro_ext_coex/README.md
- Config
- Host
- ESP_HOSTED_CP_EXT_COEX
- ESP_HOSTED_CP_EXT_COEX_ADVANCE
- Slave
- ESP_HOSTED_CP_EXT_COEX
- Host
- Added support for Bluetooth-only Co-processors (like ESP32-H2)
- Allow ESP-Hosted component to be manually disabled through idf menuconfig
- ESP Slave FW validation fails because OTA image validation depends on non-existent IDF 6.0+ APIs (GitHub ##165)
- Checked incoming image validity during OTA update
- done for ESP-IDF v6.1.0 or greater
- Wi-Fi APIs
esp_wifi_set_scan_parameters()esp_wifi_get_scan_parameters()
- Allow slave OTA only if correct SPI Flash Mode
- Assert if slave uses SDIO streaming and host as SDIO packet mode
- Guard
esp_hosted_coprocessor.h,host_power_save.h,interface.hfor cplusplus inclusion - Replace assert with graceful error on mempool alloc failure
- Building with and without bt enabled
- Disable auto connect upon sta mode started
- Add
esp_eap_client_set_eap_methods()asweakinesp_wifi_weak.c
- Added ESP32-P4-Eye board GPIOs at slave and host Kconfig
- Fix host wakeup GPIO config
- Added Co-processor Memory Monitor: sets up a heap memory monitor on the co-processor that periodically checks the amount of heap memory remaining. Co-processor sends memory info events to the host at periodic intervals or when heap memory falls below memory thresholds set by the host.
- Added
examples/host_hosted_cp_meminfoas an example:- make a one time request of heap memory
- request periodic memory reports
- get a report only when heap memory falls below a threshold
esp_hosted_set_mem_monitor
ESP_HOSTED_EVENT_MEM_MONITOR
Added performance with ESP32-C3 as co-processor, using SPI-FD interface, to Performance document.
- Fix a build break on ESP-IDF master branch
- Add
ESP_HOSTED_WIFI_AUTO_CONNECT_ON_STA_STARTto control whether WiFi station auto-connects on STA start on both host and slave sides. This allows disabling auto-connect to align behavior with standard ESP-IDF examples and avoids unintended connection attempts during initialization. - Made FreeRTOS runtime stats logging optional
- Added option to allow slave to reuse application-created STA netif handle instead of creating its own handle
- Added option to disable sharing Bluetooth with Host, for cases where BT is only required on the co-processor
- Renamed
H_HOST_RESTART_NO_COMMUNICATION_WITH_SLAVE_TIMEOUTtoH_HOST_RESTART_NO_COMMUNICATION_WITH_SLAVE_TIMEOUT_MSto clarify units are in milliseconds.
- ESP32-P4 C61 Core board support - Improvise
- TCP iPerf stability with documented performance optimizations
- Host power save and wake-up functionality
- Wake-up GPIOs:
- P4 Core Board – C61: IO04
- P4 Core Board – P4: IO06
- GPIOs disabled by default (
-1) due to no physical connection; verified via jumper wiring and solder
- Network split scenarios
- made UART Hosted interface more stable:
- flush the input after reset. Rx line may toggle while resetting the co-processor, causing Host UART to store invalid data.
- check that offset in received payload header is valid: discard packet for invalid offsets.
- check flags in received payload only after the payload is considered valid
Minor fix: On Timeout/Failure, Print RPC req str instead of RPCId
Minor fixes: const qualifier violations while building
- remove double freeing of buffer if
chan_arr[buf_handle->if_type]->rx()fails. Underlying rx function will free the memory
Warning
This version of ESP-Hosted onwards must be used with wifi-remote component v1.3.1 or greater. See the Migration Guide for more information.
- GPIO Expander: Added feature to allow the host to control the GPIOs of the slave co-processor over the existing transport link. See GPIO Expander Guide.
- GPIO Expander Example: Added a new example
examples/host_gpio_expanderto demonstrate the usage of the GPIO expander feature.
esp_hosted_cp_gpio_configesp_hosted_cp_gpio_reset_pinesp_hosted_cp_gpio_set_levelesp_hosted_cp_gpio_get_levelesp_hosted_cp_gpio_set_directionesp_hosted_cp_gpio_input_enableesp_hosted_cp_gpio_set_pull_mode
- Add example, host_shuts_down_slave_to_power_save
- Use
ENpin on coprocessor to power off/on - Power down coprocessor when not in use
- Power on coprocessor when required
- Connect Wi-Fi on coprocessor wake up
- Use
- Fix the memory leaks in hosted deinit -> init path
Using shorter, more manageable names for esp hosted events Before adoption, concise the event names from full string COPROCESSOR to just CP in event names
- enabled ESP-Hosted events. Host can register an event handler to receive these events from co-processor:
- INIT event, indicating the co-processor has started
- HEARTBEAT event, when enabled by the host
- TRANSPORT_FAILURE event, when ESP-Hosted encounters a transport failure
- host can use these events to determine if the co-processor rebooted (unexpected INIT event) or hanged (missing HEARTBEAT)
- added
examples/host_hosted_eventsas an example to show how the host can use either event to reinitialise a Station connection to an AP
- fixed ESP-Hosted and SDIO issues that prevent transport reinitialisation
- fixed files to skip when running codespell during pre-commit
- removed setting
scan_methodandsort_methodin co-processor when station is connecting. Use the values sent by the Host in the Wi-Fi config. - fixed support for ESP32-S2 as a co-processor
- Slave OTA Example
- Add version-aware OTA activation
- Conditionally call esp_slave_ota_activate() only for slave FW >= v2.6.0
- Improved Slave OTA Documentation
- Comprehensive code comments explaining OTA APIs and version checks
- Mermaid sequence diagram showing complete OTA verification flow
- Correct esptool command usage (
write_flashinstead of invalidwrite-flash) - Update Wi-Fi bandwidth enums for newer ESP-IDF compatibility
- Better validation and user-readable error messages for slave OTA
- Detect empty or uninitialized LittleFS and partition OTA sources
- Clear guidance when invalid or missing slave firmware binaries are detected
- Fix slave OTA failures on back-to-back updates by removing the hard dependency on
CONFIG_ESPTOOLPY_FLASHMODE_QIO. - Previously, mandating QIO flash mode caused consecutive OTA operations to fail; this is now resolved by removing the forced flash mode setting.
- Light Sleep Documentation: Added comprehensive Light Sleep Integration Guide detailing the handshake between host power states and slave light sleep.
- Smart Wakeup Demo: Added a new demo showcasing the slave waking the host MCU using specific network triggers (UDP packets).
- Example:
examples/host_network_split__power_save/host_wakeup_demo_using_udp_packet
- Example:
- Memory Leak Fixes:
- Resolved memory leaks in the SDIO driver during unload/deinit by ensuring proper buffer cleanup and
sdio_slave_send_get_finishedusage. - Fixed memory leaks in
esp_hosted_cliby adding proper deregistration APIs for Hosted-specific commands. - Cleanly handled timer memory removal in the Host Power Save component.
- Resolved memory leaks in the SDIO driver during unload/deinit by ensuring proper buffer cleanup and
- Concurrency & Race Conditions:
- Added semaphore protection (mutex) in
host_power_save.cto prevent race conditions when multiple threads attempt to wake the host simultaneously.
- Added semaphore protection (mutex) in
- Timing & Reset Improvements:
- Adjusted task delays in the host wakeup sequence to prevent the host from receiving incorrect or premature reset signals during the wake-up transition.
- Auto Invoked when host triggers deep sleep
- Example implementation in example_light_sleep.c
There is memory leak when sdio driver unload is selected - working on the fix
Add up mutex protection for callback array for Peer Data Transfer
Amend Peer Data Transfer Example:
Features:
- User can register callback-based dispatch for their own msg ids, both at host and slave
- Configurable handler slots via Kconfig (default: 3)
API:
- esp_err_t esp_hosted_send_custom_data(uint32_t msg_id, const uint8_t *data, size_t data_len)
- esp_err_t esp_hosted_register_cu stom_callback(uint32_t msg_id, void (*callback)(uint32_t msg_id, const uint8_t *data, size_t data_len));
Example (examples/host_peer_data_transfer):
- Uses animal sound theme (CAT→MEOW, DOG→WOOF, HUMAN→HELLO)
- Host sends CAT_MSG_ID, with byte stream. Slave sends back same stream with MEOW_MGD_ID and so on.
Configuration:
- Host: CONFIG_ESP_HOSTED_MAX_CUSTOM_MSG_HANDLERS (Kconfig)
- Slave: CONFIG_ESP_HOSTED_MAX_CUSTOM_MSG_HANDLERS (Kconfig.projbuild)
- Ported as H_MAX_CUSTOM_MSG_HANDLERS on host side
Kconfig : CONFIG_ESP_HOSTED_COPROCESSOR_APP_MAIN at coprocessor menuconfig
- Default: Enabled (for slave example from registry)
- Purpose: Controls whether ESP-Hosted provides its own
app_main() - When to disable:
- Using ESP-Hosted slave code base as a component in your application
Example: Peer Data Transfer Example
- Supports sending and receiving arbitrary (preformatted) user data from/to host and slave
- Maximum payload size: 8166 bytes per packet
esp_hosted_send_custom_data(data, length): Send raw binary data to coprocessoresp_hosted_register_rx_callback_custom_data(callback): Register callback for receiving custom data
Network Split (Shared IP)
This major update allows the Host MCU and the ESP Slave to share a single IP address while running independent network stacks. This is ideal for low-power products where the Slave handles background tasks while the Host sleeps.
- Disabled by default. Enable using
CONFIG_ESP_HOSTED_NETWORK_SPLIT_ENABLEDconfig - Documentation: Network Split Guide.
- Smart Traffic Routing:
nw_split_router.cautomatically directs traffic through function,nw_split_filter_and_route_packet() - Port-based (TCP/UDP): Uses
CONFIG_LWIP_TCP_LOCAL_PORT_RANGEandCONFIG_LWIP_UDP_LOCAL_PORT_RANGEto decide if the Host or Slave handles a packet. - Reserved Ports: Mandate packets on specific ports (e.g., 80, 443) to the Host via
CONFIG_ESP_HOSTED_HOST_RESERVED_PORTS_CONFIGURED. - Non TCP/UDP: Built-in handling for
ARP,ICMP, andDHCPon coprocessor (configurable) to offload host for other priority work or deep sleep - iperf Performance
- Demo of sharing same port: Port
5001is shared smartly, allowing performance testing on either stack (at a time) without reconfiguring.
- Demo of sharing same port: Port
- Low-Power Support
- (Optionally) Deeply integrated with Host Power Save
- Smart Wakeup demo
- The Slave can "wake up" the Host when it receives specific traffic or an MQTT message containing the
"wakeup-host"string.
- The Slave can "wake up" the Host when it receives specific traffic or an MQTT message containing the
- Collision Prevention
- Added
esp_hosted_lwip_src_port_hook.hto ensure the Host and Slave never try to use the same source port.
- Added
- Supported Targets
- Slaves: ESP32-C5, C6, S2, S3.
- Hosts: ESP32-P4, H2, and non ESP MCUs.
ESP Component Registry Release: 2.8.0
- fixed co-processor to properly allow wifi init and deinit
- fixed registration of event handlers in co-processor
- fixed RPC Response for OTA commands to return errors in responses correctly
- fixed double free bug in host OTA example
- Stable workaround for ota writes to slave
- Add support for more PCBs:
- ESP32-P4 Core Board - with on-board C5
- ESP32-P4 Core Board - with on-board C6
Restructured the ESP-Hosted-MCU commits
- Clean up ESP-Hosted prints at host
- Added Hosted API call to get co-processor Application Descriptor
- Fixed sta connection to remove extra disconnected event if incoming station config is different from current station config
- IRAM size limitation when using UART transport only applies to ESP32, not to all SOCs.
- workaround a bug in
esp_wifi_get_protocol()that can cause memory corruption. See this ESP-IDF Issue. - updated CI pipelines to build mqtt/tcp example from Registry Component on master branch
- Add example showing concurrent use of a SD Card and ESP-Hosted.
- Fix the
esp_wifi_deinit()call from host
- Increase timing used to reset co-processors to work with a slower FreeRTOS clock tick
- Updated documentation on performance optimization
- fixed bug in enabling
esp_eap_client_set_eap_methodson co-processor based on ESP-IDF version
Minor fixes in Slave OTA example
- Added public OTA APIs for slave firmware updates
- Added host-triggered slave OTA example with support for HTTP, partition, and filesystem sources
- Support for LittleFS filesystem-based OTA updates
- Migration guide updated for 2.6.0
esp_hosted_ota_beginesp_hosted_ota_writeesp_hosted_ota_endesp_hosted_ota_activate
esp_hosted_slave_ota- Use the new Host Performs Slave OTA Example instead for more flexible OTA implementations with comprehensive documentation and multiple deployment methods
host_performs_slave_ota- Host-triggered slave OTA example supporting HTTP URLs, partition sources and LittleFS filesystem sources
- Add SPI (full and half duplex) and UART support for ESP32-C61
- Updated documentation on applying optimised Wi-Fi settings to sdkconfigs
- Fixed build issues when raw throughput testing is enabled
- Fixed bug in co-processor causing SDIO to operate only in packet mode
- Fixes to use compatible version of
idf-build-appsand constraints during CI pipeline builds - Renamed CI pipelines to "sanity" and "regression"
- Prefix jobs with
sanity_orregression_to make their names unique - Enabled building of ESP-Hosted examples in regression pipeline
- Various bug fixes found in the process of fixing the CI pipelines
- Version, 2.5.8 - 2.5.10:
- Add staging branch workflow for safer component releases
- Fixed build break when CLI Commands are enabled on coprocessor
- Updated co-processor and some example
idf_component.ymlfiles to set component dependencies based on the ESP-IDF version in use
- Fixed build errors when using latest version of ESP-IDF
- Updated Wi-Fi Easy Connect (DPP) code to match current ESP-IDF master
- Adjusted CI pipeline
- Added building with ESP-IDF v5.3 in CI
- Added building ESP-Hosted examples in CI
- Fixed building with ESP32-H2 as host in CI (was skipping build)
- Fix the ESP-IDF CI
- Add support to get and set the BT Controller Mac Address
- To support set BT Controller Mac Address, BT Controller is now disabled by default on the co-processor, and host must enable the BT Controller. See Initializing the Bluetooth Controller for details
- Updated all ESP-Hosted BT related examples to account for new BT Controller behaviour
esp_hosted_bt_controller_initesp_hosted_bt_controller_deinitesp_hosted_bt_controller_enableesp_hosted_bt_controller_disableesp_hosted_iface_mac_addr_setesp_hosted_iface_mac_addr_getesp_hosted_iface_mac_addr_len_get
- Added dependency on
esp_driver_gpio
- Remove dependency on deprecated
drivercomponent and added necessary dependencies instead
- Add support for Wi-Fi Easy Connect (DPP)
- Espressif documentation on Wi-Fi Easy Connect (DPP)
- ESP-Hosted Enrollee Example using DPP to securely onboard a ESP32P4 with C6 board to a network with the help of a QR code and an Android 10+ device
esp_supp_dpp_initesp_supp_dpp_deinitesp_supp_dpp_bootstrap_genesp_supp_dpp_start_listenesp_supp_dpp_stop_listen
- Fix ignored lwip hook header in slave example
- Reduced ESP32 bootloader size
- Added support for Wi-Fi Enterprise
esp_wifi_sta_enterprise_enableesp_wifi_sta_enterprise_disableesp_eap_client_set_identityesp_eap_client_clear_identityesp_eap_client_set_usernameesp_eap_client_clear_usernameesp_eap_client_set_passwordesp_eap_client_clear_passwordesp_eap_client_set_new_passwordesp_eap_client_clear_new_passwordesp_eap_client_set_ca_certesp_eap_client_clear_ca_certesp_eap_client_set_certificate_and_keyesp_eap_client_clear_certificate_and_keyesp_eap_client_set_disable_time_checkesp_eap_client_get_disable_time_checkesp_eap_client_set_ttls_phase2_methodesp_eap_client_set_suiteb_192bit_certificationesp_eap_client_set_pac_fileesp_eap_client_set_fast_paramsesp_eap_client_use_default_cert_bundleesp_wifi_set_okc_supportesp_eap_client_set_domain_nameesp_eap_client_set_eap_methods
- Added SDIO support for ESP32-C61
- Add host example to showcase transport config before
esp_hosted_init()
- Fixed a build break caused by refactoring
- Refactored common and port specific code
- Fixed SPI Full Duplex startup sequence
- Fixed incorrect Handshake GPIO assignment for C5 on Module
- Added valid CPU frequencies in ITWT Example for H2
- Fixed itwt build break for IDF v5.3.1
- Added support for Wi-Fi Power Save and ITWT
- Added ITWT example
- Updated copyright check to allow Unlicensed or CC0-1.0 files
esp_wifi_set_inactive_time()esp_wifi_get_inactive_time()esp_wifi_sta_twt_config()esp_wifi_sta_itwt_setup()esp_wifi_sta_itwt_teardown()esp_wifi_sta_itwt_suspend()esp_wifi_sta_itwt_get_flow_id_status()esp_wifi_sta_itwt_send_probe_req()esp_wifi_sta_itwt_set_target_wake_time_offset()
- Allow external code to override Hosted BT Tx function by making it a
weakreference
- Add support for fragmentation of packets from sdio host to slave
- Fixed SoftAP operation issues