Wish ESP8266 Mesh

positrom2

Active Member
Licensed User
Longtime User
As I understood (somehow) the espressif Mesh concept, it allows several ESPs to communicate without being connected to WiFi or the internet.
This is what I like to have, for simplicity, if it works. There is an Arduino library for that:
https://github.com/Coopdis/easyMesh
So one ESP could measure data (BMP280):) and send them to another one to evaluate and display them on a LCD. Setting up a Raspi for that task is not comfortable (needing e.g. some (bulky) monitor).
If the two or more ESPs could do that job (best from B4R), it would greatly simplify the matter.
 

Cableguy

Expert
Licensed User
Longtime User
I don't see the need for an extra lib here...
set one ESP as Master (Server Mode) and any number of n ESPs as Slaves and connect to the master ESP.
Use serialization to send/receive data and to identify the sender/receiver.
You can even use any other protocol available, such as mqtt, http, etc
 

positrom2

Active Member
Licensed User
Longtime User
I will see how to get that running.
So the mesh concept was wasting time?
Any of the "other protocol available" seems overshoot if simpler solution is available.
 

Cableguy

Expert
Licensed User
Longtime User
The simplest would be the serialization method.
Check Erel's exemples about connecting arduino and esp to get you started
 

Cableguy

Expert
Licensed User
Longtime User
This subject is quite interesting, i may attempt creating à couple of code modules for this... are you up to à joint-venture?
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
Its a very cool video, BUT, something is eluding me...
From what I read i the github you shared, the mesh connects in adhoc mode, meaning that there is no Master/Slave relation, however, to the best of my knowledge, adhoc is only possible between no more than 2 devices (?)... (after googling, I see I am wrong.. need to look deeper into this)

Plus, the addition of a webapp, in my way of viewing things, makes the smartphone a Master device, which controls any other "smart block" that get's added to the network... the fact that the "smart blocks" react to another block being added or removed may be explained by the webapp behaviour too...

I will first gather a few ideas and notions, and figure out what would be the better approach to a similar behavior, but without the webapp...
What I can see as a "real world" use, is a esp based "smart display" (like the nextion) which will react to other "nodes"(sensors) being added to the mesh and show their info... I have 2 ESP to try out, plus a few smartphones that can simulate other nodes.. will see how that Goes, maybe i'll get a few more ESPs
 

Cableguy

Expert
Licensed User
Longtime User
This is a very good use case for MQTT. The broker can run on the Android device, a PC or a SoC such as Raspberry Pi.

MQTT is really a great solution for communication between multiple devices.

Yes, but it still is an "outside service", which in more simpler cases (you may also read as "private restricted") is something you want to avoid all together
 

positrom2

Active Member
Licensed User
Longtime User
The WebApp shown in the video is not required.
Here I am running two ESPs in a Mesh configuration (Example "Hello Mesh" from the Arduino Mesh lib):
Works the same with three ESPs.

On com8 I get this (Added the Com8 and Com13 strings for better distinguishing).
"Com8: Setting up mesh node...
received: Com13: Hello world response #0 from Mesh_Node10775221.
received: Com13: Hello world response #1 from Mesh_Node10775221.
...."

On com13 I get this:
"Com13: Setting up mesh node...
received: Com8 request #6 from Mesh_Node13927457.
received: Com8 request #8 from Mesh_Node13927457.
..."
 

Erel

B4X founder
Staff member
Licensed User
Longtime User

Cableguy

Expert
Licensed User
Longtime User
from what I was able to gather from several researches, true ad-hoc mode is not possible with the ESP...
however, since at least 2 devices are needed to establish a "pseudo ad-hoc" network, I started creating a code module that will first search for a given network SSID, and if found, connect to it... if not found, then it will establish it self as the master...
 

Cableguy

Expert
Licensed User
Longtime User

Samuel Ramirez

Member
Licensed User
Longtime User
In my opinion, MESH for ESP8266 (and any other communication devices) is a very important feature for networks. It will be more used in IoT solutions.
The implementation of the MESH network feature for the ESP8266 was done by Espressif. The importance of wireless MESH networks is based on the fact that these networks are dynamic, self-organizing, adaptive or static, deterministic and all of these benefits are implemented by Espressif in their SDK. I understand that implement a specific mesh library for ESP8266 will require development time but if done, it will be very useful.
 

gmag11

New Member
A mesh makes sense when the number of devices is relatively high. An ESP8266 configured as AP can accept a maximum of 4 devices, and home wifi routers have a similar (normally higher) limitation.

If you want, for instance, to create a network with many devices, a mesh is the best solution. This concept is used by xBee and ZWave. Using WiFi is probably worse than those technologies because its range is limited to some tenths meters but... ESP8266 is so cheap.

EasyMesh is a good approach that does not limit the maximum number of devices. It uses a concept where all nodes have the same weight, there is no master node.

You can connect another device (like a RaspberryPi) to the mesh easily, without especial hardware but WiFi adapter, and get data from mesh to the cloud. You only need some Python (or any other language) code to make a TCP connection to your connection point.

EasyMesh development has not been developed since some months. That's why we have created a fork called PainlessMesh that may be worth to test. If you'd like to, it is available on https://gitlab.com/BlackEdder/painlessMesh
 
Top