From f20e11d5174674f6fd05cf4f5f8440483af9d2c3 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Mon, 7 Dec 2015 12:25:34 +0100 Subject: [PATCH] Pebble: Increase maximum notification body length from 255 to 512 bytes on firmware 3.x --- CHANGELOG.md | 1 + .../gadgetbridge/service/devices/pebble/PebbleProtocol.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1803f18d4..f2c654f42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ###Changelog ####Next Version +* Pebble: Increase maximum notification body length from 255 to 512 bytes on firmware 3.x ####Version 0.6.8 * Mi Band support for Firmware upgrade/downgrade on Mi Band 1A (white LEDs, no heartrate sensor) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java index bcc962a4d..150f909ea 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/PebbleProtocol.java @@ -759,7 +759,7 @@ public class PebbleProtocol extends GBDeviceProtocol { } int partlength = s.getBytes().length; - if (partlength > 255) partlength = 255; + if (partlength > 512) partlength = 512; buf.put(attribute_id); buf.putShort((short) partlength); buf.put(s.getBytes(), 0, partlength);