Skip to content

gnrc_netif/lorawan: fix setting nwkskey via NETOPT#19475

Merged
bors[bot] merged 1 commit intoRIOT-OS:masterfrom
jia200x:pr/gnrc_netif_lorawan_abp
Apr 17, 2023
Merged

gnrc_netif/lorawan: fix setting nwkskey via NETOPT#19475
bors[bot] merged 1 commit intoRIOT-OS:masterfrom
jia200x:pr/gnrc_netif_lorawan_abp

Conversation

@jia200x
Copy link
Copy Markdown
Member

@jia200x jia200x commented Apr 17, 2023

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

@jia200x jia200x requested a review from MrKevinWeiss April 17, 2023 10:49
@jia200x jia200x changed the title gnrc_netif/lorawan: fix setting nkskey via NETOPT gnrc_netif/lorawan: fix setting nwkskey via NETOPT Apr 17, 2023
@github-actions github-actions bot added Area: network Area: Networking Area: sys Area: System labels Apr 17, 2023
@jia200x jia200x added Area: LoRa Area: LoRa radio support Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer and removed Area: network Area: Networking Area: sys Area: System labels Apr 17, 2023
Copy link
Copy Markdown
Contributor

@MrKevinWeiss MrKevinWeiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust your testing. ACK

@MrKevinWeiss
Copy link
Copy Markdown
Contributor

bors merge

@bors
Copy link
Copy Markdown
Contributor

bors bot commented Apr 17, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@dylad dylad added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 17, 2023
@riot-ci
Copy link
Copy Markdown

riot-ci commented Apr 17, 2023

Murdock results

✔️ PASSED

3c1f5a0 gnrc_netif/lorawan: fix setting nkskey via NETOPT

Success Failures Total Runtime
6882 0 6882 09m:04s

Artifacts

@MrKevinWeiss
Copy link
Copy Markdown
Contributor

bors cancel

@MrKevinWeiss
Copy link
Copy Markdown
Contributor

bors merge

@bors
Copy link
Copy Markdown
Contributor

bors bot commented Apr 17, 2023

Build succeeded:

@bors bors bot merged commit a87634c into RIOT-OS:master Apr 17, 2023
bors bot added a commit that referenced this pull request Apr 18, 2023
19479: gnrc_netif/lorawan: fix setting nwkskey via NETOPT [backport 2023.04] r=leandrolanzieri a=MrKevinWeiss

# Backport of #19475



Co-authored-by: Jose Alamos <jose@alamos.cc>
@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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: needs backport Integration Process: The PR is required to be backported to a release or feature branch 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.

5 participants