diff --git a/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothCommunication.java b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothCommunication.java index 7e759c84..777bb64d 100644 --- a/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothCommunication.java +++ b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothCommunication.java @@ -553,7 +553,11 @@ public abstract class BluetoothCommunication { catch (Exception e) { // Empty } - gatt.discoverServices(); + if (!gatt.discoverServices()) { + Timber.e("Could not start service discovery"); + setBtStatus(BT_STATUS_CODE.BT_CONNECTION_LOST); + disconnect(false); + } } else if (newState == BluetoothProfile.STATE_DISCONNECTED) { setBtStatus(connectionEstablished