From ae4a77d8a658fc874d42d87dc51c4b835d611eb5 Mon Sep 17 00:00:00 2001 From: Akshai M Date: Tue, 6 Sep 2022 10:11:10 +0200 Subject: [PATCH 1/6] RIOT-OS Submodule : Update to 2022.07 release --- RIOT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RIOT b/RIOT index 398a066..81a01df 160000 --- a/RIOT +++ b/RIOT @@ -1 +1 @@ -Subproject commit 398a06655298a8c705f2bc35aab6703b2c50debd +Subproject commit 81a01df5d94729b8d8a2be7ce8e68f9fc7c7b95f From 600bd36b4d37e7862c99ee4230a138d358d0ee22 Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 16 Sep 2022 11:58:32 +0200 Subject: [PATCH 2/6] coap-chat: Update to 2022.07 release The signature changed; no need for changes in code as the context argument is discarded anyway. --- coap-chat/coap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coap-chat/coap.c b/coap-chat/coap.c index 20de029..a404eb8 100644 --- a/coap-chat/coap.c +++ b/coap-chat/coap.c @@ -30,7 +30,7 @@ #define COAP_CHAT_PATH "/chat" -static ssize_t _chat_handler(coap_pkt_t *pdu, uint8_t *buf, size_t len, void *ctx); +static ssize_t _chat_handler(coap_pkt_t *pdu, uint8_t *buf, size_t len, coap_request_ctx_t *ctx); /* CoAP resources */ static const coap_resource_t _resources[] = { @@ -43,7 +43,7 @@ static gcoap_listener_t _listener = { .next = NULL, }; -static ssize_t _chat_handler(coap_pkt_t *pdu, uint8_t *buf, size_t len, void *ctx) +static ssize_t _chat_handler(coap_pkt_t *pdu, uint8_t *buf, size_t len, coap_request_ctx_t *ctx) { (void)ctx; From d219d3385c49d992253cd13447fc33e42fad716b Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 16 Sep 2022 12:05:43 +0200 Subject: [PATCH 3/6] spectrum-scanner: Update to 2022.07 release The ztimer64_xtimer_compat module is not automatically enabled when ztimer provides xtimer compatibility. --- spectrum-scanner/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/spectrum-scanner/Makefile b/spectrum-scanner/Makefile index df7e61c..37a3ddf 100644 --- a/spectrum-scanner/Makefile +++ b/spectrum-scanner/Makefile @@ -12,6 +12,7 @@ USEMODULE += gnrc USEMODULE += gnrc_netdev_default USEMODULE += auto_init_gnrc_netif USEMODULE += xtimer +USEMODULE += ztimer64_xtimer_compat USEMODULE += fmt # Change this to 0 show compiler invocation lines by default: From 2bfd508aadecb42c6cafaf61c6bee019cff3a4fd Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 16 Sep 2022 12:26:34 +0200 Subject: [PATCH 4/6] sniffer: Update to 2022.07 release The ztimer64_xtimer_compat module is not automatically enabled when ztimer provides xtimer compatibility. It does not provide the xtimer_usec_from_ticks64 function, but that was not particularly used anyway. A header file became unavailable but was not needed. --- sniffer/Makefile | 1 + sniffer/main.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sniffer/Makefile b/sniffer/Makefile index 037df6f..7c2e39a 100644 --- a/sniffer/Makefile +++ b/sniffer/Makefile @@ -16,6 +16,7 @@ USEMODULE += shell USEMODULE += shell_commands USEMODULE += ps USEMODULE += xtimer +USEMODULE += ztimer64_xtimer_compat # Change this to 0 show compiler invocation lines by default: QUIET ?= 1 diff --git a/sniffer/main.c b/sniffer/main.c index 0846c98..3f48a3b 100644 --- a/sniffer/main.c +++ b/sniffer/main.c @@ -26,7 +26,6 @@ #include "thread.h" #include "xtimer.h" #include "shell.h" -#include "shell_commands.h" #include "net/gnrc.h" /** @@ -63,14 +62,14 @@ void dump_pkt(gnrc_pktsnip_t *pkt) pkt = gnrc_pktbuf_remove_snip(pkt, pkt->next); } } - uint64_t now_us = xtimer_usec_from_ticks64(xtimer_now64()); + uint64_t now = xtimer_now64(); print_str("rftest-rx --- len "); print_u32_hex((uint32_t)gnrc_pkt_len(pkt)); print_str(" lqi "); print_byte_hex(lqi); print_str(" rx_time "); - print_u64_hex(now_us); + print_u64_hex(now); print_str("\n"); while (snip) { for (size_t i = 0; i < snip->size; i++) { From c48284a25f8bdc6f5f216b37c32ea63ee2e10d50 Mon Sep 17 00:00:00 2001 From: chrysn Date: Mon, 19 Sep 2022 14:46:58 +0200 Subject: [PATCH 5/6] dependencies: Replace deprecated module --- coap-chat/Makefile | 2 +- sniffer/Makefile | 2 +- spectrum-scanner/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/coap-chat/Makefile b/coap-chat/Makefile index 5fb8fb1..6ef5dd1 100644 --- a/coap-chat/Makefile +++ b/coap-chat/Makefile @@ -7,7 +7,7 @@ BOARD ?= native # This has to be the absolute path to the RIOT base directory: RIOTBASE ?= $(CURDIR)/../RIOT -USEMODULE += gnrc_netdev_default +USEMODULE += netdev_default USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules USEMODULE += gnrc_ipv6_default diff --git a/sniffer/Makefile b/sniffer/Makefile index 7c2e39a..a7f6d0e 100644 --- a/sniffer/Makefile +++ b/sniffer/Makefile @@ -10,7 +10,7 @@ RIOTBASE ?= $(CURDIR)/../RIOT # Define modules that are used USEMODULE += fmt USEMODULE += gnrc -USEMODULE += gnrc_netdev_default +USEMODULE += netdev_default USEMODULE += auto_init_gnrc_netif USEMODULE += shell USEMODULE += shell_commands diff --git a/spectrum-scanner/Makefile b/spectrum-scanner/Makefile index 37a3ddf..ce59849 100644 --- a/spectrum-scanner/Makefile +++ b/spectrum-scanner/Makefile @@ -9,7 +9,7 @@ RIOTBASE ?= $(CURDIR)/../RIOT # Define modules that are used USEMODULE += gnrc -USEMODULE += gnrc_netdev_default +USEMODULE += netdev_default USEMODULE += auto_init_gnrc_netif USEMODULE += xtimer USEMODULE += ztimer64_xtimer_compat From ca6d08c448c539ca5e3be783512195d6e3c745eb Mon Sep 17 00:00:00 2001 From: chrysn Date: Mon, 19 Sep 2022 15:07:47 +0200 Subject: [PATCH 6/6] sniffer: Migrate to ztimer See-Also: https://github.com/RIOT-OS/applications/pull/78#pullrequestreview-1112206330 --- sniffer/Makefile | 3 +-- sniffer/main.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sniffer/Makefile b/sniffer/Makefile index a7f6d0e..3368b06 100644 --- a/sniffer/Makefile +++ b/sniffer/Makefile @@ -15,8 +15,7 @@ USEMODULE += auto_init_gnrc_netif USEMODULE += shell USEMODULE += shell_commands USEMODULE += ps -USEMODULE += xtimer -USEMODULE += ztimer64_xtimer_compat +USEMODULE += ztimer64_usec # Change this to 0 show compiler invocation lines by default: QUIET ?= 1 diff --git a/sniffer/main.c b/sniffer/main.c index 3f48a3b..48314c4 100644 --- a/sniffer/main.c +++ b/sniffer/main.c @@ -24,9 +24,9 @@ #include "fmt.h" #include "thread.h" -#include "xtimer.h" #include "shell.h" #include "net/gnrc.h" +#include "ztimer64.h" /** * @brief Buffer size used by the shell @@ -62,14 +62,14 @@ void dump_pkt(gnrc_pktsnip_t *pkt) pkt = gnrc_pktbuf_remove_snip(pkt, pkt->next); } } - uint64_t now = xtimer_now64(); + uint64_t now_us = ztimer64_now(ZTIMER64_USEC); print_str("rftest-rx --- len "); print_u32_hex((uint32_t)gnrc_pkt_len(pkt)); print_str(" lqi "); print_byte_hex(lqi); print_str(" rx_time "); - print_u64_hex(now); + print_u64_hex(now_us); print_str("\n"); while (snip) { for (size_t i = 0; i < snip->size; i++) {