From 0c5bf1aaa00a009f1279526d4bb33b40ce9f7ac0 Mon Sep 17 00:00:00 2001 From: munjeni Date: Sat, 31 Jul 2021 11:46:05 -0700 Subject: [PATCH] add support for XQ-BT41 --- newflasher.c | 8 ++++++++ version.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/newflasher.c b/newflasher.c index 6e5659d..2ad346d 100644 --- a/newflasher.c +++ b/newflasher.c @@ -1077,11 +1077,19 @@ static bool get_reply(HANDLE dev, int ep, char *bytes, unsigned long size, int t if (memcmp(bytes, "DATA", 4) == 0 && ret_len != 12) { + // xperia 10 mark 3 XQ-BT41 send 13 bytes where last byte is null termination, fixing it to 12 + if (ret_len == 13) + { + ret_len = 12; + goto solve_xqbt41; + } + printf(" - Errornous DATA reply!\n"); display_buffer_hex_ascii("Replied with ", bytes, ret_len); return false; } +solve_xqbt41: if (memcmp(bytes, "DATA", 4) == 0 && ret_len == 12) { memcpy(tmp_reply, bytes, ret_len); diff --git a/version.h b/version.h index 90ad884..3e19777 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -#define VERSION 48 +#define VERSION 49