diff --git a/src/NimBLEService.cpp b/src/NimBLEService.cpp index b124fcb..0ae2e9f 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