use ESP32 as wifi AP/Ethernet switch ?

ESP_XCGuang
Posts: 25
Joined: Fri Aug 31, 2018 7:34 am

Re: use ESP32 as wifi AP/Ethernet switch ?

Postby ESP_XCGuang » Fri Aug 31, 2018 7:42 am

Hi all,
There is a demo about forwarding data between ethernet and softap, the link is https://github.com/espressif/esp-iot-so ... s/eth2wifi. Maybe it is helpful for you.

liuzhifu
Posts: 39
Joined: Tue Dec 13, 2016 2:18 am

Re: use ESP32 as wifi AP/Ethernet switch ?

Postby liuzhifu » Mon Sep 10, 2018 3:01 am

Hi,

For L2 forward between WiFi and Ethernet, please refer to: https://github.com/espressif/esp-iot-so ... s/eth2wifi

For L3 forward between WiFi and Ethernet, I think the LWIP ip forward can work correctly without any change if the network topology is simple enough,

For example, as following picture described:
1. Two stations (PC and phone) are connected to ESP32 AP, the ip address is 192.168.4.2 and 192.168.4.3 respectively
2. Ethernet connects to the external device, the IP is 10.10.10.10.
3. If PC, phone, external device (extern AP) know each others IP address, then they can communicate with each via IP address
Attachments
simple_example.jpeg
simple_example.jpeg (44.88 KiB) Viewed 4457 times

Who is online

Users browsing this forum: No registered users and 132 guests