summaryrefslogtreecommitdiff
path: root/src/Components/Ble
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-05-16 16:13:22 +0200
committerJF <jf@codingfield.com>2020-05-16 16:13:22 +0200
commitd6c6ac4cf5801e17caf7bfc0878423703ed0413b (patch)
tree81e72dcc449a54970346d79740254cd43a378482 /src/Components/Ble
parent56fba1c242eac45e3fde0a98602429ee95bf31c0 (diff)
Remove reference to NRF Softdevice in CMake and documentation.
Update documentation. Remove Asserts when starting advertising to prevent crash (known bug). Set version 0.5.0.
Diffstat (limited to 'src/Components/Ble')
-rw-r--r--src/Components/Ble/NimbleController.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Components/Ble/NimbleController.cpp b/src/Components/Ble/NimbleController.cpp
index 172bcb9f..2fe03571 100644
--- a/src/Components/Ble/NimbleController.cpp
+++ b/src/Components/Ble/NimbleController.cpp
@@ -126,14 +126,21 @@ void NimbleController::StartAdvertising() {
int res;
res = ble_gap_adv_set_fields(&fields);
- ASSERT(res == 0);
+ //ASSERT(res == 0);
res = ble_gap_adv_rsp_set_fields(&rsp_fields);
- ASSERT(res == 0);
+ //ASSERT(res == 0);
res = ble_gap_adv_start(addrType, NULL, 10000,
&adv_params, GAPEventCallback, this);
- ASSERT(res == 0);
+ //ASSERT(res == 0);
+
+ // TODO I've disabled these ASSERT as they sometime asserts and reset the mcu.
+ // For now, the advertising is restarted as soon as it ends. There may be a race condition
+ // that prevent the advertising from restarting reliably.
+ // I remove the assert to prevent this uncesseray crash, but in the long term, the management of
+ // the advertising should be improve (better error handling, and advertise for 3 minutes after
+ // the application has been woken up, for example.
}
int OnAllSvrDisco(uint16_t conn_handle,