Gnrc_networking example with nRF52840dk

Hi, I’m new to RIOT and, to begin with, I’m trying to execute correctly some examples.

In particular, I have completed “gnrc_networking” with the native board, and I am wondering if it could be run in a similar way with an nRF52840dk board. README states that the process only works in native, even so, I tried flashing the firmware onto the nRF board and creating the TAP interface, but when it comes to doing the ping in a Linux terminal:

ping fe80::64b3:7881:5633:4d32%tap0

Where the nRF IP is fe80::64b3:7881:5633:4d32, I get an “address unreachable” answer.

What changes would be necessary to make the example work in this case?

Thanks in advance, and I appreciate any suggestions to make my contributions to the forum rich.

Hi @Iotvan1, welcome to the RIOT community!

Did you connect the nRF52840dk in any network-specific way to you host machine? If not there is of course no IP connectivity.

I would recommend to either get a second, also IEEE 802.15.4-capable, board and then ping between them via radio and 6LoWPAN, as you did in the „Connecting two RIOT instances“, or use the gnrc_border_router example to learn how to connect your 6LoWPAN mesh (and the nRF52840dk which then acts as a border router to it) to the host machine via Ethernet over USB (CDC-ECM) or Ethos or SLIP. For the nRF52840dk the CDC-ECM route is probably best, however, I just noticed that there is no documentation for that. But is as simple as just setting UPLINK=cdc-ecm as a variable.

Thank you so much Miri.

I have been trying to create a Thread Network to communicate the PC with the board and then use an OTBR docker image instead of the example. For the first part, I’m using an nRF52840 Dongle that allows wireless communication and “turns” the PC into a base station.

However, I’ve run into another problem along the way, which is that the OpenThread example in RIOT doesn’t compile with the Dongle. I tried modifying the Makefile, but it still doesn’t work.

Is there any “RIOT-restricted” solution or am I forced to use the Zephyr example (which I don’t precisely know if it will work when I move to RIOT again)?

Do you mean examples/openthread? You could try adding nrf52840dongle to the BOARD_WHITELIST in its makefile. Since nrf52840dk is supported, I would expect it to work on the dongle, too.

Hello Mikolai.

Yes. I did add that addition in examples/openthread/Makefile, but surprisingly it fails (even when I compile with CONTINUE_ON_EXPECTED_ERRORS = 1).

What I get is:

/home/iab/Tutorials/RIOT/examples/openthread/bin/nrf52840dongle/pkg-build/openthread/Makefile] Error 127 make: *** [/home/iab/Tutorials/RIOT/examples/openthread/…/…/Makefile.include:827: pkg-build] Error 2

I figured it out and was a silly question. Just need cmake installed.

1 Like

Hello again.

I’ve been thinking about the alternative of using the gnrc_border_router example, and I have come across this approach:

Before I have the nRF52840dk board running gnrc_networking in order to do the ping, there is an nRF52840 dongle acting as border router to allow IPv6 connectivity.

Is this idea correct or am I missing something important to make the connection work?

Question is: “IPv6 connectity to what?” If you mean IPv6 connectivity between your host system and the nRF52840dk board running gnrc_networking, then yes.

Here is a simple diagram how the connectivity looks like in this case (6LBR denotes the 6LoWPAN border router the gnrc_border_router app provides, 6LR the 6LoWPAN host the gnrc_networking app provides):

+---------------+
| Host system   |  USB-CDC  +------+  IEEE802.15.4  +-----+
| (e.g. Laptop) |<--------->| 6LBR |<-------------->| 6LR |
|               |   (ECM)   +------+   (6LoWPAN)    +-----+
+---------------+

Yes, sorry for not pointing that out.

I’ll try this practical case then. Thanks!