mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Withings Steel HR: Request MTU before enabling notifications
It looks like enabling notifications before setting the MTU will sometimes fail, which would leave the device stuck initializing.
This commit is contained in:
+2
-3
@@ -184,9 +184,8 @@ public class WithingsSteelHRDeviceSupport extends AbstractBTLESingleDeviceSuppor
|
||||
builder.setDeviceState(GBDevice.State.INITIALIZING);
|
||||
getDevice().setFirmwareVersion("N/A");
|
||||
getDevice().setFirmwareVersion2("N/A");
|
||||
builder.requestMtu(512);
|
||||
builder.notify(WithingsUUID.WITHINGS_WRITE_CHARACTERISTIC_UUID, true);
|
||||
logger.debug("Requesting change of MTU...");
|
||||
builder.requestMtu(119);
|
||||
return builder;
|
||||
}
|
||||
|
||||
@@ -203,7 +202,7 @@ public class WithingsSteelHRDeviceSupport extends AbstractBTLESingleDeviceSuppor
|
||||
return;
|
||||
}
|
||||
|
||||
logger.debug("MTU has changed to " + mtu);
|
||||
logger.debug("MTU has changed to {}", mtu);
|
||||
mtuSize = mtu;
|
||||
if (firstTimeConnect) {
|
||||
addSimpleConversationToQueue(new WithingsMessage(WithingsMessageType.INITIAL_CONNECT));
|
||||
|
||||
Reference in New Issue
Block a user