There have been a number of topics in the forum about this subject and I've gleaned information from several of them. This is how I solved my issues. It may not be the best way but it does work on my network (Router and APs are running OpenWRT).
I set static IP addresses for all devices I expect to be on my network on my Router in Network > DHCP and DNS > Static Leases.
I run 3 dumb AP's - luci-app-commands, arp-scan and fping are installed on each one.
After installing those three pieces of software you might have to reboot your APs.
Once logged into Luci on your AP go to System > Custom Commands and create a command: arp-scan -qxlN -I br-lan | awk '{print $1}' | xargs fping -q -c1
When you run the command it will say the command failed, but when you go to the Status > Overview > Associated Stations on your AP it will show all wireless devices listed with MAC, Hostname, and IP address, and which WLAN it is associated with.
Some folks have indicated that they run this command every few minutes via a cron job but I'm not sure how to do that.
@anon89577378
seems nice, but requires manual intervention and might be prone to bug/mistakes?
Not sure hows @jc1685 solution would be stable but i like it more. Whats the issue to add that to cron? I assume openwrt comes with cron jobs? Also what error it throws - if that command failed then it should not work?
I don't consider mac addresses and IP addresses to be private data, so I don't mind sharing them within my network without authentication or any other protection. So here's what I do.
My primary router with DHCP server enabled just publishes its current lease file via its web server.
ln -s /tmp/dhcp.leases /www/dhcp.leases
^^ This executed via SSH on my primary router allows me to download the current lease file via http://192.168.1.1/dhcp.leases from my primary router.
I had no issues so far. If anything, I'd expect the local DHCP server on a Dumb AP to update the leases file and going out of sync for a couple of seconds. But since the upstream leases are fetched every minute, that shouldn't be a huge problem.
My setup does not include ARP data. So if you have static IP addresses, those won't show up. Static DHCP rules, however, should work just fine. But if you go to e.g. the local network configuration of your laptop and type a static IP address right into your windows network settings, those are not covered.
Regarding the /etc/ethers file jc1685 suggested: I actually don't know if that file sits in a RAM mounted folder on my router or if it gets written to the internal flash drive every time it's updated. This indeed was a concern when I decided for my implementation.
The only thing is I'm not sure why you're getting an error... Unless it's an oversight in your post, the command requires following packages (you are missing findutils-xargs and gawk unless they are install due to dependency/by other packages you have installed):
Just be aware that this is a recipe for command injection attacks and can't be considered to be safe (even in non-malicious cases, e.g. corrupted downloads due to connectivity issues).
To be honest, I fail a little to see what this could be. As long as I trust wget to just not execute the content it downloads and as log as I trust my router not to try execute the leases file even it it happens to be executable. The worst thing I imagined was some file format the dnsmasq would not understand.
But I'm all ears for a better way.
Would you consider using some grep expressions filtering all lines not matching my expected lease file format a sufficient counter measure?
Exactly. The cron "error" is not actually an error.
When you run the command on the shell prompt it should go through cleanly, which means it's working, and will work via cron as well.