-->
Page 1 of 1

Speedup scannetworks

PostPosted: Wed Jan 13, 2016 5:53 pm
by jather
Hi there,

I'm currently trying to control my roller shutters (hope that is the right word, in german they are called "Rollladen") with ESP-controlled 5V 2channel relais modules. There will be modules spread over 3 floors. I'm trying to build a mesh network with these modules, so that I'm not restricted to the range of my router. At least I hope so!

I just started to develop my strategy on how the nodes build the mesh, so there is no big code to be shared. Until now my code is nearly the same as ESP8266WiFiMesh.h/.cpp (expect of a bunch of debug prints).

Works good so far, BUT:
When I need to spread a message through the mesh, I need to scan for available mesh_nodes. This scan takes aprox. 2 seconds. Just imagine a message needs to go through 3 nodes until it reaches its destination, that would be 3*2 sec for sending and another 3*2 sec for receiving the answer..... that's too much!

Has anybody an idea on how to speedup scannetworks()??
What about async scan, could that be the clue? I'm not sure how to use async scan.