Hi Does anyone use the painless mesh library ?
I'm having a few issues that I don't understand and I'd like toknow more about this.
I'm setting a mesh with one ESP32 acting also as a webserver and some ESP8266 (2 at the moment). Whenever a ESP8266 connect to the mesh, the ESP32 should be warned using the following instruction:
Sometimes it works OK (not very often though) but the rest of the times only 1 ESP8266 is seen. When I connect the second one, only the changedConnectionCallback is triggered, not the newConnectionCallback. And I'm using the newConnectionCallback to get the information about the new node (id, etc).
In the newConnectionCallback the ESP32 sends a message to the new node, asking for its id (a private id I set to all the nodes). The ESP8266 is supposed to send back the id and a status information. Sometimes this information exchange takes up to 20 seconds, which seems very long to me. And there is no other connected node at that time (only the ESP32 and one ESP87266).
Is this normal ?
Anotherissue is to get the IP address of the ESP32. The instruction is
IPAddress myAPIP = IPAddress(mesh.getStationIP());
When first executed, just after connecting to my wifi, I get 0.0.0.0. The real IP address is only provided after some time or in another function which is called later.
Does anyone know why ?
I can post the entire code, but it's quite long... Thanks for your help