Hi, I have two questions about ethernet and WiFi interfaces
first, Can I work with ethernet and WiFi interfaces at the same time?
for example:
-WiFi has connected to an access point and its IP address is "192.168.10.111"
-Also Ethernet has connected and its IP is "192.168.15.78"
-A TCP server is created in port 80 in ESP32
now, I can receive requests over port 80 by +IPD in ESP32.
my question is if I send request packets to both IP addresses at the same time and continuously (WiFi "192.168.10.111" & Ethernet "192.168.15.78"), Is the ESP32 sends two +IPD for both interfaces through UART?
if yes, Are UART interfaces for ethernet and WiFi common or different?
Thank you so much.
Working with Ethernet & WiFi at the same time
Re: Working with Ethernet & WiFi at the same time
Hello Ethan90,
1. Yes, you can use both Ethernet netif and Wi-Fi netif to connect to the ESP32 TCP server at the same time, similar to running a TCP server on a Linux system.
2. Connections coming from different netifs (Ethernet or Wi-Fi) will have different connection IDs output by the AT command to the MCU.
For example: "0,CONNECT" and "1,CONNECT". You can use the AT+CIPSTATE? command to query specific connection information (https://docs.espressif.com/projects/esp ... md-ipstate).
3. UART does not differentiate between different netifs. No matter which TCP connection the data comes from, the data will be sent to the MCU in a format like "+IPD,<link_id>,<length>:<data>"
(refer to the +IPD documentation for more information on the format: https://docs.espressif.com/projects/esp ... x.html#id4).
~
1. Yes, you can use both Ethernet netif and Wi-Fi netif to connect to the ESP32 TCP server at the same time, similar to running a TCP server on a Linux system.
2. Connections coming from different netifs (Ethernet or Wi-Fi) will have different connection IDs output by the AT command to the MCU.
For example: "0,CONNECT" and "1,CONNECT". You can use the AT+CIPSTATE? command to query specific connection information (https://docs.espressif.com/projects/esp ... md-ipstate).
3. UART does not differentiate between different netifs. No matter which TCP connection the data comes from, the data will be sent to the MCU in a format like "+IPD,<link_id>,<length>:<data>"
(refer to the +IPD documentation for more information on the format: https://docs.espressif.com/projects/esp ... x.html#id4).
~
Who is online
Users browsing this forum: No registered users and 18 guests