Multiple ESP32 send data to one ESP8266

Hi everyone.

I want to as about ESP32 and ESP8266.

Can I send data from multiple ESP32 to one ESP8266 ?

Yes

MQTT would be an easy way to do this if the ESPs can access the Internet

Thank you very much for answer.

If I don't use internet, it is OK for send data ?

You could run an MQTT (mosquitto) broker on a local PC if all of the ESPs are on the same network as the PC

You could have the esp8266 configured as a server and the esp32 as clients and have the clients send GET/POST HTTP requests to the server.

There is also a protocol called ESPnow for passing messages wirelessly. I've never used that.

You can use ESP Now: Getting Started with ESP-NOW (ESP32 with Arduino IDE) | Random Nerd Tutorials
It works really good I already used it myself

1 Like

You can build a mesh nwtwork between the ESP32 and ESP8266. You can also use the ESP-NOW protocol.

1 Like

I suspect that @may21 now has too many options to choose from :grinning:

and we haven't even suggested UDP or UDP Broadcast up to now ...

Even with UDP, all of the ESP devices must be on the same subnet. The ESP32 can be the AP or the ESP8266 can be the AP, but the '8266 seems to be limited to 4 maximum connections:
https://www.researchgate.net/post/ESP8266-Connect-more-than-4-devices

The ESP32 has more resources, so the default clients is rumored to be 10 but I have not independently verified.

IMO: The better and more stable approach is to just connect to an old AP dedicated to your in-home IoT stuff. Of course, you could connect to your home router, but then you need to configure the NAT and firewall rules unless you want to use DHCP and allow the ESP thingies access to the Inet.

Who does not have an old box of old-AP? Or, consider an RPi that you may have not utilized.

For years I ran an ESP8266 in the attic with a serial GPS module (very old 4800BAUD.) The transmission protocol was UDP. But, I only had ESP receivers programmed as a clock displaying time + date. It worked flawlessly except in the attic unit had a power outage on the AC. Then I had to reset the lot of client devices as I could never get the clients to log back to the ESP8266 for DHCP. A few lithium cells of LiFePO4 chemistry completely solved this issue unless the power was out for greater than an hour: better was definitely possible but the 400mA cells were robbed from a few of the solar outdoor LED garden nightlights. Currently, inexpensive LiFePO4 in the 3.2V@>700mA 14500 series "AA" are readily available and very easy to integrate into 3.3V Arduino projects.

They tend to die after five or eight years or so. Not much use then.

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