• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Two esp32 connection over home wireless network

Q&A Forum › Category: ESP32 › Two esp32 connection over home wireless network
0 Vote Up Vote Down
Chuck Ziegler asked 2 years ago

Hi how would I communicate simple commands and status between two ESP32 boards using my home wireless network?

8 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Hi.
One of the easiest ways is using ESP-NOW protocol.
Check the following tutorials:

  • Getting Started with ESP-NOW (ESP32 with Arduino IDE)
  • ESP-NOW Two-Way Communication Between ESP32 Boards

I hope this helps.
Regards,
Sara

0 Vote Up Vote Down
Chuck Ziegler answered 2 years ago

Thanks Sara, but I understand that ESP-NOW is a communication protocol directly between the two ESP32s and does not use the wireless network within my home as an intermediate connection. Is this correct?
I thought ESP-NOW is: ESP32#1 <–> ESP32#2
So, what I need is:
ESP32#1 <–> Wireless Network <–> ESP32#2 transmitting control and status
appreciate the help. ( btw, Great website you and Rui have!)

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Hi again.
Thanks.
 
It doesn’t use your network, but it is a wireless protocol. Is there a specific reason why you need to use your wireless network?
What is exactly what you’re trying to achieve? So that I can search for a better solution.
 
We also have this tutorial that communicates using the ESP32 wi-fi network

ESP32 Client-Server Wi-Fi Communication Between Two Boards


 
Regards,
Sara
 
 

0 Vote Up Vote Down
Chuck Ziegler answered 2 years ago

Thanks again Sara. I use 4 wireless Access Points around my house and outside to provide overall  coverage which would otherwise be hindered by obstructions(walls, etc). The intended locations of the two ESP32s are far apart and will not allow line-of-sight for the ESP-NOW transmission to connect. So I thought I could use the existing wireless network as a sort of ‘bridge’ between the two ESP32s. (I tried the “painlessMesh.h” example but had no success in getting it to compile. A bit too complex for me).

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

In that case, probably the best solution is to use MQTT. But you need a broker for that.
You can set up your own broker on a Raspberry Pi or on your computer or use a cloud broker.
In my opinion, that’s the easiest way to have all boards connected if they share the same network.
Are you familiar with MQTT?
Regards,
Sara

0 Vote Up Vote Down
Chuck Ziegler answered 2 years ago

No, I’m not familiar with MQTT but I believe there is an  example in my RNT ESP32 Tutorial so l’ll have a good look at that for a start.
Thanks for your help Sara.
 
 

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Yes. We have several tutorials about MQTT.
You can start here: https://randomnerdtutorials.com/what-is-mqtt-and-how-it-works/
You can check all our MQTT tutorials here:https://randomnerdtutorials.com/?s=mqtt
If you have any questions, don’t hesitate to ask.
Regards,
Sara 

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

It might seem a bit confusing at first. But once you understand the basic concepts, you’ll see it’s a very practical solution for IoT projects.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.