This week I wanted to test the performance of different protocols and mesh-networks. The two biggest characteristics I wanted to determine were range and throughput. My first test was the ESP-Now protocol, which is a peer-to-peer communication protocol near 2.4 GHz. Outside, with a line of sight, I was able to get a range of about 190 feet before a small payload was no longer able to be delivered between nodes. For a throughput test, I used a 200 byte payload, since the maximum for ESP-Now is 250, and played around with how frequently I could send it. Since ESP-Now calls a callback function when it determines that the message was properly received, I made a counter to count the number of times a message was sent but not received. With a delay of 20 ms between sends, I did not get a single failure. 20ms between messages is 50 messages a second, or about 10,000 bytes a second. This was a lot higher than I thought it would be since the payload is quite small. Though of course, this throughput I measured was under ideal circumstances where each board was only executing code for either sending or receiving a message. Also, if I didn't care about some packets not being received and didn't wait for the callback function to called, this number could be a lot higher.

espnowframe This is the frame of the ESP-Now protocol from the espressif documentation found at A maximum size body (250 bytes) takes a large portion of the frame.

Next, I tested the range of painlessMesh, a library that uses Wifi protocol to create a mesh among nodes. Outdoors with line of sight, I was able to get a range of only about 140 feet before messages stopped being received. I didn’t test the painlessMesh throughput myself, but I found a research article where the painlessMesh data rate was tested under ideal circumstances again. In Performance Evaluation of ESP8266 Mesh Networks, researchers were able to get a 10 byte payload received 461 times per second and a 4400 byte payload received about 28 times per second, or throughputs of 4610 bytes and 123,200 bytes per second respectively (Yoppy et al,

Both of these tools aren’t sufficient to transmit video over a mesh-network. OpenMV, for example, has 640x480 resolution color video with 16 bits per pixel. Of course the resolution could be lowered if we wanted to transmit video over the mesh for processing off of the blimp, but that could hinder the performance of processing the image. So, I did some research and found that a very common protocol for video transfer is UDP over Wifi. UDP, unlike TCP over Wifi, doesn’t care if packets are lost over the connection; it simply sends packets as quickly as it can with very small overhead. This works well for video streaming because even if a few packets are lost and a frame has artifacts in it, the next frames will probably be undamaged and the overall video doesn’t lose any important information.

Next Post Previous Post