Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly compute ConfFCnt for confirmed uplink's downlink MIC #540

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

abalmos
Copy link
Contributor

@abalmos abalmos commented Jul 7, 2021

Currently, ConfFCnt in the MIC is always one larger than the FCnt of the corresponding uplink, as described in #539. This is because ctx.DeviceSession.FCntUp was already incremented by the initial processing of the uplink here.

I can confirm this PR enables a LoRaWAN v1.1 device to successfully complete ADR.

I did not add a test because I am still trying to understand the framework--this is my first time working with go. I don't see an existing test for v1.1 confirmed uplinks to base it off.

Fixes #539

Currently `ConfFCnt` in the MIC is always one larger then the `FCnt` of the corresponding uplink, as described in brocaar#539. This is because `ctx.DeviceSession.FCntUp` was already incremented by the initial processing of the uplink.

Fixes brocaar#539
@brocaar
Copy link
Owner

brocaar commented Jul 7, 2021

Thanks @abalmos 👍

@brocaar brocaar merged commit 82c3d7f into brocaar:master Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Downlink MIC calculation is incorrect when Acknowledging a confirmed uplink in LoRaWAN 1.1
2 participants