# ESP32 with 2 Wifis

**URL:** <https://forum.arduino.cc/t/esp32-with-2-wifis/1222134>\
**Category:** General Guidance\
**Created:** [February 10, 2024, 8:03am UTC](https://forum.arduino.cc/t/esp32-with-2-wifis/1222134 "2024-02-10T08:03:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![clubman](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@clubman](https://forum.arduino.cc/u/clubman)\
**Post date:** [February 10, 2024, 8:03am UTC](https://forum.arduino.cc/t/esp32-with-2-wifis/1222134/1 "2024-02-10T08:03:31Z")

</div>

Hello everyone,

What I would like to do is connect my ESP32 as a client to an existing wifi network, read some data from this and then create a second wifi as a server in order to broadcast the data read from the first wifi network. Then my android app can connect to this second network and read the broadcasted data.

The question is, can ESP32 have 2 networks running or do I have to get another ESP32 for the server wifi network and have them communicate via serial?

Here is a diagram of what I would like to accomplish:

![ESP32Wifi](https://europe1.discourse-cdn.com/arduino/original/4X/d/7/e/d7e50d847e6ff8d508b94c07334238a97f81789a.png)

Thank you!  
Pete

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [February 10, 2024, 8:10am UTC](https://forum.arduino.cc/t/esp32-with-2-wifis/1222134/2 "2024-02-10T08:10:45Z")

</div>

are the client and server connecting to the same WiFi network?  
have a look at [esp8266-web-server-and-wifi-client-at-the-same-time](https://forum.arduino.cc/t/esp8266-web-server-and-wifi-client-at-the-same-time/594880)

---

<div class="post-metadata">

**Author:** ![clubman](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@clubman](https://forum.arduino.cc/u/clubman)\
**Post date:** [February 10, 2024, 8:21am UTC](https://forum.arduino.cc/t/esp32-with-2-wifis/1222134/3 "2024-02-10T08:21:28Z")

</div>

Hi horace, thank you for your answer! No I want to keep the 2 networks separate. The app will connect to the second one where it will be only the ESP32 and the phone.

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [February 10, 2024, 8:32am UTC](https://forum.arduino.cc/t/esp32-with-2-wifis/1222134/4 "2024-02-10T08:32:24Z")

</div>

you could

1. connect to WiFi network 1
2. run the client and get the data
3. close connection to network
4. connect to WiFi network 2 or run an access point
5. run the server  
etc etc

---

<div class="post-metadata">

**Author:** ![clubman](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@clubman](https://forum.arduino.cc/u/clubman)\
**Post date:** [February 10, 2024, 8:35am UTC](https://forum.arduino.cc/t/esp32-with-2-wifis/1222134/5 "2024-02-10T08:35:02Z")

</div>

I think this will introduce delays. It is a solution but I am researching if I could have the functionality described (I added a small diagram).

---

<div class="post-metadata">

**Author:** ![horace](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/horace/32/1014299_2.png) [@horace](https://forum.arduino.cc/u/horace)\
**Post date:** [February 10, 2024, 8:36am UTC](https://forum.arduino.cc/t/esp32-with-2-wifis/1222134/6 "2024-02-10T08:36:37Z")

</div>

have a look at [setup the ESP32 to work in Soft AP and Station modes simultaneously](https://techtutorialsx.com/2021/01/04/esp32-soft-ap-and-station-modes/)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [August 8, 2024, 8:36am UTC](https://forum.arduino.cc/t/esp32-with-2-wifis/1222134/7 "2024-08-08T08:36:58Z")

</div>

Closed on August 8, 2024, 8:36am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
