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 f992f6c7..7641792e 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 @@ -667,6 +667,12 @@ public abstract class BluetoothCommunication { Timber.d("onServicesDiscovered: status=%d (%d services)", status, gatt.getServices().size()); + if (gatt.getServices().isEmpty()) { + setBtStatus(BT_STATUS_CODE.BT_UNEXPECTED_ERROR, "No services found"); + disconnect(false); + return; + } + synchronized (lock) { cmdStepNr = 0; initStepNr = 0;