From bb987642e3eaf6bedd1889610c8b96133aa4f3c5 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Thu, 6 Jul 2023 23:07:31 +0200 Subject: [PATCH] Fix the OSTC4 firmware upgrade In commit 1c8cd096b57a876c4fb0afc5113aac05d75d924e the block size was changed from 64 to 1024 bytes. For bluetooth classic communication, this shouldn't matter, but for some reason it does cause the OSTC4 firmware upgrade to fail. Maybe some buffering problem in the OSTC4 firmware or bluetooth stack? Change the block size back to 64 bytes. --- src/hw_ostc3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hw_ostc3.c b/src/hw_ostc3.c index f4bac54..170aa30 100644 --- a/src/hw_ostc3.c +++ b/src/hw_ostc3.c @@ -240,7 +240,7 @@ hw_ostc3_write (hw_ostc3_device_t *device, dc_event_progress_t *progress, const size_t nbytes = 0; while (nbytes < size) { // Set the maximum packet size. - size_t length = 1024; + size_t length = (device->hardware == OSTC4) ? 64 : 1024; // Limit the packet size to the total size. if (nbytes + length > size)