github espressif/esp-idf v4.0.4
ESP-IDF Release v4.0.4

latest releases: v5.4-dev, v5.2.1, v4.4.7...
2 years ago

Documentation for v4.0.4 is available at https://docs.espressif.com/projects/esp-idf/en/v4.0.4/

ESP-IDF v4.0.4 is the last bugfix update for ESP-IDF v4.0. ESP-IDF v4.3.1 is the latest stable release at time of writing.

As previously announced, Espressif will stop supporting v4.0 release after October 2021. For more information please see the ESP-IDF Support Policy. Customers who are using v4.0 release series are encouraged to migrate to more recent releases.

Obtaining v4.0.4

For full installation instructions, see the ESP-IDF Programming Guide.

The source files attached to this release will not work due to our use of git submodules. Use one of the following methods instead:

Using git

To get this release, use the following commands:

git clone -b v4.0.4 --recursive https://github.com/espressif/esp-idf.git esp-idf-v4.0.4
cd esp-idf-v4.0.4/

This is the recommended way of obtaining v4.0.4 of ESP-IDF.

Download an archive with submodules included

Attached to this release is an esp-idf-v4.0.4.zip archive. It includes .git directory and all the submodules, so can be used out of the box. This archive is provided for users who have connectivity issues preventing them from cloning from GitHub.

This archive can also be downloaded from Espressif's download server:
https://dl.espressif.com/github_assets/espressif/esp-idf/releases/download/v4.0.4/esp-idf-v4.0.4.zip

Changelog

This is the list of changes since release v4.0.3:

Major Bug Fixes

  • Fixed the flash_encrypted_write/read issue under 40M psram and 80M spiflash on ESP32 (#6322, #6254)
  • Update the SIG recommendations for BLE Mesh CVE issues
  • Fixed CVE-2021-37577: check for only X component of public key to avoid impersonation in passkey attack for BR/EDR

Breaking Changes

  • No breaking changes

Bluetooth

Controller

Bluetooth Low Energy

  • Fixed RX interrupt flooding during BLE scanning in the case that no RX buffer is available
  • Fixed the crash issue when starting scan
  • Removed duplicate events in r_lld_evt_end() function
  • Fixed BLE ACL Tx Flush issue during Reset/Reboot
  • Force to restart connection timer when RX buffers run out of space
  • Fixed the scan failed issue

Classic Bluetooth

  • Fixed handling of invalid feature page response
  • Fixed unable to initiate SCO connection when peer device does not accept sniff mode
  • Fixed the default sdkconfig options for controller_hci_uart example
  • Fixed CVE-2021-37577: check for only X component of public key to avoid impersonation in passkey attack for BR/EDR

Bluedroid

Classic Bluetooth

  • SPP: Fixed spp acceptor deadlock
  • A2DP: Fixed a2dp deint crash
  • SPP: Added some common FAQs in SPP Demo README
  • SPP: Fixed spp memory leak (#7238)
  • A2DP: Fixed A2DP sink blocked issues (#6712, #7100)
  • HFP: Fixed issue that acl can't disconnect using hfp_client disconnect API
  • Fixed the timer collision in function bta_sys_start_timer() used by role switch (#7203)

Bluetooth Low Energy

  • Fixed data length update failed
  • Fixed no data length update callback when the data length of value being used is the same as the value to be set
  • Fixed some BLE document description error
  • Fixed the issue when BLE scan parameters setting

NimBLE

  • Include NimBLE upstream fix to remove build error when NIMBLE_BLE_ADVERTISE is not set
  • Added fix while deleting peer_dev_records entry in NVS
  • Added change to check for stack status before executing stack commands.

ESP-BLE-Mesh

  • Make Unprovisioned Device Beacon interval configurable (#6722)
  • Update the SIG recommendations for BLE Mesh CVE issues

Wi-Fi Coexistence

  • Deleted the Bluetooth Kconfig option: BLE ADV priority high

Wi-Fi

  • Fixed amsdu and fragment vulnerabilities
  • Fixed issues with bcast deauth in PMF connection
  • Added WPS strict config option
  • Fixed Enterprise connection issue with windows server
  • Fixed airkiss and esp-touch find channel crash issue

Ethernet

  • Speed up Ethernet start up process
  • Fixed eth2ap example crash issue (#7260)

Security

  • Add (configurable) feature to disable UART Download mode for ESP32 ECO3 silicon
  • flash_encryption: Fixed the flash_encrypted_write/read issue under 40M psram and 80M spiflash on ESP32 (#6322, #6254)

Peripheral Drivers

  • UART: Added missing critical section wrappers around rx_buffered_len (#6396)
  • MCPWM: Fixed wrong deadtime preset modes (#7321)

Core System

  • SoC: Added dummy bytes to end of flash.text to prevent errors with CPU prefetching instructions past the end
  • Increased timeouts when using the portMUX debugging feature
  • Fixed the internal devices/registers access corruption due to concurrent read/write by a spinlock
  • Fixed possible deadlock when using pthread_join() and log level set to Debug or higher
  • Fixed C++ exception stubs. No linkage of large unwinding code parts when building with -fno-exception anymore
  • esp_event: Fixed and improved docs (#6761)
  • Bootloader: Improved XMC flash stabilities as main flash
  • Bootloader: Added unlock function patch in bootloader to make GD flash more stable

newlib libc

  • Fix for FD_ISSET macro when n==-1

HTTP Client

  • Fixed memory leak identified by cppcheck
  • Fix header truncated when responded header length over buffer_size (#6370)
  • Fixed handling of EAGAIN return to address HTTPS connection abort issue

mbedTLS

  • Upgrade to release v2.16.11

ESP-MQTT

  • Added a new API to enqueue publish messages with qos>0

Storage

  • vfs/uart: Fixed memory leak identified by cppcheck

FreeModbus

  • Increased the maximum modbus tasks priority
  • Fixed error handling in mbc_master_get(set)_parameter() for duplicate parameter key in parameter descriptor list (#7362)
  • Fixed slave destroy bug when master and slave init simultaneously
  • Fixed master and slave use the same timer group index (#4699)
  • Fixed RS485 rts de-assert fail when tx delayed (#6728)
  • Added the FMB_PORT_TASK_AFFINITY kconfig option for modbus tasks (#6700)

Tools

  • Catch the correct exception raised when the external tool is not available (#7140)
  • Added support for installation on arm64 macOS
  • Added possibility of setting a mirror for all GitHub asset URLs downloaded as part of IDF Tools install process
  • Fixed a bug in ldgen where an object file name gets truncated with mapping symbols
  • gcov: Fixed the on-the-fly (non-hardcoded) gcov dumping
  • Upgrade OpenOCD version to v0.10.0-esp32-20210902

Build System

  • Fixed overriding Python path with -DPYTHON when building IDF as CMake library (#6285)
  • Improved error message if the Python dependency check completely fails to run due to an issue with the Python interpreter
  • Define IDF_VERSION_MAJOR, IDF_VERSION_MINOR, IDF_VERSION_PATCH variables during the early expansion phase of component CMakeLists.txt files

External Libraries

  • cJSON: Updated cJSON submodule to v1.7.15
  • expat: Update library from 2.2.9 to 2.4.1
  • nghttp2: Upgraded to v1.41.0

Examples

  • esp-modem: Fixed PPP stack smashing protect failure in OVERALL mode
  • esp-modem: Added access technology used by the modem
  • esp-modem: Added get operator functionality for BG96 and SIM800L

Documentation

  • SPI: Fixed the default maximum transaction length

Don't miss a new esp-idf release

NewReleases is sending notifications on new releases.