netProbe: Esp32 network Monitor 03
LupinCorp LupinCorp
823 subscribers
52 views
0

 Published On Jun 7, 2023

In this third video about creating a network probe that runs on an esp32. I put together the code for logging the results as well as the code for retrieving a history of those results. I’m not sure if anyone will watch this unless someone really wants to see how I put together the micropython code, it’s pretty dry. More interesting may be the last 5 minutes where I put the pieces together to get the scheduler and microDot web service running. The results of this leads me into some code optimizations that I will show in the next video (At one stage I was worried I might have to re-write this to run on a raspberry pi 😊 )


00:00 Introduction
00:40 Creating the NetLogger code that will write the results of the ping, bing and web tests out to separate tab delimited files. One file is created for each day, host, test combination.
09:02 Showing how the netLogger records are written out from the main scheduler routine.
10:15 A look at the code used to retrieve a history of netProbe results.
22:11 Showing how the asyncio and microDot code was added so an Angular UI can interface to the netProbe via web services at the same time the scheduler is running network test in the background.
23:42 We see one problem, the microDot libraries (Possibly others as well) are very sensitive to available memory. I fix this for now by moving the import statements around, but I want to aim for a better fix in the next video.
25:12 We see another problem. The scheduler only releases control back to microDot when it finishes a iteration of testing. Some bings take 25 seconds so this can make the web services seem very unresponsive. I think I have some ideas for improving that behavior that in the next video.

Resources

netProbe github repository : https://github.com/somervda/netProbe

show more

Share/Embed