weixin_39852953
weixin_39852953
2020-11-29 09:03

confirmed_message_data_rate_should_decrease_only_when_adr_is_on

 patch
diff --git a/src/mac/LoRaMac.c b/src/mac/LoRaMac.c
index fc8220b..69c09aa 100644
--- a/src/mac/LoRaMac.c
+++ b/src/mac/LoRaMac.c
@@ -1471,7 +1471,7 @@ static void OnMacStateCheckTimerEvent( void )
             {
                 AckTimeoutRetriesCounter++;

-                if( ( AckTimeoutRetriesCounter % 2 ) == 1 )
+                if( ( AdrCtrlOn == true ) && ( ( AckTimeoutRetriesCounter % 2 ) == 1 ) )
                 {
                     LoRaMacParams.ChannelsDatarate = MAX( LoRaMacParams.ChannelsDatarate - 1, LORAMAC_TX_MIN_DATARATE );
                 }

该提问来源于开源项目:Lora-net/LoRaMac-node

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

  • weixin_39549936 weixin_39549936 5月前

    Hi yanfli,

    thanks for your report. We think the implementation is correct as it is. Please refer to chapter 19.4 of the LoRaWAN Specification v1.0.1 - it is not mentioned, that ADR must be enabled for this feature.

    点赞 评论 复制链接分享
  • weixin_39852953 weixin_39852953 5月前

    Thank you for reply. For my understanding, data rate should never change if ADR is off. If data rate could change even when ADR is off, then the "ADR off" seems to be useless.

    The title of 19.4 is Data Rate Adaption, I think this is a premise of ADR on. How do you think abou this. Because Dare Rate Adaption should only happen when ADR is on.

    It will be nice if the author of spec could clarify.

    点赞 评论 复制链接分享
  • weixin_39909001 weixin_39909001 5月前

    ADR off means that the network server should not expect that the end device will accept ADR commands (the server also then expects that the end-device does not autonomously change its own data rate, but this isn't a failure condition, rather it leads to a lack of optimization). It does not mean that the end-device cannot change its data rate based on its local knowledge of conditions or application requirements. As such, the code as written is correct.

    点赞 评论 复制链接分享
  • weixin_39852953 weixin_39852953 5月前

    Thank you for your answer.

    点赞 评论 复制链接分享
  • weixin_39727005 weixin_39727005 5月前

    Thanks for giving a more precise answer. I'm sorry I didn't answer earlier.

    点赞 评论 复制链接分享
  • weixin_39852953 weixin_39852953 5月前

    Thank you, all. As you all agree, I close this issue.

    点赞 评论 复制链接分享