Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Nikhil J
#56615 Hi,

My application requires one ESP to be in SoftAP mode(master) and control 4 ESPs(slave). The slaves have peripherals that are controlled by the master. I have been able to do this using UDP broadcast successfully at 50msec intervals with a payload of about 25bytes.

Was curious to see if there's a better way to do a one-to-many communication with ESP.
Thanks in advance

Regards,
NJ
User avatar
By mrburnette
#56919
Nikhil J wrote:<...>
My application requires one ESP to be in SoftAP mode(master) and control 4 ESPs(slave). NJ


Since your application works, I doubt that mine would add much value: I transmit a UDP broadcast with GPS $GPRMC to listeners:
https://www.hackster.io/rayburne/tardis-time-esp8266-ap-webserver-gps-6b5d2a

Ray
User avatar
By picstart
#57158 There are choices. UDP packets aren't guaranteed to be delivered in contrast to TCP which has resend capabilities. Often UDP is used with an existing network that already has its own non esp routing. Microsoft seems to actively discourage UDP so it doesn't fit well with PC's. EasyMesh has some issues mainly it is not as yet as reliable as UDP.
EasyMesh has some coding weakness and some design flaws that are being chewed on. EasyMesh when working will be self repairable and hostage proof in that the failure of any esp will not hold the Mesh hostage. EasyMesh is self contained and only needs esp's to sustain itself ( no router no predesignated master device).
EasyMesh doesn't assign the esp with the strongest radio (RSSI) any special role so you could say it pre-assumes all esp's have equally good radio strength relative to the mesh. It doesn't relay messages to esp's on the edge via esp's in the middle ( unless the master coincidentally is in the middle). The edge esp's have to have the radio strength to reach the other edge.
EasyMesh is apparently of no further interest to its developer so a member of this board is doing the hard work of chasing out the bugs so as to make it as robust as possible.
The reality is that EasyMesh is of most use for an independent sensor network and most often the sensors are close enough that the esp radios are all in range.