From ace0aa3ea7438d2f814bc8fa444267ef19e2c9f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20V=C3=B6geli?= Date: Mon, 14 Oct 2024 23:13:38 +0200 Subject: [PATCH] Colmi R0x: Fix big data packet handling --- .../service/devices/colmi/ColmiR0xDeviceSupport.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/colmi/ColmiR0xDeviceSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/colmi/ColmiR0xDeviceSupport.java index 646777ce4..1c3cd3246 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/colmi/ColmiR0xDeviceSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/colmi/ColmiR0xDeviceSupport.java @@ -343,6 +343,7 @@ public class ColmiR0xDeviceSupport extends AbstractBTLEDeviceSupport { // Big data responses can arrive in multiple packets that need to be concatenated if (bigDataPacket != null) { LOG.debug("Received {} bytes on big data characteristic while waiting for follow-up data", value.length); + bigDataPacket.rewind(); ByteBuffer concatenated = ByteBuffer .allocate(bigDataPacket.limit() + value.length) .put(bigDataPacket)