1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-22 00:06:48 +02:00

Sleep a short while before discovering services

Let us see if this improves #252.
This commit is contained in:
Erik Johansson
2018-05-03 23:36:33 +02:00
parent 662b8707f6
commit 6af3fc66b5

View File

@@ -530,6 +530,13 @@ public abstract class BluetoothCommunication {
connectionEstablished = true;
setBtStatus(BT_STATUS_CODE.BT_CONNECTION_ESTABLISHED);
try {
Thread.sleep(200);
}
catch (Exception e) {
// Empty
}
gatt.discoverServices();
}
else if (newState == BluetoothProfile.STATE_DISCONNECTED) {