ethernet and wifi bridge

User avatar
urbanze
Posts: 295
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

ethernet and wifi bridge

Postby urbanze » Wed Apr 14, 2021 10:26 pm

Hello! I looked in example "eth2wifi" inside IDF, but I need to do something a little different.

Ethernet to WiFi STA and not AP. I tried some things but none worked.

I have one device with ethernet connection, but in some clients, just the wifi is present. I need ESP32 to connect in WiFi (STA) and route all trafic to ethernet and vice-versa.

I tried to enable "IP forwarding and NAT" in LwIP menuconfig options, but none worked. Someone can help me?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ethernet and wifi bridge

Postby WiFive » Wed Apr 14, 2021 11:21 pm


User avatar
urbanze
Posts: 295
Joined: Sat Jun 10, 2017 9:55 pm
Location: Brazil

Re: ethernet and wifi bridge

Postby urbanze » Thu Apr 15, 2021 6:55 pm

Hello WiFive! Thanks for this example. I test but fail.

ESP32 can connect in my router and get own IP Addr, however, my computer still failling to get IP Address and internet access. When DHCP (in computer) is active and ping someone, this error appears: ping: connect: Network is unreachable

When use static IP in computer, ping show this another error: From 192.168.43.155 icmp_seq=1 Destination Host Unreachable

I tried to asign static IP to computer equal from ESP32 WiFi STA and different, but none worked.

I tried to enable "IP Forwarding" and "NAT" in LwIP menuconfig, but nothing changes. (idf 4.2)

I tried normal ethernet cable and crossover, but fail again

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ethernet and wifi bridge

Postby WiFive » Thu Apr 15, 2021 7:49 pm

urbanze wrote:
Thu Apr 15, 2021 6:55 pm

ESP32 can connect in my router and get own IP Addr,
That is not how it works, esp32 will not request an IP address, it is transparent pass through interface. I don't know if that example works on esp-idf >4.0

Who is online

Users browsing this forum: Google [Bot] and 114 guests