Skip to content

Commit

Permalink
add support for XQ-BT41
Browse files Browse the repository at this point in the history
  • Loading branch information
munjeni committed Jul 31, 2021
1 parent ce15741 commit 0c5bf1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions newflasher.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define VERSION 48
#define VERSION 49

0 comments on commit 0c5bf1a

Please sign in to comment.