Skip to content

Commit 12639ef

Browse files
committed
feat(nimble): Added some fixes for autopts testing
1 parent 7411eaf commit 12639ef

File tree

16 files changed

+58
-46
lines changed

16 files changed

+58
-46
lines changed

components/bt/controller/esp32c6/esp_bt_cfg.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ extern "C" {
4040
#define DEFAULT_BT_LE_HCI_EVT_HI_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_COUNT)
4141
#define DEFAULT_BT_LE_HCI_EVT_LO_BUF_COUNT MYNEWT_VAL(BLE_TRANSPORT_EVT_DISCARDABLE_COUNT)
4242
#define DEFAULT_BT_LE_POWER_CONTROL_ENABLED MYNEWT_VAL(BLE_POWER_CONTROL)
43+
#define DEFAULT_BT_LE_SUBRATE_ENABLED MYNEWT_VAL(BLE_CONN_SUBRATING)
4344
#if defined(CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT)
4445
#define DEFAULT_BT_LE_50_FEATURE_SUPPORT (1)
4546
#else
@@ -144,6 +145,8 @@ extern "C" {
144145
#define DEFAULT_BT_LE_HCI_UART_CTS_PIN (-1)
145146
#define DEFAULT_BT_LE_HCI_UART_RTS_PIN (-1)
146147
#endif
148+
149+
#define DEFAULT_BT_LE_SUBRATE_ENABLED 0
147150
#endif
148151

149152
#define DEFAULT_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF CONFIG_BT_LE_COEX_PHY_CODED_TX_RX_TLIM_EFF

components/bt/host/nimble/Kconfig.in

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -690,40 +690,38 @@ if BT_NIMBLE_50_FEATURE_SUPPORT
690690
default n
691691
help
692692
Enable support for Connectionless and Connection Oriented Direction Finding
693-
694-
menuconfig BT_NIMBLE_GATT_CACHING
695-
bool "Enable GATT caching"
696-
depends on BT_NIMBLE_ENABLED && BT_NIMBLE_50_FEATURE_SUPPORT
697-
select BT_NIMBLE_DYNAMIC_SERVICE
698-
help
699-
Enable GATT caching
700-
config BT_NIMBLE_GATT_CACHING_MAX_CONNS
701-
int "Maximum connections to be cached"
702-
depends on BT_NIMBLE_GATT_CACHING
703-
default 1
704-
help
705-
Set this option to set the upper limit on number of connections to be cached.
706-
config BT_NIMBLE_GATT_CACHING_MAX_SVCS
707-
int "Maximum number of services per connection"
708-
depends on BT_NIMBLE_GATT_CACHING
709-
default 64
710-
help
711-
Set this option to set the upper limit on number of services per connection to be cached.
712-
config BT_NIMBLE_GATT_CACHING_MAX_CHRS
713-
int "Maximum number of characteristics per connection"
714-
depends on BT_NIMBLE_GATT_CACHING
715-
default 64
716-
help
717-
Set this option to set the upper limit on number of characteristics per connection to be cached.
718-
config BT_NIMBLE_GATT_CACHING_MAX_DSCS
719-
int "Maximum number of descriptors per connection"
720-
depends on BT_NIMBLE_GATT_CACHING
721-
default 64
722-
help
723-
Set this option to set the upper limit on number of descriptors per connection to be cached.
724693
endif
725694

726-
695+
menuconfig BT_NIMBLE_GATT_CACHING
696+
bool "Enable GATT caching"
697+
depends on BT_NIMBLE_ENABLED
698+
select BT_NIMBLE_DYNAMIC_SERVICE
699+
help
700+
Enable GATT caching
701+
config BT_NIMBLE_GATT_CACHING_MAX_CONNS
702+
int "Maximum connections to be cached"
703+
depends on BT_NIMBLE_GATT_CACHING
704+
default BT_NIMBLE_MAX_CONNECTIONS
705+
help
706+
Set this option to set the upper limit on number of connections to be cached.
707+
config BT_NIMBLE_GATT_CACHING_MAX_SVCS
708+
int "Maximum number of services per connection"
709+
depends on BT_NIMBLE_GATT_CACHING
710+
default 64
711+
help
712+
Set this option to set the upper limit on number of services per connection to be cached.
713+
config BT_NIMBLE_GATT_CACHING_MAX_CHRS
714+
int "Maximum number of characteristics per connection"
715+
depends on BT_NIMBLE_GATT_CACHING
716+
default 64
717+
help
718+
Set this option to set the upper limit on number of characteristics per connection to be cached.
719+
config BT_NIMBLE_GATT_CACHING_MAX_DSCS
720+
int "Maximum number of descriptors per connection"
721+
depends on BT_NIMBLE_GATT_CACHING
722+
default 64
723+
help
724+
Set this option to set the upper limit on number of descriptors per connection to be cached.
727725
config BT_NIMBLE_GATT_CACHING_DISABLE_AUTO
728726
bool "Do not start discovery procedure automatically upon receiving Out of Sync"
729727
depends on BT_NIMBLE_GATT_CACHING
@@ -935,6 +933,12 @@ menu "GAP Service"
935933
help
936934
Enable the LE GATT Security Level Characteristic
937935

936+
config BT_NIMBLE_SVC_GAP_RPA_ONLY
937+
bool "Resolvable Private Address Only characteristic"
938+
default n
939+
help
940+
Enable the Resolvable Private Address Only characteristic
941+
938942
endmenu
939943

940944
menu "BLE Services"

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -1818,6 +1818,11 @@
18181818
CONFIG_BT_NIMBLE_SVC_GAP_GATT_SECURITY_LEVEL
18191819
#endif
18201820

1821+
#ifndef MYNEWT_VAL_BLE_SVC_GAP_RPA_ONLY
1822+
#define MYNEWT_VAL_BLE_SVC_GAP_RPA_ONLY \
1823+
CONFIG_BT_NIMBLE_SVC_GAP_RPA_ONLY
1824+
#endif
1825+
18211826
/*** nimble/transport */
18221827
#ifndef MYNEWT_VAL_BLE_HCI_TRANSPORT_EMSPI
18231828
#define MYNEWT_VAL_BLE_HCI_TRANSPORT_EMSPI (0)

components/bt/include/esp32c6/include/esp_bt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ typedef struct {
276276
.ignore_wl_for_direct_adv = 0, \
277277
.enable_pcl = DEFAULT_BT_LE_POWER_CONTROL_ENABLED, \
278278
.csa2_select = DEFAULT_BT_LE_50_FEATURE_SUPPORT, \
279-
.enable_csr = 0, \
279+
.enable_csr = DEFAULT_BT_LE_SUBRATE_ENABLED, \
280280
.ble_aa_check = DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS, \
281281
.ble_llcp_disc_flag = BT_LE_CTRL_LLCP_DISC_FLAG, \
282282
.scan_backoff_upperlimitmax = BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX, \

examples/bluetooth/esp_hid_host/main/esp_hid_gap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ nimble_hid_gap_event(struct ble_gap_event *event, void *arg)
998998
static esp_err_t start_nimble_scan(uint32_t seconds)
999999
{
10001000
uint8_t own_addr_type;
1001-
struct ble_gap_disc_params disc_params;
1001+
struct ble_gap_disc_params disc_params = {0};
10021002
int rc;
10031003

10041004
/* Figure out address to use while advertising (no privacy for now) */

examples/bluetooth/nimble/ble_cts/cts_cent/main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static void
145145
ble_cts_cent_scan(void)
146146
{
147147
uint8_t own_addr_type;
148-
struct ble_gap_disc_params disc_params;
148+
struct ble_gap_disc_params disc_params = {0};
149149
int rc;
150150

151151
/* Figure out address to use while advertising (no privacy for now) */

examples/bluetooth/nimble/ble_enc_adv_data/enc_adv_data_cent/main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ static void
183183
enc_adv_data_cent_scan(void)
184184
{
185185
uint8_t own_addr_type;
186-
struct ble_gap_disc_params disc_params;
186+
struct ble_gap_disc_params disc_params = {0};
187187
int rc;
188188

189189
/* Figure out address to use while advertising (no privacy for now) */

examples/bluetooth/nimble/ble_htp/htp_cent/main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static void
263263
ble_htp_cent_scan(void)
264264
{
265265
uint8_t own_addr_type;
266-
struct ble_gap_disc_params disc_params;
266+
struct ble_gap_disc_params disc_params = {0};
267267
int rc;
268268

269269
/* Figure out address to use while advertising (no privacy for now) */

examples/bluetooth/nimble/ble_l2cap_coc/coc_blecent/main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ static void
190190
blecent_scan(void)
191191
{
192192
uint8_t own_addr_type;
193-
struct ble_gap_disc_params disc_params;
193+
struct ble_gap_disc_params disc_params = {0};
194194
int rc;
195195

196196
/* Figure out address to use while advertising (no privacy for now) */

0 commit comments

Comments
 (0)