-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ESP32 Router: Unable to ping RIOT node from Linux #19873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can I get some help on this? I have been wracking my brain for two weeks but I cannot seem to figure out the problem here. |
I can't reproduce your issue. There is indeed a bug when you use Maybe if I post my setup that helps you to solve your issue: The ESP32 is connected to a WiFi network that is bridged to the LAN that my PC is on. It's ethernet interface is:
Now we need the link-local address of my machine to set it to be the default router of the network (because we want the ESP32 to forward packets from the downstream network to it): You already have the changes to enable SLIP and disable --- a/examples/gnrc_border_router/Makefile.board.dep
+++ b/examples/gnrc_border_router/Makefile.board.dep
@@ -8,8 +8,11 @@ ifeq (,$(filter native,$(BOARD)))
ifneq (,$(filter esp32 esp8266,$(CPU)))
USEMODULE += esp_wifi
ifneq (ble, $(DOWNLINK))
- USEMODULE += esp_now
+# USEMODULE += esp_now
endif
+ USEMODULE += slipdev_l2addr
+ CFLAGS += -DCONFIG_GNRC_IPV6_STATIC_ADDR_UPSTREAM=8
+ CFLAGS += -DCONFIG_GNRC_IPV6_STATIC_ADDR_DOWNSTREAM=9
else
$(error Only esp32 and esp8266 are currently supported)
endif To flash this I use
This gives on the ESP32 router:
I can now add the route to the downstream network ( sudo ip route add 2001:db8::/64 via fe80::3e71:bfff:fe9e:13fc dev eno1 The downstream node should have obtained the prefix from the ESP32 via SLIP by now too:
and with the route in place I can ping it from Linux:
|
Thank you @benpicco for posting your setup in such detail. The only difference I can find between my setup and yours is that both the upstream interface in your ESP32 and your PC's ethernet interface have a global address, both of which are missing in mine. Are these necessary? Are there any extra steps which I'm missing to replicate your setup? |
When you do a
on the nucleo board and then do a
on your PC, does that arrive on the nucleo board? What's the output of
on your PC? |
hm this seems a bit old, have you tried with the latest |
I've just tried with the latest
|
What's the output on the nucleo? |
Nucleo output:
|
I have tried the same process at a different location using a different router and it worked. I can now see the ping reply.
I guess IPV6 is turned off by default / not available on my home network, that's why it did not work previously. |
Description
I have an ESP32 setup as a router using gnrc_ipv6_router_default and a Nucleo-F767ZI as a RIOT node connected to the ESP32 via SLIP using UART.
I have modified the gnrc_border_router example and the SUIT update example with the help of @benpicco (see: https://forum.riot-os.org/t/border-router-ota-using-wifi/3895/40) to convert the border router into a WiFi <-> SLIP router. I am successfully able to ping the ESP32 and the Nucleo back and forth, and I am able to ping the ESP32 through the WiFi interface of my Linux PC. I am unable to ping the RIOT node from my Linux PC, there is no response from the node.
I'm not sure if this issue has been addressed before but I have not seen many issues here which had a WiFi to SLIP router, and I don't know if I need to do anything else to make this work. But I've been struggling with this for a couple of days before I decided to post it here.
Steps to reproduce the issue
BOARD=esp32-wroom-32 UPLINK=wifi PREFIX_CONF=static make -C examples/gnrc_border_router/ flash term
Connect ESP32 to the same WiFi network as the Linux PC

Flash suit_update to Nucleo-F767ZI
USE_ETHOS=0 BOARD=nucleo-f767zi PROGRAMMER=cpy2remed make -C examples/suit_update/ term
Connect ESP32 to the Nucleo board via UART (SLIP)

Add route to Nucleo board via ESP32 from Linux
sudo ip route add 2001:db8::/64 via fe80::a6cf:12ff:fe9a:2dc8 dev wlp0s20f3
Here
wlp0s20f3
is the name of the WiFi interaface of the Linux PCExpected results
Nucleo board responds to the ping from Linux
Actual results
Ping ESP32 from Linux (Success)

Ping Nucleo from Linux (Failure)

Versions
RIOT Version: 2023.04-devel-420-g96a7d
The text was updated successfully, but these errors were encountered: