From d11f921a2baab1798c0acdcb75a79c21091954ab Mon Sep 17 00:00:00 2001 From: Frank Sautter Date: Mon, 27 Feb 2023 01:54:18 +0100 Subject: [PATCH] log if transmit is not successful --- src/lorawan.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lorawan.cpp b/src/lorawan.cpp index 1fc67757..024c69e7 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -219,7 +219,11 @@ void lora_send(void *pvParameters) { xQueueReceive(LoraSendQueue, &SendBuffer, (TickType_t)0); break; case LMIC_ERROR_TX_BUSY: // LMIC already has a tx message pending + ESP_LOGI(TAG, "Message not sent, LMIC busy, will retry later"); + vTaskDelay(pdMS_TO_TICKS(500 + random(400))); // wait a while + break; case LMIC_ERROR_TX_FAILED: // message was not sent + ESP_LOGI(TAG, "Message not sent, TX failed, will retry later"); vTaskDelay(pdMS_TO_TICKS(500 + random(400))); // wait a while break; case LMIC_ERROR_TX_TOO_LARGE: // message size exceeds LMIC buffer size