diff --git a/connectivity/lorawan/source/LoRaWANStack.cpp b/connectivity/lorawan/source/LoRaWANStack.cpp index d60fa0b9d48..c3fc709c702 100644 --- a/connectivity/lorawan/source/LoRaWANStack.cpp +++ b/connectivity/lorawan/source/LoRaWANStack.cpp @@ -619,29 +619,12 @@ void LoRaWANStack::post_process_tx_with_reception() } } } else { - // handle UNCONFIRMED case here, RX slots were turned off due to - // valid packet reception. - uint8_t prev_QOS_level = _loramac.get_prev_QOS_level(); - uint8_t QOS_level = _loramac.get_QOS_level(); - - // We will not apply QOS on the post-processing of the previous - // outgoing message as we would have received QOS instruction in response - // to that particular message - if (QOS_level > LORAWAN_DEFAULT_QOS && _qos_cnt < QOS_level - && (prev_QOS_level == QOS_level)) { - _ctrl_flags &= ~TX_DONE_FLAG; - const int ret = _queue->call(this, &LoRaWANStack::state_controller, - DEVICE_STATE_SCHEDULING); - MBED_ASSERT(ret != 0); - (void) ret; - _qos_cnt++; - tr_info("QOS: repeated transmission #%d queued", _qos_cnt); - } else { - _loramac.post_process_mcps_req(); - _ctrl_flags |= TX_DONE_FLAG; - make_tx_metadata_available(); - state_controller(DEVICE_STATE_STATUS_CHECK); - } + // On reception, end-device shall stop sending retransmission as stated in lorawan v1.0.2 + // specification, page 24, line 25-27 + _loramac.post_process_mcps_req(); + _ctrl_flags |= TX_DONE_FLAG; + make_tx_metadata_available(); + state_controller(DEVICE_STATE_STATUS_CHECK); } } diff --git a/connectivity/lorawan/system/lorawan_data_structures.h b/connectivity/lorawan/system/lorawan_data_structures.h index 7ce8cb33cfc..724bc87e7f2 100644 --- a/connectivity/lorawan/system/lorawan_data_structures.h +++ b/connectivity/lorawan/system/lorawan_data_structures.h @@ -908,7 +908,7 @@ typedef struct { * * Provides a certain QOS level set by network server in LinkADRReq MAC * command. The device will transmit the given UNCONFIRMED message nb_trials - * time with same frame counter until a downlink is received. Standard defined + * time with the same frame counter OR until a downlink is received. Standard defined * range is 1:15. Data rates will NOT be adapted according to chapter 18.4. */ uint8_t nb_trials;