diff --git a/src/NimBLEServer.cpp b/src/NimBLEServer.cpp index 485bfeb..fb03ea4 100644 --- a/src/NimBLEServer.cpp +++ b/src/NimBLEServer.cpp @@ -215,7 +215,9 @@ void NimBLEServer::start() { if(svc->m_removed == 0) { rc = ble_gatts_find_svc(&svc->getUUID().getNative()->u, &svc->m_handle); if(rc != 0) { - abort(); + NIMBLE_LOGW(LOG_TAG, "GATT Server started without service: %s, Service %s", + svc->getUUID().toString().c_str(), svc->isStarted() ? "missing" : "not started"); + continue; // Skip this service as it was not started } } diff --git a/src/NimBLEService.h b/src/NimBLEService.h index 21ec1af..6f33016 100644 --- a/src/NimBLEService.h +++ b/src/NimBLEService.h @@ -44,7 +44,7 @@ public: uint16_t getHandle(); std::string toString(); void dump(); - + bool isStarted() { return m_pSvcDef != nullptr; } bool start(); NimBLECharacteristic* createCharacteristic(const char* uuid,