diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/xiaomi/redmibuds5pro/RedmiBuds6ActiveCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/xiaomi/redmibuds5pro/RedmiBuds6ActiveCoordinator.java
new file mode 100644
index 000000000..21c27d61b
--- /dev/null
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/xiaomi/redmibuds5pro/RedmiBuds6ActiveCoordinator.java
@@ -0,0 +1,19 @@
+package nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmibuds5pro;
+
+import java.util.regex.Pattern;
+
+import nodomain.freeyourgadget.gadgetbridge.R;
+
+public class RedmiBuds6ActiveCoordinator extends AbstractRedmiBudsCoordinator {
+
+ @Override
+ public int getDeviceNameResource() {
+ return R.string.devicetype_redmi_buds_6_active;
+ }
+
+ @Override
+ protected Pattern getSupportedDeviceName() {
+ return Pattern.compile("Redmi Buds 6 Active");
+ }
+
+}
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java
index 236b101a2..2132170bd 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/model/DeviceType.java
@@ -285,6 +285,7 @@ import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.miwatch.MiWatchLiteCo
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.miwatchcolorsport.MiWatchColorSportCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmibuds5pro.RedmiBuds4ActiveCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmibuds5pro.RedmiBuds5ProCoordinator;
+import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmibuds5pro.RedmiBuds6ActiveCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmismartband2.RedmiSmartBand2Coordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmismartbandpro.RedmiSmartBandProCoordinator;
import nodomain.freeyourgadget.gadgetbridge.devices.xiaomi.redmiwatch2.RedmiWatch2Coordinator;
@@ -361,6 +362,7 @@ public enum DeviceType {
MIWATCHCOLORSPORT(MiWatchColorSportCoordinator.class),
REDMIBUDS4ACTIVE(RedmiBuds4ActiveCoordinator.class),
REDMIBUDS5PRO(RedmiBuds5ProCoordinator.class),
+ REDMIBUDS6ACTIVE(RedmiBuds6ActiveCoordinator.class),
REDMIWATCH3ACTIVE(RedmiWatch3ActiveCoordinator.class),
REDMIWATCH3(RedmiWatch3Coordinator.class),
REDMISMARTBAND2(RedmiSmartBand2Coordinator.class),
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/redmibuds5pro/RedmiBuds5ProProtocol.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/redmibuds5pro/RedmiBuds5ProProtocol.java
index a1d4076f6..c79c3d12c 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/redmibuds5pro/RedmiBuds5ProProtocol.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/redmibuds5pro/RedmiBuds5ProProtocol.java
@@ -231,6 +231,8 @@ public class RedmiBuds5ProProtocol extends GBDeviceProtocol {
}
public void decodeGetConfig(byte[] configPayload) {
+ if(configPayload.length < 3)
+ return;
SharedPreferences preferences = getDevicePrefs().getPreferences();
Editor editor = preferences.edit();
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 2bcdf27d4..9e9bcc178 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1894,6 +1894,7 @@
Redmi Watch 3
Redmi Buds 4 Active
Redmi Buds 5 Pro
+ Redmi Buds 6 Active
Redmi Smart Band 2
Redmi Watch 2
Redmi Watch 2 Lite