Connection failure among nRF52840DK and nRF52840 Dongle

Hi there! Related to my previous topic, I am trying to set up an IPv6 connection between my PC and a nRF52840DK board. To do so, I’m using a nRF52840 Dongle which acts as border router to allow the connectivity between the board and my system.

cd ~/Tutorials/RIOT/examples/gnrc_border_router
BOARD=nrf52840dongle UPLINK=cdc-ecm make flash BOARD=nrf52840dongle UPLINK=cdc-ecm make term

After those steps, in my PC I have an USB interface created as a result. I add it an IPv6 address with:

sudo ip addr add 2001:db8::1/64 dev enxa6e91023eea6
sudo ip link set enxa6e91023eea6 up

Where enxa6e91023eea6 is the name of the interface. Then, I flashed and executed gnrc_networking in my nRF52840DK and copy the IPv6 address showed in ifconfig.

However, when I do ping from my PC to the IPv6 address of the DK board, there is no success (idem if it goes viceversa).

Is there a way to check the interface created is working correctly? I have already tried adding an static route or manually assigning and activating the addresses.

Thanks in advance.

Hi!

You shouldn’t need to do that, IIRC. make term of the gnrc_border_router app should take care of that (currently don’t have the hardware at hand to confirm).

What is does ifconfig tell you in this terminal? Can you try first to ping those addresses? Also the output of nib route could be interesting here.

ifconfig in RIOT gnrc_border_router console gives me:

Iface 6 HWaddr: A6:E9:10:23:F2:A6
inet6 addr: fe80::a4e9:10ff:fe23:f2a6 scope: link VAL

Iface 7 HWaddr: 16:A9 Channel: 26 NID: 0x23 PHY: O-QPSK
State: IDLE
inet6 addr: fe80::a4e7:e2fd:d8f4:16a9 scope: link VAL
inet6 addr: 2001:db8:0:2:a4e7:e2fd:d8f4:16a9 scope: global VAL \

So automatically I have a global address for the Dongle. In fact, a ping to this adress from the nRF52840DK RIOT console works and viceversa. What that global address is not supposed to be from my PC? It seems not, since when I do ping from my PC console to the nRF52840DK board, it doesn’t work. I get

From fe80::7693:daff:fe3b:e400%wlo1 icmp_seq=2 Destination unreachable: Unknown code 5

Also, nib route in the Dongle console tells:

nib route
2001:db8:0:2::/64 dev #7

Hi!

On Thu, Feb 20, 2025 at 06:10:39PM +0000, Iotvan11 via RIOT wrote:

ifconfig in RIOT gnrc_border_router console gives me:

Iface 6 HWaddr: A6:E9:10:23:F2:A6
inet6 addr: fe80::a4e9:10ff:fe23:f2a6 scope: link VAL

Iface 7 HWaddr: 16:A9 Channel: 26 NID: 0x23 PHY: O-QPSK
State: IDLE
inet6 addr: fe80::a4e7:e2fd:d8f4:16a9 scope: link VAL
inet6 addr: 2001:db8:0:2:a4e7:e2fd:d8f4:16a9 scope: global VAL \

So automatically I have a global address for the Dongle.

That is a global address - but a pretty useless one: it is the documentation prefix (defined in RFC 5156, Section 2.6. Hence, it won’t be routed.

In fact, a ping to this adress from the nRF52840DK RIOT console works and viceversa. What that global address is not supposed to be from my PC? It seems not, since when I do ping from my PC console to the nRF52840DK board, it doesn’t work. I get

From fe80::7693:daff:fe3b:e400%wlo1 icmp_seq=2 Destination unreachable: Unknown code 5

Also, nib route in the Dongle console tells:

nib route
2001:db8:0:2::/64 dev #7

That is as expected: routing in your lowpan works but in order to leave your local network you require a routable IPv6 prefix, typically provided by your provider. How to set this up depends a bit on your setup. To which computer is your dongle connected and how is this computer connected to the Internet? How does your router distribute IPv6 addresses in your network? Via DHCP or SLAAC?

Cheers Oleg

Hi Oleg.

I have the dongle connected via USB to my laptop running Ubuntu 22.04. And my computer connects to the Internet via WiFi (my router specifically distribute IPv6 addresses via DHCP).

Hi!

On Mon, Feb 24, 2025 at 12:54:10PM +0000, Iotvan11 via RIOT wrote:

I have the dongle connected via USB to my laptop running Ubuntu 22.04. And my computer connects to the Internet via WiFi (my router specifically distribute IPv6 addresses via DHCP).

In my experience working with the dongle in a setup like the one that you describe the easiest setup would be to use uhcp and propagate a /64 prefix in the network behind the border router:

PREFIX_CONF=uhcp UPLINK=cdc-ecm IPV6_PREFIX=<YOUR PREFIX HERE> make -C examples/networking/gnrc/gnrc_border_router all flash term

In order to determine the correct IPv6 prefix, you could run

ip -6 a s dev wlan0 | grep global | grep -Eo '([[:xdigit:]]{1,4}(:)?){2,8}/64'

assuming that your WLAN interface is called wlan0.

Cheers Oleg

Hi Oleg.

Sadly, I do not get an ouput from your last command (I believe I have no IPv6 address from my ISP). I have tried with fd00::/64 in order to complete the ping, and I have achieved the nRF52840DK board to have a global IPv6 address fd00::64b3:7881:5633:4d32 while the otbr interface of my laptop has fd11:db8:1::1/64.

However, there are two problems that don’t make the ping fd11:db8:1::1 work from the RIOT nrf52840DK console and I don’t know if they can be solved despite my prefix choice. First, after initiating the border router I get:

uhcp_client(): no reply received

Which could be a normal thing or not (the other board is not yet executed). Also, ip - 6 a shows:

3: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP
inet6 fe80::9d51:5689:32ca:3634/64 scope link noprefixroute
valid_lft forever preferred_lft forever
5: otbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 state DOWN \ inet6 fd11:db8:1::1/64 scope global tentative \ valid_lft forever preferred_lft forever
inet6 fe80::1/64 scope link tentative
valid_lft forever preferred_lft forever
11: enxa6e91023eea6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UNKNOWN
inet6 fe80::1/64 scope link \ valid_lft forever preferred_lft forever \ inet6 fe80::2c5e:6f94:9e11:6bd0/64 scope link noprefixroute
valid_lft forever preferred_lft forever

So otbr0 is DOWN, and trying it manually it doesn’t change to UP. But I don’t know if I have to look at this interface or the last one, since while executing gnrc_border_router I get:

Found interface: enxa6e91023eea6
net.ipv6.conf.enxa6e91023eea6.forwarding = 1
net.ipv6.conf.enxa6e91023eea6.accept_ra = 0

So maybe I should focus on this one instead?

Or, without the ISP address, could I get at least the ping between my laptop and nRF52840DK IPv6 using their local addresses?