Skip to content

gnrc_netif/lorawan: fix setting nwkskey via NETOPT [backport 2023.04]#19479

Merged
bors[bot] merged 1 commit intoRIOT-OS:2023.04-branchfrom
MrKevinWeiss:backport/2023.04/pr/gnrc_netif_lorawan_abp
Apr 18, 2023
Merged

gnrc_netif/lorawan: fix setting nwkskey via NETOPT [backport 2023.04]#19479
bors[bot] merged 1 commit intoRIOT-OS:2023.04-branchfrom
MrKevinWeiss:backport/2023.04/pr/gnrc_netif_lorawan_abp

Conversation

@MrKevinWeiss
Copy link
Copy Markdown
Contributor

Backport of #19475

Contribution description

This PR fixes setting the nwkskey via ifconfig. As it is now, the NETOPT implementation reverses the array, which is not what we want for keys.
Therefore, this simply replaces the _memcpy_reverse call with regular memcpy.

Testing procedure

Compile and flash examples/gnrc_lorawan and set all ABP parameters using ifconfig:

ifconfig 3 set addr AAAAAAAA
ifconfig 3 set nwkskey BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
ifconfig 3 set appskey CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
ifconfig 3 -otaa
ifconfig 3 up

Transmit payload using txtsnd and make sure it is received by the network server:

txtsnd 3 01 RIOT

Issues/PRs references

None so far

@MrKevinWeiss MrKevinWeiss added Area: LoRa Area: LoRa radio support CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Apr 18, 2023
@github-actions github-actions bot added Area: network Area: Networking Area: sys Area: System and removed Area: LoRa Area: LoRa radio support labels Apr 18, 2023
@riot-ci
Copy link
Copy Markdown

riot-ci commented Apr 18, 2023

Murdock results

✔️ PASSED

7c832e4 gnrc_netif/lorawan: fix setting nkskey via NETOPT

Success Failures Total Runtime
6882 0 6882 10m:31s

Artifacts

@leandrolanzieri
Copy link
Copy Markdown
Contributor

bors merge

@bors
Copy link
Copy Markdown
Contributor

bors bot commented Apr 18, 2023

Build succeeded:

@bors bors bot merged commit 74d1f01 into RIOT-OS:2023.04-branch Apr 18, 2023
@MrKevinWeiss MrKevinWeiss deleted the backport/2023.04/pr/gnrc_netif_lorawan_abp branch April 18, 2023 12:12
@jia200x jia200x added this to the Release 2023.04 milestone Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants