I have a development Nano board connected to my test vehicle. This board has a WiFi module added
as well as an LTE module. Both are configured (wifi0 and ppp0) and working.
I like to automatically get notified when I connect and reconnect to Wifi and routing be switched,
so when I get back to the office and reconnect to WiFi I get notified (API) so my software can start uploading collected data when on Wifi so I do not have to do it manually. As soon as I leave the office, I will stop the transfer.
I probably would send “successful transfer completed” so I know when I can leave again.
When I am on LTE connection, I just publish GPS back to the office as well as some occasional stats.
Has any once solved such a problem? Know of any project I can leverage? Preferably C++, but it could be in Python.
My idea is to open two sockets to both interfaces and monitor them and then switch routing.
There should be some “delayed” period to handle cases when I pull in or out from the office building.
I could connect and disconnect in a short time (no intended network switch)
Any suggestions, ideas, sample code?