From cd46e248190089847e1c88abb51446642d936d75 Mon Sep 17 00:00:00 2001 From: Daniele Gobbetti Date: Fri, 16 Aug 2024 19:26:44 +0200 Subject: [PATCH] Garmin: Mimic auth negotiation requested byte and flags. The previous attempt to send all zeroes (in 7fa5cd1be56247785dbcf0727fe48eb59b8df84b) didn't yield actionable progress, hence we try sending back what the watch sent to us. Blindly implemented based on the legacy vivomoveHR code, not tested against real devices. --- .../service/devices/garmin/messages/AuthNegotiationMessage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/messages/AuthNegotiationMessage.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/messages/AuthNegotiationMessage.java index fb79f50e8..3bc1d601d 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/messages/AuthNegotiationMessage.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/messages/AuthNegotiationMessage.java @@ -18,7 +18,7 @@ public class AuthNegotiationMessage extends GFDIMessage { LOG.info("Message {}, unkByte: {}, flags: {}", garminMessage, unknown, requestedAuthFlags); - this.statusMessage = new AuthNegotiationStatusMessage(garminMessage, Status.ACK, AuthNegotiationStatusMessage.AuthNegotiationStatus.GUESS_OK, 0, EnumSet.noneOf(AuthFlags.class)); + this.statusMessage = new AuthNegotiationStatusMessage(garminMessage, Status.ACK, AuthNegotiationStatusMessage.AuthNegotiationStatus.GUESS_OK, this.unknown, requestedAuthFlags); } public static AuthNegotiationMessage parseIncoming(MessageReader reader, GarminMessage garminMessage) {