Skip to content

Commit 36ee9b9

Browse files
author
Cruz Monrreal
authored
Merge pull request #7767 from kivaisan/fix_tx_error_if_corrupter_msg_received
Lora: Fix TX_ERROR event if corrupted msg is received for CONFIRMED request
2 parents 17a525c + 07f4ca8 commit 36ee9b9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

features/lorawan/LoRaWANStack.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,8 @@ void LoRaWANStack::process_reception(const uint8_t *const payload, uint16_t size
676676
_ctrl_flags &= ~TX_ONGOING_FLAG;
677677
state_controller(DEVICE_STATE_STATUS_CHECK);
678678
} else {
679-
if (!_loramac.continue_sending_process()) {
679+
if (!_loramac.continue_sending_process() &&
680+
_loramac.get_current_slot() != RX_SLOT_WIN_1) {
680681
tr_error("Retries exhausted for Class A device");
681682
_ctrl_flags &= ~TX_DONE_FLAG;
682683
_ctrl_flags |= TX_ONGOING_FLAG;

features/lorawan/lorastack/mac/LoRaMac.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,7 @@ bool LoRaMac::continue_sending_process()
780780
if (_params.ack_timeout_retry_counter > _params.max_ack_timeout_retries) {
781781
_mac_commands.clear_command_buffer();
782782
_params.adr_ack_counter++;
783+
_lora_time.stop(_params.timers.ack_timeout_timer);
783784
return false;
784785
}
785786

0 commit comments

Comments
 (0)