mirror of https://github.com/ARMmbed/mbed-os.git
Fixed issue in unconfirmed_retransmission behavior
Fixed issue on LoRaWANStack based on lorawan v1.0.2 specification page 24 line 25-27. The specification mentioned that that end-device shall stop retransmission when receiving ANY downlink on RX1 or RX2 window. - Removed conflicting behavior in LoRaWANStack::post_process_tx_with_reception() - Updated comment section of nb_trials at lorawan_data_structures.hpull/15225/head
parent
c6d814e68c
commit
1e9254387e
|
@ -619,29 +619,12 @@ void LoRaWANStack::post_process_tx_with_reception()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// handle UNCONFIRMED case here, RX slots were turned off due to
|
// On reception, end-device shall stop sending retransmission as stated in lorawan v1.0.2
|
||||||
// valid packet reception.
|
// specification, page 24, line 25-27
|
||||||
uint8_t prev_QOS_level = _loramac.get_prev_QOS_level();
|
_loramac.post_process_mcps_req();
|
||||||
uint8_t QOS_level = _loramac.get_QOS_level();
|
_ctrl_flags |= TX_DONE_FLAG;
|
||||||
|
make_tx_metadata_available();
|
||||||
// We will not apply QOS on the post-processing of the previous
|
state_controller(DEVICE_STATE_STATUS_CHECK);
|
||||||
// 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -908,7 +908,7 @@ typedef struct {
|
||||||
*
|
*
|
||||||
* Provides a certain QOS level set by network server in LinkADRReq MAC
|
* Provides a certain QOS level set by network server in LinkADRReq MAC
|
||||||
* command. The device will transmit the given UNCONFIRMED message nb_trials
|
* 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.
|
* range is 1:15. Data rates will NOT be adapted according to chapter 18.4.
|
||||||
*/
|
*/
|
||||||
uint8_t nb_trials;
|
uint8_t nb_trials;
|
||||||
|
|
Loading…
Reference in New Issue