Real-Time Updating Dumb AP Associated Stations!

Were you aware that WDS clients (wifi extender) get the hostnames (and ip-addresses) with no extra configuration?

Weird.
As of 23.05, I'm seeing all and only the clients associated with the WAP... not "all DHCP leases" as you describe.
I also see non-static leases appear with only their IP address (no hostname)

FWIW, I was running it with synched /etc/ethers across all APs and main router, but have since emptied out all the ethers files in the APs and it still works fine.

Maybe something has changed in 23.nn
Until now only 22.nn firmware here ...

1 Like

FWIW, I’ve gone with the DHCP hotplug based approach as well, but it can be very “chatty” at times. So in order to not re-send duplicate data for every DHCP hotplug event, I accounted for it with a script I posted here:

Hotplug scripts are sourced and therefore do not need to be executable. This step is not needed, nor recommended.

Should I do this in the main router or dumbAP?

Additionally will this method show Active DHCP Leases which is present in the main router, in the dumbAP?

I just tried everything in the main router and it doesn't work with the latest OpenWrt. Still a "?" shown on the dumbAP.

The hotplug.d script goes in your main router. But note the point about hotplug.d scripts should not be executable, as I mentioned previously.

No, not in the sense that I believe you're asking. When you view the Network-->Wireless section, Associated Stations will show hostnames for the associated clients. That is the intent of this script.

This seems like an often sought feature, but all these high-level scripting approaches leave much to be desired (hacky, high overhead, not atomic, etc).

Just an idea. You can create a socket through socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL)) and capture ethernet frames, which you can then map MAC addresses to IP addresses and relay pairs to connected dumb APs.

Server: server -i interface -a address -p port
Client: client -a address -p port -s script.sh

Is this something people would be willing to compile for them their own devices?

As suspected, I can catch those ARP frames in the dumb AP directly.

root@router2:/mnt/root# gcc -std=c89 -O2 -Wall -Wextra -Wpedantic -idirafter /mnt/usr/include -o warpmon warpmon.c
root@router2:/mnt/root# ./warpmon
[ARP] MAC: XX:XX:XX:XX:XX:XX, IP: 192.168.0.168
[ARP] MAC: XX:XX:XX:XX:XX:XX, IP: 192.168.0.1
[ARP] MAC: XX:XX:XX:XX:XX:XX, IP: 192.168.0.118
[ARP] MAC: XX:XX:XX:XX:XX:XX, IP: 192.168.0.1
[ARP] MAC: XX:XX:XX:XX:XX:XX, IP: 192.168.0.226
[ARP] MAC: XX:XX:XX:XX:XX:XX, IP: 192.168.0.143

In this example, it's only catching ether frames in the phy0-ap0 interface. Currently, I've only implemented the capture (single interface), still need to implement CLI options and implement adding those entries to the local ARP table.