Skip to content

Commit e928897

Browse files
SumeetSingh19rahult-github
authored andcommitted
feat(nimble): Added two GATT features:
1. Automatically initiate security if a GATT service request fails 2. Encryption, Authentication, and Authorization requirement on CCCD
1 parent 5beacd1 commit e928897

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

components/bt/host/nimble/Kconfig.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,15 @@ config BT_NIMBLE_GATTC_PROC_PREEMPTION_PROTECT
12321232
can disrupt the GATT context,causing the service discovery callback to not be invoked.
12331233
A temporary list is maintained to preserve the GATT context and use it in case of preemption.
12341234

1235+
config BT_NIMBLE_GATTC_AUTO_PAIR
1236+
bool "Automatically pair upon receiving service request failure"
1237+
depends on BT_NIMBLE_ENABLED
1238+
default n
1239+
help
1240+
If enabled, when a service request (e.g. read, write) to a server fails, and the ATT
1241+
error suggests insufficient security, then the central will initiate pairing and retry
1242+
the service request.
1243+
12351244
menu "Host-controller Transport"
12361245
config BT_NIMBLE_TRANSPORT_UART
12371246
bool "Enable Uart Transport"

components/bt/host/nimble/port/include/esp_nimble_cfg.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,6 +2010,14 @@
20102010
#endif
20112011
#endif
20122012

2013+
#ifndef MYNEWT_VAL_BLE_GATTC_AUTO_PAIR
2014+
#ifdef CONFIG_BT_NIMBLE_GATTC_AUTO_PAIR
2015+
#define MYNEWT_VAL_BLE_GATTC_AUTO_PAIR CONFIG_BT_NIMBLE_GATTC_AUTO_PAIR
2016+
#else
2017+
#define MYNEWT_VAL_BLE_GATTC_AUTO_PAIR (0)
2018+
#endif
2019+
#endif
2020+
20132021
#ifndef MYNEWT_VAL_BLE_HOST_ALLOW_CONNECT_WITH_SCAN
20142022
#ifdef CONFIG_BT_NIMBLE_HOST_ALLOW_CONNECT_WITH_SCAN
20152023
#define MYNEWT_VAL_BLE_HOST_ALLOW_CONNECT_WITH_SCAN CONFIG_BT_NIMBLE_HOST_ALLOW_CONNECT_WITH_SCAN

0 commit comments

Comments
 (0)