diff --git a/source/nRF51ServiceDiscovery.cpp b/source/nRF51ServiceDiscovery.cpp index b89c585..c694d41 100644 --- a/source/nRF51ServiceDiscovery.cpp +++ b/source/nRF51ServiceDiscovery.cpp @@ -117,7 +117,7 @@ nRF51ServiceDiscovery::progressCharacteristicDiscovery(void) /* Iterate through the previously discovered characteristics cached in characteristics[]. */ while ((state == CHARACTERISTIC_DISCOVERY_ACTIVE) && (characteristicIndex < numCharacteristics)) { if ((matchingCharacteristicUUID == UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN)) || - ((matchingCharacteristicUUID == characteristics[characteristicIndex].getShortUUID()) && + ((matchingCharacteristicUUID == characteristics[characteristicIndex].getUUID()) && (matchingServiceUUID != UUID::ShortUUIDBytes_t(BLE_UUID_UNKNOWN)))) { if (characteristicCallback) { characteristicCallback(&characteristics[characteristicIndex]);