Skip to content

Commit c9d6741

Browse files
author
Hasnain Virk
committed
Making sure that RX slots open after state change
After transmission we should change the state before invoking opening of slots as we may start receiving in the rx slots and the state would suddenly change from SENDING to RECEIVING without going through the ACK_WAIT state (in case of CONFIRMED messages). Tests show that after this slight adjustment, our number of ack retries have significantly reduced.
1 parent 94eb4c0 commit c9d6741

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

features/lorawan/LoRaWANStack.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,6 @@ void LoRaWANStack::process_transmission_timeout()
577577
void LoRaWANStack::process_transmission(void)
578578
{
579579
tr_debug("Transmission completed");
580-
_loramac.on_radio_tx_done(_tx_timestamp);
581580

582581
if (_device_current_state == DEVICE_STATE_JOINING) {
583582
_device_current_state = DEVICE_STATE_AWAITING_JOIN_ACCEPT;
@@ -589,6 +588,8 @@ void LoRaWANStack::process_transmission(void)
589588
_device_current_state = DEVICE_STATE_AWAITING_ACK;
590589
}
591590
}
591+
592+
_loramac.on_radio_tx_done(_tx_timestamp);
592593
}
593594

594595
void LoRaWANStack::post_process_tx_with_reception()

0 commit comments

Comments
 (0)