Skip to content

Commit

Permalink
11-lorawan: Remove task 06 GNRC LoRaWAN (ABP) (#317)
Browse files Browse the repository at this point in the history
* 11-lorawan: Remove task 06 GNRC LoRaWAN (ABP)

After some discussion it would seem like the best option to handle the generally untested task is to just remove it.

This has not been testing is quite some time, likey due to the somewhat challenging setup requirering chipstack.
The alternative would be to acutally implement the missing operations, however, the ABP generally is not used
in production, so we would be testing something only used for testing... which seems a bit redundant.

* chore: Quiet pylint a bit
  • Loading branch information
MrKevinWeiss authored Jan 28, 2025
1 parent b79f8a7 commit 7050968
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 104 deletions.
62 changes: 1 addition & 61 deletions 11-lorawan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,64 +242,4 @@ send/receive LoRaWAN frames.
GNRC LoRAWAN should be able to send and receive data from the Network Server.
Both send functions should print `Successfully sent packet`
The Network Server should notify the reception of an ACK (carried with the
frame right after the node receives data)

Task #06 - GNRC LoRaWAN (ABP)
=============================

### Description

**Note:** This test currently does not work with The Things Network, due to incompatible FOpts
handling. See https://github.com/RIOT-OS/RIOT/issues/16962

GNRC LoRaWAN is able to join a LoRaWAN network using Activation By
Personalization and send/receive LoRaWAN frames.

### Testing procedure

- Build and flash the `examples/gnrc_lorawan`

$ make BOARD=<board> -C examples/gnrc_lorawan flash term

- Configure the DevAddr, Network SKey and App SKey using the `ifconfig` command.
The RX2 DataRate is also set. In the case of TTN, this value is 3.

> ifconfig <lw_if> set addr 00112233
> ifconfig <lw_if> set nwkskey 00112233445566778899AABBCCDDEEFF
> ifconfig <lw_if> set appskey 00112233445566778899AABBCCDDEEFF
> ifconfig <lw_if> set rx2_dr 3

- Configure join method to ABP
> ifconfig <lw_if> -otaa

- Trigger the join procedure
> ifconfig <lw_if> up

- The `ifconfig` command should immediately report `Link: up`.
interface.
> ifconfig <lw_if>

- Schedule a confirmable downlink message to this node (port 2). This is done
in the Network Server (if using TTN, this is available in the Overview tab
of the device)

- Configure GNRC LoRaWAN to send unconfirmed messages.
> ifconfig <lw_if> -ack_req

- Send a message using the `txtsnd` command
> txtsnd <lw_if> "This is an unconfirmed RIOT message!"

- After 2 seconds the downlink message should be shown in the RIOT shell.

- Configure GNRC LoRaWAN to txtsnd confirmed messages.
> ifconfig <lw_if> ack_req

- Send a message using the `txtsnd` command
> txtsnd <lw_if> "This is a confirmed RIOT message!"

### Result

GNRC LoRAWAN should be able to send and receive data from the Network Server.
Both txtsnd functions should print nothing.
The Network Server should notify the reception of an ACK (carried with the
frame right after the node receives data).
frame right after the node receives data)
42 changes: 0 additions & 42 deletions 11-lorawan/test_spec11.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,45 +278,3 @@ def test_task05(riot_ctrl, ttn_client, dev_id, deveui, appeui, appkey):
assert netif[str(iface)]["link"] == "up"

run_lw_test(node, ttn_client, iface, dev_id)


@pytest.mark.iotlab_creds
# nodes passed to riot_ctrl fixture
@pytest.mark.parametrize(
"nodes,dev_id",
[pytest.param(["b-l072z-lrwan1"], "abp")],
indirect=["nodes", "dev_id"],
)
# Missing fopts will cause it to fail on IoT-LAB(TTN, see:
# https://github.com/RIOT-OS/RIOT/issues/16962
@pytest.mark.local_only
# pylint: disable=R0913
def test_task06(riot_ctrl, ttn_client, dev_id, devaddr, nwkskey, appskey):
node = riot_ctrl(
0, GNRC_LORAWAN_APP, ShellGnrcLoRaWAN, modules=["shell_cmd_gnrc_pktbuf"]
)

iface = lorawan_netif(node)
assert iface

# Set the OTAA keys
node.ifconfig_set(iface, "addr", devaddr)
node.ifconfig_set(iface, "nwkskey", nwkskey)
node.ifconfig_set(iface, "appskey", appskey)
node.ifconfig_set(iface, "rx2_dr", RX2_DR)

# Disable OTAA
node.ifconfig_flag(iface, "otaa", enable=False)

# Trigger Join Request
node.ifconfig_up(iface)

# Wait until the LoRaWAN network is joined
for _ in range(0, OTAA_JOIN_DELAY):
netif = ifconfig(node, iface)
if netif[str(iface)]["link"] == "up":
break
time.sleep(1)
assert netif[str(iface)]["link"] == "up"

run_lw_test(node, ttn_client, iface, dev_id)
1 change: 1 addition & 0 deletions REPLACED.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Full task name | Reason | Last release tested | Replaceable after | Replaced by
-------------: | :----- | :-------: | ----------------: | :----------
8.9 UDP between GNRC and emb6 on iotlab-m3 | [`emb6` package removed](https://github.com/RIOT-OS/RIOT/pull/14494) | 2020.04 | 2021-05-01 | TBA
8.10 UDP between lwIP and emb6 on iotlab-m3 | [`emb6` package removed](https://github.com/RIOT-OS/RIOT/pull/14494) | 2020.04 | 2021-05-01 | TBA
11.6 GNRC LoRaWAN (ABP) | [Difficult to run tests and provides very little value as production systems would not use ABP](https://github.com/RIOT-OS/RIOT/issues/16962) | 2024.01 | 2025-05-01 | TBA
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ disable=
missing-module-docstring,
missing-class-docstring,
missing-function-docstring,
not-callable # with pytest 6 `pytest.mark`s are not seen as callable
not-callable, # with pytest 6 `pytest.mark`s are not seen as callable
too-many-positional-arguments

[tool.black]
skip-string-normalization = true

0 comments on commit 7050968

Please sign in to comment.