We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c262749 commit ae3be89Copy full SHA for ae3be89
src/NimBLEAdvertising.cpp
@@ -227,6 +227,11 @@ void NimBLEAdvertising::start() {
227
if(pServer != nullptr) {
228
if(!pServer->m_gattsStarted){
229
pServer->start();
230
+ // When the server instance is created it resets GATT which
231
+ // seems to put the controller in a sleep loop? This causes a delay when
232
+ // advertising is started the first time. To avoid this we call ble_gap_adv_stop
233
+ // to get the controller ready.
234
+ ble_gap_adv_stop();
235
} else if(pServer->getConnectedCount() >= NIMBLE_MAX_CONNECTIONS) {
236
NIMBLE_LOGW(LOG_TAG, "Max connections reached - not advertising");
237
return;
0 commit comments