Commit Graph

218 Commits

Author SHA1 Message Date
Rahul Tank
27b34d60c1 Nimble: Added check to free keypair if already allocated to avoid memory
leak. Added an API that allows to free keypair
2022-06-07 13:38:15 +05:30
Geng Yuchao
cef8c506fd Synchronously modify the nibmle repo 2022-06-04 12:11:31 +08:00
Geng Yuchao
3ee9ce9d06 Sync nimble repo 2022-06-04 01:00:04 +08:00
Geng Yuchao
a692abd423 Optimize the Cmake file structure, support esp32c2.
Follow Kconfig to update the nimble config macro name.
2022-06-03 22:41:33 +08:00
Geng Yuchao
02636688eb Refactor Kconfig options structure 2022-06-03 22:41:20 +08:00
satish.solanke
3a42007680 Bluedroid porting changes for esp32h2
created common Kconfig for common flag of nimbble and Bluedroid

fix compile error

created common cfg file for controller

fix the compilation error on tip of master

added common controller flags and fixed compilation error

sdkconfig rename for target specific
2022-05-30 08:42:45 +00:00
Rahul Tank
95db4bbf05 NimBLE: Enabled ESP Timer support for esp32h2 2022-05-17 12:49:40 +05:30
Rahul Tank
e254d1f855 NimBLE: Correct the log level of timer reset value print 2022-04-22 16:21:28 +05:30
Rahul Tank
8b4e032255 Merge branch 'bugfix/sync_host_nocp_cmd' into 'master'
Nimble: Sync sending Host Number of Completed Packets command

See merge request espressif/esp-idf!17719
2022-04-18 21:54:10 +08:00
Rahul Tank
18df58f1df Nimble: Corrected default value for ATT_PREFERRED_MTU and ACL_BUF_SIZE 2022-04-14 16:13:21 +05:30
Rahul Tank
739cd66866 Nimble: Sync sending Host Number of Completed Packets command 2022-04-08 15:53:22 +05:30
Rahul Tank
c46e3ffd0c Wifi_prov : Fixed crash issue during provisioning using NimBLE 2022-03-25 15:21:16 +05:30
Rahul Tank
f376bb5d05 Add support in Nimble for ESP32H2 2022-03-14 11:57:53 +05:30
Anton Maklakov
924178d407 nimble: update because of warnings 2022-03-04 10:00:54 +07:00
Aditya Patwardhan
740f1afe20 Update nimble submodule 2022-03-03 01:37:10 +05:30
Rahul Tank
3387d816e2 Nimble: Check stack initialization status before executing stack command
Previous commit added checks in some functions that can be called
    without stack initalization. Corrected such instances.
2022-02-18 11:47:48 +05:30
Wang Mengyang
5e95537f9c component/bt/host/nimble: fixed memory leak due to timer not destroyed during NimBLE host start-stop 2021-12-20 15:49:14 +08:00
baohongde
c138e47f45 components/bt: Update licenses 2021-12-08 10:59:06 +08:00
Sudeep Mohanty
88aa3e78c3 NimBLE: Invoke xTimerGetExpiryTime in npl porting layer only when freertos timer is used
This commit adds an esp timer guard check to call in the function
npl_freertos_callout_remaining_ticks() to enable fetching remaning ticks
when esp timer is enabled.

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2021-12-03 15:57:19 +05:30
wangmengyang
8cfffa260b [nimble]: clear timer handler during de-initialization 2021-11-19 15:08:55 +08:00
isha pardikar
e2a37b2712 Merge branch 'bugfix/wifi_prov_mgr_crash' into 'master'
NimBLE: Fixed wifi_prov_mgr crash after provisioning

See merge request espressif/esp-idf!15793
2021-11-17 18:35:40 +05:30
Rahul Tank
897926d21c NimBLE: Modified timer not started / running warning print
Current check for valid timer throws a print which can mislead to be a crash. Modified the same

 Closes: https://github.com/espressif/esp-idf/issues/7550
2021-11-10 12:44:39 +05:30
Chinmay Chhajed
0319dcd23d Merge branch 'bugfix/nimble_x_component_key_check' into 'master'
NimBLE: Compare only x component of public key before pairing.

Closes BT-1928

See merge request espressif/esp-idf!15035
2021-10-22 12:37:02 +00:00
Rahul Tank
67bb97cbf3 Nimble: Removed Critical debug level from menuconfig, since it internally maps
to level Error.
2021-09-24 11:11:36 +05:30
Chinmay Chhajed
29d306e6ff NimBLE: Compare only x component of public key before pairing. 2021-09-23 18:30:01 +05:30
Rahul Tank
1ad7d0dac4 Nimble: Check stack status before executing stack command 2021-09-21 12:41:45 +08:00
Rahul Tank
e81facd3e8 Nimble: Add fix for crash in esp_timer deletion
Added change in nimble submodule to handle crash in case of non-started
timer is attempted to be deleted.
2021-07-13 16:20:49 +08:00
Rahul Tank
3159ba1d5a Add esp_timer_is_active function for Nimble stack to use esp_timer instead of FreeRTOS timer 2021-06-30 10:06:40 +05:30
“sonalipatil”
5175672050 Add support of NimBLE host to Blufi
Merges https://github.com/espressif/esp-idf/pull/6904
2021-06-28 19:53:33 +05:30
Mahavir Jain
f339506324 bt: use generic SPIRAM config option for memory alloc policy 2021-05-17 10:43:42 +00:00
Prasad Alatkar
03634ea64b NimBLE: Update NimBLE submodule to reattempt conn and to fix vulnerability
* Add workaround to overcome connection establishment failure error.

* Fix vulnerability during public key exchange in secure connection
2021-05-13 19:10:19 +05:30
Prasad Alatkar
3dfcaee9bd NimBLE: Add custom logging support and fix build error for broadcaster role
* Fix bug in nvs deletion of `ble_dev_record`.
2021-05-13 18:01:01 +08:00
Prasad Alatkar
7d4cfb6d53 NimBLE: Add max connection config option for ESP32C3 2021-04-20 02:41:58 +00:00
Jiang Jiang Jian
80d0f6c860 Merge branch 'nimble/add_error_prints_acl_buf' into 'master'
NimBLE: Add error prints for ACL buffer exhaustion in NPL

See merge request espressif/esp-idf!12665
2021-03-31 03:20:16 +00:00
Prasad Alatkar
b4861a11e6 NimBLE: Free AES context after use by calling mbedtls_free_aes
- Update NimBLE submodule to resolve issue observed while using mbedTLS as
  crypto stack during security exchanges.

Closes BT-1435, BT-1434
2021-03-24 13:26:36 +00:00
Prasad Alatkar
5d80d551cf NimBLE: Add error prints for ACL buffer exhaustion in NPL 2021-03-24 13:25:38 +00:00
Prasad Alatkar
f401e9716f NimBLE: Support APIs for whitelist remove and set packet length in controller 2021-01-20 11:58:33 +05:30
Prasad Alatkar
f959028486 NimBLE: Fix host flow control in NimBLE porting layer.
- Register `ble_hs_flow_acl_free` callback in NimBLE porting layer.
2021-01-19 17:03:00 +05:30
Chinmay Chhajed
62225cc47a NimBLE: BLE 5.0 related configuration changes
Added some changes like checking idf_target = BT_SOC_SUPPORT_5_0
and menuconfig option to enable/disable host based privacy.
2021-01-19 17:02:56 +05:30
Prasad Alatkar
8224aa69a2 NimBLE: Update NimBLE to latest 1.3.0 release 2021-01-15 16:57:29 +00:00
Artem Godlevskyi
3caa9699ae Added missing MYNEWT_VAL_BLE_L2CAP_COC_MPS definition
Signed-off-by: Prasad Alatkar <prasad.alatkar@espressif.com>

Merges https://github.com/espressif/esp-idf/pull/5825
2020-11-27 11:50:03 +00:00
Prasad Alatkar
922a994896 NimBLE: Fix misc coverity issues in NimBLE host
- NimBLE NVS : Additional check to account for NVS operation failure
- NimBLE host: Fix minor bug in ble_eddystone_set_adv_data_gen
- NimBLE host: remove recursive call, upstream PR: https://github.com/apache/mynewt-nimble/pull/857
2020-11-27 11:50:03 +00:00
Chinmay Chhajed
3c0f06adb2 NimBLE: host_rcv_pkt event buf size check.
Check if the size of HCI event buffer is greater than the received HCI
packet. If not then abort with the error message.
2020-10-05 12:14:47 +00:00
Prasad Alatkar
0b56a27e4a NimBLE: Add Non-Resolvable private address support and misc bug fixes
- Merges https://github.com/espressif/esp-nimble/pull/12
- Fixes repeated pairing failure in RPA feature

Closes https://github.com/espressif/esp-idf/issues/5530
2020-07-22 14:10:01 +05:30
Prasad Alatkar
2ef489005b NimBLE: Include upstream fixes and use macros for log level filtering
Change list:
- Reduces the size of the compiled binary, PR: https://github.com/espressif/esp-nimble/pull/6
- Null pointer check, PR: https://github.com/apache/mynewt-nimble/pull/701
- Pairing procedure abort on unexpected req: https://github.com/apache/mynewt-nimble/pull/710
- Fix conn flags after pairing: https://github.com/apache/mynewt-nimble/pull/730
- Remove notification for update process timeout (Vol 6, Part B, section 5.2 ):
  https://github.com/apache/mynewt-nimble/pull/782
- CCCD fix : https://github.com/apache/mynewt-nimble/pull/790 and
  https://github.com/apache/mynewt-nimble/pull/804
- Host based Privacy (RPA) fix: https://github.com/espressif/esp-nimble/pull/7

 Closes https://github.com/espressif/esp-nimble/issues/10

 Closes https://github.com/espressif/esp-idf/issues/4413
2020-05-11 05:36:50 +00:00
Prasad Alatkar
be8c847b06 NimBLE: Reset master and slave states on host reset
Closes IDFGH-2743 & IDFGH-2956
2020-04-01 10:09:26 +00:00
Prasad Alatkar
38fc242914 NimBLE: Fix build failures due to non static declarations in RPA feature
CLoses IDFGH-2891
2020-03-27 14:06:55 +08:00
Prasad Alatkar
2bc28bbd5a NimBLE: Fix NIMBLE_HS_FLOW_CTRL_TX_ON_DISCONNECT in esp_nimble_cfg and bleprph README 2020-03-27 14:05:32 +08:00
Hrishikesh Dhayagude
67a6fd6f3b NimBLE: Add support to IRAM allocation strategy
Added IRAM allocation provision under nimble_platform_mem_malloc()
2020-03-19 04:47:39 +00:00
Prasad Alatkar
48bd2d74b4 NimBLE: Add Host based privacy (RPA) feature support
- This feature removes dependency on controller to use privacy (RPA)
2020-03-06 11:02:18 +08:00
Prasad Alatkar
ee1ab95b98 NimBLE: Fix check for static random address & add MSYS_1 in menuconfig
Closes BT-522 & BT-523
2020-03-05 13:53:04 +08:00
Prasad Alatkar
bc7ce8e584 Update NimBLE submodule to fix bug in ble_hs_hci_rx_evt 2020-02-04 12:27:47 +05:30
Prasad Alatkar
4047f7e180 NimBLE: Misc changes in host flow control, ble_gap_unpair, ble_hs_hci_rx_evt & example
- Add menuconfig option for NimBLE host flow control
- Include changes in `blecent` example from upstream PR!702
- add ble_hs_lock in ble_gap_unpair Upstream PR!584
- ble_hs_hci_rx_evt, upstream PR!738

Closes https://github.com/espressif/esp-idf/issues/4243
2020-01-31 10:46:55 +05:30
Hrishikesh Dhayagude
91c8f324a9 NimBLE: Use dynamic buffers instead of static memory.
The NimBLE host buffers that consume a significant amount of memory are
now allocated dynamically.
The advantage is that, the memory can be reclaimed in cases where BLE
is turned off and not required for the current boot cycle
2020-01-23 00:55:51 +08:00
Felipe Neves
fc00236d79 components/esp_common: added esp_macros.h that aims to hold useful macros
esp_common/esp_compiler: renamed esp_macros file to a more specific one

esp_common/esp_compiler: removed CONTAINER_OF macro, it was a duplicate

components/freertos: placed likely macros around port and critical sections

component/freertos: placed likely macros on lists module

components/freertos: placed unlikely macros inside of assertion points, they likely wont fail

components/freertos: added likely macros on queue modules

FreeRTOS queues are one of most hot code path, because to queues itself tend to
be used a lot by the applications, besides that, queues are the basic primitive
to form both mutexes and semaphores, The focus here is to place likely
macros inside lowest level send and receive routines, since they're common
from all kobjects: semaphores, queues, mutexes and FR internals (like timer queue)

components/lwip: placed likely/unlikey on net-interfaces code

components/fatfs: added unlikely macros on disk drivers code

components/spiffs: added unlikely macros on low level fs driver

components/freertos: added likely/unlikely macros on timers and ticker

freertos/event_group: placed likely/unlikely macros on hot event group code paths

components/sdmmc: placed likely / unlikely macros on lower level path of sdmmc

components/bt: placed unlikely macros around bt HCI functions calling

components/lwip: added likely/unlikely macros on OS port code section

components/freertos: fix code style on tick handler
2020-01-03 14:42:49 -03:00
Prasad Alatkar
656005ef3d NimBLE: Fix erroneous behaviour of NimBLE porting layer when controller is not ready to receive 2019-12-01 15:22:51 +08:00
Prasad Alatkar
c5339779a7 NimBLE: Update NimBLE submodule to latest nimble-1.2.0-idf release 2019-10-29 12:52:05 +08:00
Hrishikesh Dhayagude
a26dfe70aa nimble: Miscellaneous changes
1. Update NimBLE submodule as per changes in adv interval and stop port
2. Make changes in ESP BLE Mesh NimBLE host code for the same
2019-10-24 14:38:01 +08:00
Hrishikesh Dhayagude
f58d7d14c7 components/bt: Add support of NimBLE host in ESP BLE Mesh 2019-10-21 20:18:21 +08:00
Hrishikesh Dhayagude
10fd2ae653 NimBLE: Set the default number of max connections to the controller's value
Also, update the NimBLE submodule to remove unwanted logging stuff
2019-10-17 12:54:34 +08:00
Prasad Alatkar
19375a674e NimBLE: Misc changes in NimBLE porting layer and menuconfig option
- Minor fix to remove while loop & delay while transmitting data from
  host to controller.
- Add menuconfig option to enable predefined public-private keypair for
  debugging (Vol. 3, Part H, 2.3.5.6.1)
2019-10-10 17:20:15 +08:00
Prasad Alatkar
fe08f435dc NimBLE: Add optional mbedTLS support to NimBLE
- Additional menuconfig option to select either mbedTLS or Tinycrypt from NimBLE.
- Addition of `CMAC` and `ECP_RESTARTABLE` to mbedTLS menuconfig option and
  `esp_config.h`.
- Changes NimBLE `component.mk` and `CMakeLists.txt` to support mbedTLS option.
- Minor changes to `app_mesh.c` application.
2019-09-30 14:15:43 +08:00
Prasad Alatkar
393eb1700d NimBLE: Add misc menuconfig options
- Add option to configure stack size of NimBLE host task, update NimBLE
  submodule for the same.
- Change max concurrent connections supported to 9 inline with controller.
2019-08-21 19:28:47 +08:00
Anton Maklakov
1beb0869e1 NimBLE: Update submodule to fix -Wstrict-prototypes warnings 2019-08-01 16:28:56 +07:00
Prasad Alatkar
1f0d682406 NimBLE: Update submodule to fix bug in delete bond procedure
- Fixes bug in `get_nvs_db_attribute` related to getting correct index while
  deleting bond in NVS.
- MR raised on esp-nimble branch: https://gitlab.espressif.cn:6688/espressif/esp-nimble/merge_requests/12
2019-07-29 19:00:21 +08:00
Hrishikesh Dhayagude
c75240a939 NimBLE: Give an option to configuration no of bonds and CCCD's to save through menuconfig 2019-07-19 14:34:57 +08:00
Prasad Alatkar
396258380a NimBLE: update nimble submodule
- Update submodule to fix https://jira.espressif.com:8443/browse/BT-192.
- Upstream PR: https://github.com/apache/mynewt-nimble/pull/427
2019-07-02 11:26:24 +08:00
Hrishikesh Dhayagude
21165edf41 Bluetooth component refactoring 2019-06-30 16:39:00 +08:00