Skip to content

Commit c50f490

Browse files
authored
Merge pull request #15225 from zul00/fix/unconfirmed_retransmission/stop_on_downlink
Fixed issue in unconfirmed_retransmission behavior
2 parents 3b3b307 + 1e92543 commit c50f490

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

connectivity/lorawan/source/LoRaWANStack.cpp

+6-23
Original file line numberDiff line numberDiff line change
@@ -619,29 +619,12 @@ void LoRaWANStack::post_process_tx_with_reception()
619619
}
620620
}
621621
} else {
622-
// handle UNCONFIRMED case here, RX slots were turned off due to
623-
// valid packet reception.
624-
uint8_t prev_QOS_level = _loramac.get_prev_QOS_level();
625-
uint8_t QOS_level = _loramac.get_QOS_level();
626-
627-
// We will not apply QOS on the post-processing of the previous
628-
// outgoing message as we would have received QOS instruction in response
629-
// to that particular message
630-
if (QOS_level > LORAWAN_DEFAULT_QOS && _qos_cnt < QOS_level
631-
&& (prev_QOS_level == QOS_level)) {
632-
_ctrl_flags &= ~TX_DONE_FLAG;
633-
const int ret = _queue->call(this, &LoRaWANStack::state_controller,
634-
DEVICE_STATE_SCHEDULING);
635-
MBED_ASSERT(ret != 0);
636-
(void) ret;
637-
_qos_cnt++;
638-
tr_info("QOS: repeated transmission #%d queued", _qos_cnt);
639-
} else {
640-
_loramac.post_process_mcps_req();
641-
_ctrl_flags |= TX_DONE_FLAG;
642-
make_tx_metadata_available();
643-
state_controller(DEVICE_STATE_STATUS_CHECK);
644-
}
622+
// On reception, end-device shall stop sending retransmission as stated in lorawan v1.0.2
623+
// specification, page 24, line 25-27
624+
_loramac.post_process_mcps_req();
625+
_ctrl_flags |= TX_DONE_FLAG;
626+
make_tx_metadata_available();
627+
state_controller(DEVICE_STATE_STATUS_CHECK);
645628
}
646629
}
647630

connectivity/lorawan/system/lorawan_data_structures.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ typedef struct {
908908
*
909909
* Provides a certain QOS level set by network server in LinkADRReq MAC
910910
* command. The device will transmit the given UNCONFIRMED message nb_trials
911-
* time with same frame counter until a downlink is received. Standard defined
911+
* time with the same frame counter OR until a downlink is received. Standard defined
912912
* range is 1:15. Data rates will NOT be adapted according to chapter 18.4.
913913
*/
914914
uint8_t nb_trials;

0 commit comments

Comments
 (0)