Skip to content

Commit

Permalink
Merge pull request ARMmbed#7767 from kivaisan/fix_tx_error_if_corrupt…
Browse files Browse the repository at this point in the history
…er_msg_received

Lora: Fix TX_ERROR event if corrupted msg is received for CONFIRMED request
  • Loading branch information
Cruz Monrreal committed Aug 21, 2018
2 parents 49460cb + 1eea9a7 commit 33c1df3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion features/lorawan/LoRaWANStack.cpp
Expand Up @@ -676,7 +676,8 @@ void LoRaWANStack::process_reception(const uint8_t *const payload, uint16_t size
_ctrl_flags &= ~TX_ONGOING_FLAG;
state_controller(DEVICE_STATE_STATUS_CHECK);
} else {
if (!_loramac.continue_sending_process()) {
if (!_loramac.continue_sending_process() &&
_loramac.get_current_slot() != RX_SLOT_WIN_1) {
tr_error("Retries exhausted for Class A device");
_ctrl_flags &= ~TX_DONE_FLAG;
_ctrl_flags |= TX_ONGOING_FLAG;
Expand Down
1 change: 1 addition & 0 deletions features/lorawan/lorastack/mac/LoRaMac.cpp
Expand Up @@ -780,6 +780,7 @@ bool LoRaMac::continue_sending_process()
if (_params.ack_timeout_retry_counter > _params.max_ack_timeout_retries) {
_mac_commands.clear_command_buffer();
_params.adr_ack_counter++;
_lora_time.stop(_params.timers.ack_timeout_timer);
return false;
}

Expand Down

0 comments on commit 33c1df3

Please sign in to comment.