From 89a28427d63077a159dfe79445fb6ddeb71506c0 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 11 Jan 2024 21:14:20 +0100 Subject: [PATCH] Increase the BLE packet size Devices supporting BLE 4.2 (or higher) can use data packets with a payload size of up to 244 bytes. None of the current Mares models support this at the moment, but increasing the size on the receiving side already prepares the code for future models and remains fully backwards compatible. --- src/mares_iconhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mares_iconhd.c b/src/mares_iconhd.c index 6b222f4..4d9222e 100644 --- a/src/mares_iconhd.c +++ b/src/mares_iconhd.c @@ -414,7 +414,7 @@ mares_iconhd_device_open (dc_device_t **out, dc_context_t *context, dc_iostream_ // Create the packet stream. if (transport == DC_TRANSPORT_BLE) { - status = dc_packet_open (&device->iostream, context, iostream, 20, 20); + status = dc_packet_open (&device->iostream, context, iostream, 244, 20); if (status != DC_STATUS_SUCCESS) { ERROR (context, "Failed to create the packet stream."); goto error_free;