From dd5786cd4b8a0851fed2148a8d54de29239e844b Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Mon, 27 Jan 2025 12:30:24 +0100 Subject: [PATCH 1/4] 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. --- 11-lorawan/README.md | 62 +-------------------------------------- 11-lorawan/test_spec11.py | 42 -------------------------- REPLACED.md | 1 + 3 files changed, 2 insertions(+), 103 deletions(-) diff --git a/11-lorawan/README.md b/11-lorawan/README.md index 1ccc1734..e0d57e95 100644 --- a/11-lorawan/README.md +++ b/11-lorawan/README.md @@ -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= -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 set addr 00112233 - > ifconfig set nwkskey 00112233445566778899AABBCCDDEEFF - > ifconfig set appskey 00112233445566778899AABBCCDDEEFF - > ifconfig set rx2_dr 3 - -- Configure join method to ABP - > ifconfig -otaa - -- Trigger the join procedure - > ifconfig up - -- The `ifconfig` command should immediately report `Link: up`. - interface. - > ifconfig - -- 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 -ack_req - -- Send a message using the `txtsnd` command - > txtsnd "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 ack_req - -- Send a message using the `txtsnd` command - > txtsnd "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) \ No newline at end of file diff --git a/11-lorawan/test_spec11.py b/11-lorawan/test_spec11.py index 75c30580..0d9dc655 100644 --- a/11-lorawan/test_spec11.py +++ b/11-lorawan/test_spec11.py @@ -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) diff --git a/REPLACED.md b/REPLACED.md index 3aeaec72..5b7a0847 100644 --- a/REPLACED.md +++ b/REPLACED.md @@ -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 littlevalue as produciton systems would not use ABP](https://github.com/RIOT-OS/RIOT/issues/16962) | 2024.01 | 2025-01-01 | N/A \ No newline at end of file From 4778c95f2261119131191d74211924d2443afffc Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Mon, 27 Jan 2025 12:58:39 +0100 Subject: [PATCH 2/4] chore: Quiet pylint a bit --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index a3763879..947163be 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 From a54e0aa4e585c83d497922d7a6b0cfd45163bab2 Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Mon, 27 Jan 2025 13:46:07 +0100 Subject: [PATCH 3/4] fixup! 11-lorawan: Remove task 06 GNRC LoRaWAN (ABP) --- REPLACED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/REPLACED.md b/REPLACED.md index 5b7a0847..4e4cb973 100644 --- a/REPLACED.md +++ b/REPLACED.md @@ -4,4 +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 littlevalue as produciton systems would not use ABP](https://github.com/RIOT-OS/RIOT/issues/16962) | 2024.01 | 2025-01-01 | N/A \ No newline at end of file +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-01-01 | N/A \ No newline at end of file From 1eb64cbf6e1807cbca04ac623922654d8900712f Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Tue, 28 Jan 2025 10:01:27 +0100 Subject: [PATCH 4/4] fixup! fixup! 11-lorawan: Remove task 06 GNRC LoRaWAN (ABP) --- REPLACED.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/REPLACED.md b/REPLACED.md index 4e4cb973..19e3348f 100644 --- a/REPLACED.md +++ b/REPLACED.md @@ -4,4 +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-01-01 | N/A \ No newline at end of file +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 \ No newline at end of file