Hello,
I am about to install Merlin on my Asus-AC86U router.
I want to create a lightweight application or script that has one job: notify my server whenever a WiFi device enters or leaves my network.
My inital idea is: Add a small script that runs on boot. The script loops endlessly (with 1 sec delay between each iteration). The script somehow retrieves a list of all WiFi devices currently connected to my network, compares with data from the previous iteration. If there is a difference in the datasets, it means devices have entered or left the WiFi network area. Then, send this information to my server (that part I can figure out on my own, I think).
So a couple of questions:
1) Can scripts that are executed on start run in a neverending loop, or will this not work? Will it block execution of other applications on my router?
2) How can I retrieve data (mac addresses) of each device currently connected to or in the area of my WiFi network? Preferably in a bash script, but I'm all ears for e.g. Python/native application solutions.
3) If the scripts cannot run in a neverending loop, how should I store the data about the connected devices between each execution of the script?
I am about to install Merlin on my Asus-AC86U router.
I want to create a lightweight application or script that has one job: notify my server whenever a WiFi device enters or leaves my network.
My inital idea is: Add a small script that runs on boot. The script loops endlessly (with 1 sec delay between each iteration). The script somehow retrieves a list of all WiFi devices currently connected to my network, compares with data from the previous iteration. If there is a difference in the datasets, it means devices have entered or left the WiFi network area. Then, send this information to my server (that part I can figure out on my own, I think).
So a couple of questions:
1) Can scripts that are executed on start run in a neverending loop, or will this not work? Will it block execution of other applications on my router?
2) How can I retrieve data (mac addresses) of each device currently connected to or in the area of my WiFi network? Preferably in a bash script, but I'm all ears for e.g. Python/native application solutions.
3) If the scripts cannot run in a neverending loop, how should I store the data about the connected devices between each execution of the script?