diff --git a/btle/btle_discovery.cpp b/btle/btle_discovery.cpp index 56e2214..2e117e4 100644 --- a/btle/btle_discovery.cpp +++ b/btle/btle_discovery.cpp @@ -311,7 +311,8 @@ NordicServiceDiscovery::progressServiceDiscovery(void) while ((state == SERVICE_DISCOVERY_ACTIVE) && (serviceIndex < numServices)) { if ((matchingServiceUUID == UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN)) || (matchingServiceUUID == services[serviceIndex].getUUID().getShortUUID())) { - if (serviceCallback) { + + if (serviceCallback && (matchingCharacteristicUUID == UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN))) { serviceCallback(&services[serviceIndex]); }