From 6c3bbb2cc74f9628a7754f4412e23b08f5a3464f Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Fri, 5 May 2023 19:47:52 +0200 Subject: [PATCH] Reduce the BLE output packet size to 20 bytes again The newer u-Blox Nina B2 bluetooth module supports larger packets up to 244 bytes, but the older Telit/Stollman bluetooth module does not. Trying to send a packet larger than 20 bytes fails. For maximum compatibility, limit the output packet size to 20 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 2016158..f4bac54 100644 --- a/src/hw_ostc3.c +++ b/src/hw_ostc3.c @@ -437,7 +437,7 @@ hw_ostc3_device_open (dc_device_t **out, dc_context_t *context, dc_iostream_t *i // Create the packet stream. if (transport == DC_TRANSPORT_BLE) { - status = dc_packet_open (&device->iostream, context, iostream, 244, 244); + 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;