fix(nimble): Added change to stop adv before starting new adv

This commit is contained in:
Rahul Tank
2026-07-24 11:51:15 +05:30
parent e717ab43ad
commit 75428d48e6
3 changed files with 17 additions and 1 deletions

View File

@@ -1262,6 +1262,14 @@ menu "Extra Features"
instead of DRAM (.iram.text/.text in internal RAM). Suitable for low-speed
GAP/GATT operations to reduce RAM usage.
config BT_NIMBLE_GAP_ALLOW_ADV_RESTART
bool "Allow restarting ongoing advertising"
default n
help
If enabled, stop ongoing advertising before starting it again with
new parameters,if any. If disabled, starting advertising while it is already
active returns BLE_HS_EALREADY.
endmenu
menu "NimBLE Mesh"

View File

@@ -2304,4 +2304,12 @@
#endif
#endif
#ifndef MYNEWT_VAL_BLE_GAP_ALLOW_ADV_RESTART
#ifdef CONFIG_BT_NIMBLE_GAP_ALLOW_ADV_RESTART
#define MYNEWT_VAL_BLE_GAP_ALLOW_ADV_RESTART CONFIG_BT_NIMBLE_GAP_ALLOW_ADV_RESTART
#else
#define MYNEWT_VAL_BLE_GAP_ALLOW_ADV_RESTART (0)
#endif
#endif
#endif