From 982a75546427c42ca532faa075617161357068df Mon Sep 17 00:00:00 2001 From: "jacob.eva" Date: Sat, 12 Oct 2024 13:00:52 +0100 Subject: [PATCH] Improve checks around split packet handling in transmit() --- RNode_Firmware.ino | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/RNode_Firmware.ino b/RNode_Firmware.ino index a10dbb8..05d9807 100644 --- a/RNode_Firmware.ino +++ b/RNode_Firmware.ino @@ -609,8 +609,14 @@ void transmit(uint16_t size) { written++; - if (written == 255) { - LoRa->endPacket(); add_airtime(written); + if (written == 255 && header & 0x0F) { + if (!LoRa->endPacket()) { + kiss_indicate_error(ERROR_MODEM_TIMEOUT); + kiss_indicate_error(ERROR_TXFAILED); + led_indicate_error(5); + hard_reset(); + } + add_airtime(written); LoRa->beginPacket(); LoRa->write(header); written = 1;