Commit Graph

36645 Commits

Author SHA1 Message Date
Aditi
89bcd5636e fix(wpa_supplicant): Fix for sending alternate ft-auth in roaming 2025-04-07 12:22:23 +05:30
Aditi
b49a48ae8e fix(wpa_supplicant): Add two separate flags for RRM and WNM
Added two separate flags CONFIG_RRM(80211k) and CONFIG_WNM(80211v)
    flags under IEEE80211KV support flag.
2025-04-07 12:22:23 +05:30
Aditi
356d2511eb fix(esp_wifi): Add fix for error handling for FT-Auth 2025-04-07 12:22:23 +05:30
Nachiket Kukade
2d913cbd01 fix(wpa_supplicant): Fix some coverity issues in wpa_supplicant
1. Fix leak in SoftAP while sending SAE Confirm
2. Move NULL check before pointer is getting used
3. Remove some dead code
2025-04-07 12:22:23 +05:30
wangtao@espressif.com
9795558c03 fix(wifi): fix build issue when disable wpa3 sae 2025-04-07 12:22:23 +05:30
Shreyas Sheth
03b2f53f76 fix(wifi): Resolve comments for softap fixes 2025-04-07 12:22:23 +05:30
Shreyas Sheth
fd521fed30 fix(wifi): Resolve comments on feature/softap_fixes_for_ceritification 2025-04-07 12:22:23 +05:30
Shreyas Sheth
f5afc4a123 fix(wifi): Make sure auth is sent after sae process 2025-04-07 12:22:23 +05:30
Shreyas Sheth
241954faa3 feat(wifi): Add support for transition_disable for softAP
Bugfix rsnxe len for assoc req
2025-04-07 12:22:23 +05:30
Rahul Tank
51b965e29f Merge branch 'bugfix/handle_invalid_rd_rem_feat_v5.2' into 'release/v5.2'
fix(nimble): Handle connection posting condition (v5.2)

See merge request espressif/esp-idf!38229
2025-04-07 12:04:19 +08:00
Jiang Jiang Jian
286cebd4f3 Merge branch 'bugfix/pmkid_password_mismatch_v5.2' into 'release/v5.2'
fix(wifi): Fix wrong PMKSA cache entry being used when wifi password is changed (Backport v5.2)

See merge request espressif/esp-idf!38251
2025-04-07 11:35:36 +08:00
Sajia
a3530f5098 fix(wifi): Fix crash when set config is called with changed password
Closes https://github.com/espressif/esp-idf/issues/15584
2025-04-06 19:09:19 +05:30
Sarvesh Bodakhe
27f45e1ab8 fix(wifi): Fix wrong PMKSA cache entry being used when wifi password is changed 2025-04-06 19:08:55 +05:30
Aditya Patwardhan
2652435b07 Merge branch 'fix/examples_python3.13_ssl_conn_failure_v5.2' into 'release/v5.2'
Change in Python3.13's default ssl context caused SSL connection failure (v5.2)

See merge request espressif/esp-idf!38201
2025-04-04 13:56:57 +08:00
Island
a67f6742db Merge branch 'bugfix/fixed_c2eco4_ble_crash_issue_5.2' into 'release/v5.2'
fix(ble): fixed a heap assertion issue when enabling BLE for esp32c2 v2.0

See merge request espressif/esp-idf!38215
2025-04-03 14:42:53 +08:00
Rahul Tank
01a11e1e88 fix(nimble): Handle connection posting condition 2025-04-03 11:08:38 +05:30
harshal.patil
2acb037138 fix(examples): Example CA certs must contain the Key Usage parameter
- Example CA certificates that are used for self-signed client certificates
need to include the Key Usage parameter.
- Python3.13 changed the default context of the SSL context that is
generated using ssl.create_default_context() by enabling the VERIFY_X509_STRICT
flag by default
2025-04-03 10:53:26 +05:30
Jiang Jiang Jian
1512f758ce Merge branch 'fix/fix_esp32s3_reboot_cache_failure_v5.2' into 'release/v5.2'
fix(esp_system): fix possible cache_error by another core accessing flash in esp_restart (v5.2)

See merge request espressif/esp-idf!37587
2025-04-03 10:27:54 +08:00
morris
1800e0f24d Merge branch 'fix/usb-host-device-close-err-give-semaphore_v5.2' into 'release/v5.2'
fix(usb_host): Give semaphore on attempted close of non-opened device (backport v5.2)

See merge request espressif/esp-idf!38153
2025-04-03 10:23:31 +08:00
morris
251b05c576 Merge branch 'fix/i2s_iram_safe_issue_while_use_psram_v5.2' into 'release/v5.2'
fix(i2s): fixed failure when dma is iram_safe but i2s not (v5.2)

See merge request espressif/esp-idf!38005
2025-04-03 10:20:03 +08:00
Shu Chen
26d2451d0f Merge branch 'feat/update_ot_upstream_v52' into 'release/v5.2'
feat(openthread): update openthread upstream submodule to support BR DNS resolution (v5.2)

See merge request espressif/esp-idf!38186
2025-04-03 09:52:48 +08:00
Shen Weilong
f8417bd2b8 fix(ble): fixed a heap assertion issue when enabling BLE for esp32c2 v2.0 2025-04-03 08:56:19 +08:00
Roland Dobai
c7b6135800 Merge branch 'fix/remove-unused-from-gdbinit_cmake_v5.2' into 'release/v5.2'
fix(tools): remove unused variables in gdbinit.cmake (v5.2)

See merge request espressif/esp-idf!38047
2025-04-02 15:15:05 +08:00
Tan Yan Quan
87cc100e1d feat(openthread): increase CI timeout for dns CLI commands 2025-04-02 14:12:40 +08:00
Tan Yan Quan
19d1303185 feat(openthread): update thread-lib to support BR DNS resolution 2025-04-02 14:12:19 +08:00
Tan Yan Quan
42d111e320 feat(openthread): revert to OT upstream main branch 2025-04-02 12:06:10 +08:00
Tan Yan Quan
b953242439 fix(openthread): change include statement to updated upstream path 2025-04-02 12:05:49 +08:00
Tan Yan Quan
cc1b9b3236 fix(openthread): update openthread upstream to support BR DNS resolution 2025-04-02 12:03:38 +08:00
Marius Vikhammer
20ab752e3f Merge branch 'fix/ringbuf_allow_split_receive_crash_v5.2' into 'release/v5.2'
fix(ringbuf): xRingbufferReceive() crashes for allow-split buffers (v5.2)

See merge request espressif/esp-idf!37924
2025-04-01 14:56:06 +08:00
Rahul Tank
7317312110 Merge branch 'bugfix/reattempt_sync_failed_unlock_v5.2' into 'release/v5.2'
fix(nimble): Added ble_hs_unlock for resync failed (v5.2)

See merge request espressif/esp-idf!38099
2025-04-01 14:35:43 +08:00
Island
8407b1d859 Merge branch 'feat/support_blecrt_359_v5.2' into 'release/v5.2'
Support BLE vendor hci set rx sensie and max gain on esp32c3 (v5.2)

See merge request espressif/esp-idf!38128
2025-04-01 11:04:34 +08:00
igor.masar
5609df4096 fix(usb_host): Fix return code and description
Changed error code from ESP_ERR_INVALID_STATE to ESP_ERR_NOT_FOUND
when the client never opened the device.
Updated function documentation to correctly reflect return values.
2025-03-31 23:44:37 +02:00
Myk Melez
a40a50998e fix(usb_host): Give semaphore on attempted close of non-opened device
If you call *usb_host_device_close()* for a device that isn't open, the function exits early,
without giving back the semaphore it took, which causes any other call that tries to take
that semaphore to hang indefinitely.

Strangely, there's redundant handling of this condition, with two checks in a row that both handle
the case where `_check_client_opened_device(client_obj, dev_addr)` returns `false`:

```c
    HOST_CHECK_FROM_CRIT(_check_client_opened_device(client_obj, dev_addr), ESP_ERR_NOT_FOUND);
    if (!_check_client_opened_device(client_obj, dev_addr)) {
        // Client never opened this device
        ret = ESP_ERR_INVALID_STATE;
        HOST_EXIT_CRITICAL();
        goto exit;
    }
…
exit:
    xSemaphoreGive(p_host_lib_obj->constant.mux_lock);
    return ret;
```

The first line is the one that exits early, as HOST_CHECK_FROM_CRIT returns its second parameter
if its first parameter is false, without giving back the semaphore (although it does exit
the critical section).

The subsequent block handles the exact same case, except that it ensures the semaphore is given
back before returning. Currently, this block is never reached.

Perhaps the first check was added, then someone noticed the issue and added the second check,
but they forgot to remove the first one.

In any case, this PR removes the first check, so the second check can properly handle this case
by giving back the semaphore before returning.

This bug appears to have been present in the initial commit of the USB Host library to the ESP-IDF
repo: accbaee57c

Of course, if you never try to close a non-opened device, then you won't encounter it!
Unfortunately, I have some code that tried to do that, which is how I found the issue.
2025-03-31 23:44:37 +02:00
morris
47befdb5ea Merge branch 'bugfix/ledc_fade_stop_race_condition_v5.2' into 'release/v5.2'
fix(ledc): fix race condition in ledc_fade_stop causing assert failure (v5.2)

See merge request espressif/esp-idf!38082
2025-03-31 16:46:49 +08:00
morris
0724b14443 Merge branch 'contrib/github_pr_15484_v5.2' into 'release/v5.2'
fix(twai): fixed twai assert fail during recover (GitHub PR) (v5.2)

See merge request espressif/esp-idf!37990
2025-03-31 16:46:12 +08:00
Chen Jian Hua
c8cf2d6610 feat(bt): Update bt lib for ESP32-C3 and ESP32-S3(566c8e3)
- Support BLE vendor hci set RX sensitivity and AGC gain command


(cherry picked from commit 8742bbe553)

Co-authored-by: chenjianhua <chenjianhua@espressif.com>
2025-03-31 12:05:20 +08:00
Shu Chen
c78a0c5854 Merge branch 'feat/add_config_to_set_addrfamily_v5.2' into 'release/v5.2'
feat(tcp_transport): add an api to configure the addr family (v5.2)

See merge request espressif/esp-idf!37913
2025-03-31 10:56:32 +08:00
Wang Meng Yang
fed9272ffa Merge branch 'bugfix/sec_service_record_conn_fail_v5.2' into 'release/v5.2'
fix(bt/bluedroid): fix the issue of connection failure when initializing multiple profiles(v5.2)

See merge request espressif/esp-idf!38076
2025-03-31 07:19:53 +08:00
Rahul Tank
daeceb735e Merge branch 'fix/periodic_adv_example_v5.2' into 'release/v5.2'
fix(nimble):Fix conversion for min-max itvl of periodic adv param (v5.2)

See merge request espressif/esp-idf!38093
2025-03-29 19:46:23 +08:00
Jiang Jiang Jian
cfd0f4795f Merge branch 'backport/backport_some_changes_to_v5.2' into 'release/v5.2'
fix(wifi): fix some wifi bugs(backport v5.2)

See merge request espressif/esp-idf!38012
2025-03-28 16:40:41 +08:00
Astha Verma
6f0a878e40 fix(nimble): Added ble_hs_unlock for resync failed 2025-03-28 12:18:36 +05:30
Abhinav Kudnar
1ea064c497 fix(nimble): Fix conversion for min-max itvl of periodic adv param 2025-03-28 14:21:12 +08:00
Song Ruo Jing
7280739e3b fix(ledc): fix race condition in ledc_fade_stop causing assert failure
Closes https://github.com/espressif/esp-idf/issues/15580
2025-03-27 20:17:13 +08:00
xiongweichao
450f900e22 fix(bt/bluedroid): fix the issue of connection failure when initializing multiple profiles
- Due to the number of service security records exceeding the maximum value, the connection failed
2025-03-27 19:59:34 +08:00
Roland Dobai
cc0f7dbd68 Merge branch 'fix/check_python_dependencies_v5.2' into 'release/v5.2'
fix(tools): handle packages with dots in their names during dependency checks (v5.2)

See merge request espressif/esp-idf!38064
2025-03-27 19:38:41 +08:00
yinqingzhao
170dedca9e fix(wifi): fix some wifi bugs 2025-03-27 17:55:00 +08:00
Island
a40b0e241a Merge branch 'feature/add_vendor_ble_cmd_definitions_5.2' into 'release/v5.2'
Feature/add vendor ble cmd definitions (v5.2)

See merge request espressif/esp-idf!37960
2025-03-27 17:15:23 +08:00
Frantisek Hrbata
8e40868d84 fix(tools): handle packages with dots in their names during dependency checks
The `setuptools` package starting with `v70.1.0`[1] contains built-in
`bdist_wheel` command. Before this version `setuptools` relied on the
`bdist_wheel` command implementation from the `wheel` package. Starting with
`setuptools` `v75.8.1` the `PEP 491`[3] restrictions on the distribution name
of a wheel package are enforced[4], replacting also `.` with `_`.  Note that
`PEP 491` actually allows `.` in the distribution name, but for some reason the
latest packaging docs[10][11] does not, stating that `.` should be replaced
with `_`. This was discussion here[12].

Also the `wheel` package starting with `v0.45.0`[5] is using the `bdist_wheel`
command from `setuptools`.  This means that any package which has `.` in its
distribution name, like `ruamel.yaml.clib`, can have different wheel name,
depending on which version of the `bdist_wheel` command was used.

The `bdist_wheel` command from setuptools prior `v75.8.1` or `wheel` prior
`v0.45.0` will keep the dots in distribution name preserved.  For exaple the
`ruamel.yaml.clib` package will have distribution name
`ruamel.yaml.clib-0.2.12.dist-info. Newer versions will replace the dots with
`_` according to [10][11], creating distribution like
`ruamel_yaml_clib-0.2.12.dist-info`.

From packaging point of view `ruamel.yaml.clib-0.2.12.dist-info` and
`ruamel_yaml_clib-0.2.12.dist-info` are the same packages, but this is not
reflected in `importlib.metadata` prior python 3.10[9], which does not perform
name normalization prior the distribution search. This causes the `version`
from `importlib.metadata` to fail on python prior the 3.10 version if the
package with dots in distribution name was generated with normalized paths with
newer `setuptools`. Note that the distribution name normalization was
backported to some later 3.9 python version.

Let's demonstrate this behavior on a simple package with the
`my.minimal.package` name.

```
my_minimal_package/
├── pkg
│   └── __init__.py
└── setup.py

from setuptools import setup, find_packages

setup(
    name='my.minimal.package',
    version='0.1.0',
    packages=find_packages(),
    install_requires=[],
    entry_points={},
)
```

With python 3.9.0 search for `my.minimal.package` fails because
of the missing name normalization.
```
docker run --rm -it --platform linux/x86_64 python:3.9.0 bash
python -m venv venv
. venv/bin/activate
pip install setuptools==v75.8.1
python setup.py bdist_wheel
pip install dist/my_minimal_package-0.1.0-py3-none-any.whl
python
Python 3.9.0 (default, Nov 18 2020, 13:28:38)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from importlib.metadata import version as get_version
>>> get_version('my.minimal.package')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 551, in version
    return distribution(distribution_name).version
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 524, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 187, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: my.minimal.package
>>> get_version('my_minimal_package')
'0.1.0'
```

With python 3.10.0 search for both `my.minimal.package` and
`my_minimal_package` succeeds.
```
docker run --rm -it --platform linux/x86_64 python:3.10.0 bash
python
Python 3.10.0 (default, Dec  3 2021, 00:21:30) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from importlib.metadata import version as get_version
>>> get_version('my.minimal.package')
'0.1.0'
>>> get_version('my_minimal_package')
'0.1.0'
```

In our `tools/check_python_dependencies.py` we cannot relay on the default
distribution finder, used in the `version` function from `importlib.metadata`,
to do name normalization on older python versions.  To cope with this,
implement a fallback version search. If `version` fails with
`PackageNotFoundError`, do the name normalization according to [10][11] and try
again.

Note: There is also a `wheel`[6][7] `v0.43.0` package embeded in `setuptools`
along with the new implementation[8].  This one seems to be used if the
external `wheel` package is not available but imported. TBH this is all kinda
messy and I may have overlooked something.

* [1] https://setuptools.pypa.io/en/stable/history.html#v70-1-0
* [2] https://setuptools.pypa.io/en/stable/history.html#v75-8-1
* [3] https://peps.python.org/pep-0491/#escaping-and-unicode
* [4] https://github.com/pypa/setuptools/pull/4766/files
* [5] https://wheel.readthedocs.io/en/stable/news.html
* [6] https://github.com/pypa/setuptools/blob/main/setuptools/_vendor/wheel/__init__.py
* [7] https://github.com/pypa/setuptools/issues/1386
* [8] https://github.com/pypa/setuptools/blob/main/setuptools/command/bdist_wheel.py
* [9] c6ca368867
* [10] https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization
* [11] https://packaging.python.org/en/latest/specifications/binary-distribution-format/
       #escaping-and-unicode
* [12] https://github.com/pypa/setuptools/issues/3777

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-03-27 08:05:20 +01:00
Island
ebd8f96a02 Merge branch 'feature/ble_5_1_direction_finding_master_20250311_v5.2' into 'release/v5.2'
Feature/ble 5 1 direction finding master 20250311 v5.2

See merge request espressif/esp-idf!38011
2025-03-27 11:43:48 +08:00
Jiang Jiang Jian
b2cd934f4e Merge branch 'bugfix/fix_scan_info_error_in_lr_only_mode_v5.2' into 'release/v5.2'
fix(wifi): Fixed the scan information error in LR only mode (v5.2)

See merge request espressif/esp-idf!37874
2025-03-26 21:33:30 +08:00