1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-10-06 13:20:30 +02: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) {