ESP32 WiFi and Ethernet connected same time

firmware_guy
Posts: 12
Joined: Fri Oct 13, 2023 1:09 pm

ESP32 WiFi and Ethernet connected same time

Postby firmware_guy » Fri Oct 13, 2023 1:22 pm

Hello,
I have Wrover ESP32-Ethernet-Kit with AT firmware.
As I understand when Wi-Fi mode is set to 0 (AT+CWMODE=0), RF will be disabled and Wi-Fi will not work at all. But if the Ethernet and the Wi-Fi are connected same time, when I establish TCP connection (AT+CIPSTART), which interface will be used ? Is there way to use only Wi-Fi on this case?
Thank you!

bidrohini
Posts: 202
Joined: Thu Oct 27, 2022 12:55 pm

Re: ESP32 WiFi and Ethernet connected same time

Postby bidrohini » Sat Oct 14, 2023 10:21 am

You can find your answer here.
https://esp32.com/viewtopic.php?t=1274

firmware_guy
Posts: 12
Joined: Fri Oct 13, 2023 1:09 pm

Re: ESP32 WiFi and Ethernet connected same time

Postby firmware_guy » Mon Oct 16, 2023 9:30 am

Thank you bidrohini for your suggestion, but it doesn't answer exactly on my question. Correct me if i'm wrong, but after research, I came to the following conclusion:
If ethernet and Wi-Fi are available and connected, then selection of the interface for communication can be done like this:
- only Ethernet connections: Wi-Fi mode is set to 0 (AT+CWMODE=0), RF will be disabled and Wi-Fi will not work at all (as I mention it).
-only Wi-Fi connections: the only thinks we can do is to be sure that the .route_prio is higher then this of the ethernet. This must be enough when we try to establish connection the ESP to use Wi-Fi.
Thank you!

esp-at
Posts: 200
Joined: Mon May 09, 2022 3:00 am

Re: ESP32 WiFi and Ethernet connected same time

Postby esp-at » Mon Nov 06, 2023 7:11 am

i think you can specify the "local ip" parameter of AT+CIPSTART command in your case.
https://docs.espressif.com/projects/esp ... #cmd-start

firmware_guy
Posts: 12
Joined: Fri Oct 13, 2023 1:09 pm

Re: ESP32 WiFi and Ethernet connected same time

Postby firmware_guy » Mon Nov 06, 2023 11:49 am

Yes, this is exactly what I'm looking for. I obviously missed that info. Thanks a lot for the reply.

esp-at
Posts: 200
Joined: Mon May 09, 2022 3:00 am

Re: ESP32 WiFi and Ethernet connected same time

Postby esp-at » Tue Nov 07, 2023 1:58 am

no worries

Who is online

Users browsing this forum: No registered users and 29 guests