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 cdb8cc1604
commit fb72cbe6b9
3 changed files with 17 additions and 1 deletions

View File

@@ -1355,6 +1355,15 @@ menu "Extra Features"
Disabling IRAM-optimized paths will place functions in FLASH (.irom.text)
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

@@ -2410,5 +2410,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