I installed (and patched) a real-time Linux on a computer, to do some 'more serious' testing. I chose Ubuntu 16.04 (with 4.14.109 kernel). And I patched it using RT-PREEMPT.
DISCLAIMER: I am no expert! And I probably did a lot of mistakes/inappropriate things. The following paper does not explain a universal method to install a real-time Linux on your machine. It just traces what worked for me.
Here is what I did :
https://github.com/thomasfla/Linux-ESPNOW/blob/master/Misc/RT_Preempt_patch_Linux.pdf
The computer I used was a Dell Precision (with an Intel Xeon).
I tried with 2 different PCIe Wireless Network Interface Cards :
- TP-Link TL-WN881ND (Seems to work really bad in this current setup).
- ASUS PCE-AC51 (The one that I used in the end because it seems to work the best in his current setup).
Finally, after tuning these parameters, and modifying a little my ESPNOW code on the computer (to take better advantage of the real-time OS), here is what I got from the testing :

These results show more consistency in the round trip time. In fact, the histogram shows only 1 sharp peak. Moreover, I did this test several times, and each time the average round trip time was very close to the ones I measured earlier (ranging from 1100µs to 1400µs).
Whereas, in my previous post, the average round trip time could vary from 1000µs to 2100 (or more) within one test...

I don't notice any big changes, concerning the packet loss, other than it is more consistent over the test (same as for the round trip time).
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.