-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-run ext adv after completion (IDFGH-9373) #10747
Conversation
sha=35926387738ba28c0c84d29c6e803ed15c5a8ae7 |
Hi @kevinhikaruevans , I found some issue with the patch. If connection was success , for extended adv , adv complete event is posted by stack. If we restart the ext adv here, then when the connection is disconnected, it will again try to restart ext_adv as it will invoke ext_bleprph_advertise in original code. . This results in crash since the previous instance of ext adv was already started by the new function call introduced in this patch. This may need more handling , i can check later. Have you not observed any issue in your testing ? `I (595) NimBLE_BLE_PRPH: BLE Host Task Started I (625) uart: queue free spaces: 8 I (5125) NimBLE: I (5135) NimBLE: advertise complete; reason=0 I (7085) NimBLE: I (10055) NimBLE: disconnect; reason=531 I (10095) NimBLE: assert failed: ext_bleprph_advertise main.c:116 (rc == 0) 0x4080919a: __ubsan_include at /esp-idf/components/esp_system/ubsan.c:313 TP : 0x40804eec T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130 S0/FP : 0x0000008e S1 : 0x00000001 A0 : 0x4081b6fc A1 : 0x4080f7d5 MHARTID : 0x00000000 Backtrace: panic_abort (details=details@entry=0x4081b6fc "assert failed: ext_bleprph_advertise main.c:116 (rc == 0)") at /esp-idf/components/esp_system/panic.c:452 |
Hi @rahult-github, I see the crash now. I was previously checking if the device was busy in rc = ble_gap_ext_adv_configure(instance, ¶ms, NULL,
bleprph_gap_event, NULL);
if (rc == BLE_HS_EBUSY) {
return;
} Just wondering, are you able to run multiple ble clients with ext adv without the patch? |
Hi @kevinhikaruevans , Please help check if attached patch works for you |
@rahult-github Thank you! Yes, that patch worked for me. I've updated the PR with that patch. |
sha=0b921fda149c69510258ba879e34cbeb1829cce0 |
Hi @kevinhikaruevans , I have below suggestions:
|
|
Changes part of master tree . Thanks for your contribution. |
Both extended and normal advertising should be reran when complete in this Nimble example. Without this, only a single BLE client is able to connect when
CONFIG_EXAMPLE_EXTENDED_ADV=1