mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 09:39:10 -04:00
Merge branch 'bugfix/restart_ext_adv_after_discovery_v5.0' into 'release/v5.0'
Nimble: Updated bleprph example to re-enable ext adv after advertising is completed (v5.0) See merge request espressif/esp-idf!22542
This commit is contained in:
commit
86447548f8
@ -89,9 +89,13 @@ ext_bleprph_advertise(void)
|
|||||||
{
|
{
|
||||||
struct ble_gap_ext_adv_params params;
|
struct ble_gap_ext_adv_params params;
|
||||||
struct os_mbuf *data;
|
struct os_mbuf *data;
|
||||||
uint8_t instance = 1;
|
uint8_t instance = 0;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
/* First check if any instance is already active */
|
||||||
|
if(ble_gap_adv_active())
|
||||||
|
return;
|
||||||
|
|
||||||
/* use defaults for non-set params */
|
/* use defaults for non-set params */
|
||||||
memset (¶ms, 0, sizeof(params));
|
memset (¶ms, 0, sizeof(params));
|
||||||
|
|
||||||
@ -325,7 +329,9 @@ bleprph_gap_event(struct ble_gap_event *event, void *arg)
|
|||||||
case BLE_GAP_EVENT_ADV_COMPLETE:
|
case BLE_GAP_EVENT_ADV_COMPLETE:
|
||||||
MODLOG_DFLT(INFO, "advertise complete; reason=%d",
|
MODLOG_DFLT(INFO, "advertise complete; reason=%d",
|
||||||
event->adv_complete.reason);
|
event->adv_complete.reason);
|
||||||
#if !CONFIG_EXAMPLE_EXTENDED_ADV
|
#if CONFIG_EXAMPLE_EXTENDED_ADV
|
||||||
|
ext_bleprph_advertise();
|
||||||
|
#else
|
||||||
bleprph_advertise();
|
bleprph_advertise();
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user