diff --git a/src/NimBLEService.cpp b/src/NimBLEService.cpp index 73f00a5..fdc6830 100644 --- a/src/NimBLEService.cpp +++ b/src/NimBLEService.cpp @@ -248,6 +248,9 @@ bool NimBLEService::start() { * @return The handle associated with this service. */ uint16_t NimBLEService::getHandle() { + if (m_handle == NULL_HANDLE) { + ble_gatts_find_svc(&getUUID().getNative()->u, &m_handle); + } return m_handle; } // getHandle