[riot-notifications] [RIOT-OS/RIOT] gnrc_lorawan : Add ADR support (#15995)

José Alamos notifications at github.com
Thu Jul 15 01:13:14 CEST 2021


@jia200x commented on this pull request.



>      mlme_confirm.type = MLME_LINK_CHECK;
     mlme_confirm.status = GNRC_LORAWAN_REQ_STATUS_SUCCESS;
     gnrc_lorawan_mlme_confirm(mac, &mlme_confirm);
 
     mac->mlme.pending_mlme_opts &= ~GNRC_LORAWAN_MLME_OPTS_LINK_CHECK_REQ;
 }
 
+static void _mlme_link_adr_req(gnrc_lorawan_t *mac, uint8_t *p)
+{
+    mlme_link_adr_req_t mlme_link_adr_req;
+
+    mlme_link_adr_req.dr_txpwr = p[1];
+    mlme_link_adr_req.chmsk = (p[3] << 8 ) | (p[2] & 0xff);
+    mlme_link_adr_req.redncy = p[4];
+
+    DEBUG("gnrc_lorawan_mlme: LinkADRReq DataRate_TXPower : DR%u TX%u\n",
+           mlme_link_adr_req.dr_txpwr >> 4, mlme_link_adr_req.dr_txpwr & 0x0f);
+    DEBUG("gnrc_lorawan_mlme: LinkADRReq ChMask : %u\n",mlme_link_adr_req.chmsk);
+    DEBUG("gnrc_lorawan_mlme: LinkADRReq Redundancy : %u\n",mlme_link_adr_req.redncy);
+
+    mac->mlme.pending_mlme_opts |=  GNRC_LORAWAN_MLME_OPTS_LINK_ADR_ANS;
+    mac->last_dr = mlme_link_adr_req.dr_txpwr >> 4;

I will mark it as resolved, since rebasing on top of #15946 is expected

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15995#discussion_r670013755
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210714/63b2f313/attachment.htm>


More information about the notifications mailing list