How to Enable Communication Between Clients Connected to ESP32 Access Point and USB Ethernet Interface
Posted: Sun Sep 22, 2024 7:49 pm
Hello ESP32 community,
I am working on a project where I have successfully configured my ESP32 to function both as an Access Point (AP) and as a USB Ethernet interface (network card). Now, I need to establish communication between clients connected to the ESP32's AP and my machine via the USB Ethernet interface.
What I have done so far:
1. ESP32 as an AP: I’ve set up the ESP32 to act as an Access Point. Clients can connect to it, and I can manage the connections.
2. ESP32 as a USB Ethernet interface: The ESP32 is working as a USB Ethernet device using TinyUSB (e.g., RNDIS/CDC-ECM), and it's recognized as a network interface on my machine.
My Questions:
1. How can I forward IP packets between the clients connected to the ESP32's AP and my machine over the USB Ethernet interface? I am looking for a recommended approach to set up efficient packet forwarding.
2. Should I use lwIP for IP forwarding, or are there other APIs or methods that would be better suited for this scenario?
3. Are there any example projects or additional configurations that can help optimize communication between the Wi-Fi interface and the USB Ethernet interface?
Any guidance or example code would be greatly appreciated!
Thank you in advance
I am working on a project where I have successfully configured my ESP32 to function both as an Access Point (AP) and as a USB Ethernet interface (network card). Now, I need to establish communication between clients connected to the ESP32's AP and my machine via the USB Ethernet interface.
What I have done so far:
1. ESP32 as an AP: I’ve set up the ESP32 to act as an Access Point. Clients can connect to it, and I can manage the connections.
2. ESP32 as a USB Ethernet interface: The ESP32 is working as a USB Ethernet device using TinyUSB (e.g., RNDIS/CDC-ECM), and it's recognized as a network interface on my machine.
My Questions:
1. How can I forward IP packets between the clients connected to the ESP32's AP and my machine over the USB Ethernet interface? I am looking for a recommended approach to set up efficient packet forwarding.
2. Should I use lwIP for IP forwarding, or are there other APIs or methods that would be better suited for this scenario?
3. Are there any example projects or additional configurations that can help optimize communication between the Wi-Fi interface and the USB Ethernet interface?
Any guidance or example code would be greatly appreciated!
Thank you in advance