1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-09 03:37:03 +01:00

Garmin: Mimic auth negotiation requested byte and flags.

The previous attempt to send all zeroes (in 7fa5cd1be5) 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.
This commit is contained in:
Daniele Gobbetti 2024-08-16 19:26:44 +02:00
parent 3f8eeebc5a
commit cd46e24819

View File

@ -18,7 +18,7 @@ public class AuthNegotiationMessage extends GFDIMessage {
LOG.info("Message {}, unkByte: {}, flags: {}", garminMessage, unknown, requestedAuthFlags); 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) { public static AuthNegotiationMessage parseIncoming(MessageReader reader, GarminMessage garminMessage) {