I am very new to RIOT and I am trying to establish the following setup for Wireless OTA firmware updates:
An ESP32 running a border router
A Nucleo-F767ZI board running a few processes
A wired UART connection between the border router and the Nucleo board
I tried the gnrc border router example using Ethos and DHCPv6, which works fine and I’m able to ping the border router from Linux host. But the WiFi uplink doesn’t work and it doesn’t get a prefix.
I have found that when Ethos is used, it creates its own instance of a Kea DHCPv6 server and requests a prefix, but I am unable to find out how to do the same using WiFi. I have an instance of the Kea server running, but I’m unable to figure out if the border router is running the DHCP client or not.
I would really appreciate if I can get a few pointers on this.
I would also like to know how to connect the border router and the Nucleo board using UART and forward packets to the board.
It looks like you are using esp_now as the downlink, not ethos.
In Makefile.board.dep replace the USEMODULE += esp_now with USEMODULE += ethos and maybe set CFLAGS += '-DETHOS_UART=UART_DEV(your_uart)' if you don’t have this set in your board.h.
To get the prefix on the downstream interface you need a DHCPv6 server with IA_PD enabled. Not all routers support this, on the Fritz!Box family you can enable it in IPv6 settings, OpenWRT might enable it by default.
Hi, I’m sorry for the late update. I have been busy and I was unable to work on this for a while.
I have changed the IPv6 settings on my WiFi router to enable prefix delegation, but it still does not work.
I was trying to debug and found out a potential issue that might be a Linux problem not necessarily related to RIOT.
I found that the TAP interface connected to the DHCPv6 server is not in RUNNING state, can this be why it does not give a prefix? Is there any way I can force it into RUNNING state?
I’m confused, how does Linux come into play here?
AFAIK you wanted to use the ESP32 as a router for the Nucleo-F767ZI - so no Linux machine / tap interface is involved here.
What happens when you run examples/gnrc_border_router with UPLINK=wifi on the esp32? (this will use esp_now instead of SLIP for the downlink, but at least you can verify that your network setup works).
You need to tell us more about what you did here.
I understand you want to delegate the prefix to the ESP32, which is going to route to the F767ZI.
You probably should just statically route a prefix to it for now instead of trying to debug your router.
If you really want to do that, then an OpenWRT router, on your LAN ought to be able to get a prefix from your home router. I personally have never gotten an OpenWRT router to do DHCPv6-PD downstream, and I have an kea6 installation specifically do that I can test OpenWRT as a downstream device.
I’m sorry for the confusion. Following the tutorial from RIOT documentation for WiFi uplink for the gnrc_border_router example, in the configuration file of the Kea DHCPv6 server running on my Linux system, I found a field called “interfaces” where I listed my TAP interfaces, so I assumed that is how the DHCP client communicates with the server.
After making the changes you previously mentioned in the border router example Makefile, this is the output when I run “UPLINK=wifi BOARD=esp32-wroom-32 make -C examples/gnrc_border_router flash term”
There is no “lease advert” in the logs, so I’m assuming there has been no activity between the client and the server. The “gnrc_dhcpv6_client_simple_pd” module which you asked me to add in the Makefile seems to be executing all its functions, since I’ve tried to debug the code and did not run into any error messages. I’m not able to figure out where the issue is.
I haven’t done much, I have a TP-LINK WiFi router at home and just went into the router login page , selected an option that said “Get IPv6 prefix delegation”.
I’m currently testing at home, but the final setup is in my university, so it would be great if I don’t need to change any router settings. Can you provide a brief tutorial on static routing? I’m not very familiar with the process.
I’m also interested in testing with the OpenWRT router, since I believe I have one with me. How can I use it to get a prefix?
AFAIK, OpenWRT does not have a southbound (LAN facing) DHCPv6-PD server. This “Get IPv6 prefix delegation” is about the northbound (DHCPv6-PD client) communications.
(I would very much like a DHCPv6-PD server)
I doubt that your university offers DHCPv6-PD service on it’s LAN, as it is atypically a thing.
However, there is work in the IETF 6man/v6ops to make this more of a thing, and there is also the SNAC WG, which aims to deal with the very problem you have having