Before deciding my next step, I decided to look ahead a few steps ahead and began thinking of how I want my mesh to function in detail. At first I thought that the best approach for this kind of mesh would be to send out packets which any of the nodes could catch and send forward, increasing the performance of the mesh when compared to routing tables, but then I learned of the multicast WiFi problems and its general inefficiencies with battery operated devices and broadcast storms. I took a step away from ESP-NOW to look at how WiFi works in general. In my research, I established that there are two main ways to transmit packets though WiFi: TCP and UDP. TCP ensures that the packet has been received by waiting for a response and re-sending the packet if it has not been received. UDP doesn't do this check at all so there is no certainty that the packet has been received, but is faster than TCP. There are no encrypted kind of packets out there, so the encryption must happen outside of the transport layer. To protect my mesh from jamming and denial-of-service attacks, I think, the channel hopping will do most of the work there, but there are other techniques, like 4-way handshakes. However, to protect the mesh from getting infected from a single tampered node is a completely different matter. With this question, comes another question: how do I know when one of the nodes becomes tampered with? Following the footsteps of SSL, i don't need to make it impossible to do, i just need to make it very hard to do. An example of what is hard to do would be to take down a camera while other cameras are looking at it. Following this analogy, I could do something similar.
All of this research made me realize just how much thought can be put into making a mesh. I got curious of how other mesh solutions solve these problems. I have decided to revisit the idea to try something other than ESP-NOW for my mesh solution. Despite the absence of online tutorials, I'm willing to give ESP-MESH programming a try once more. I found example code which I will try flashing onto ESP32 with PlatformIO.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.