Dumb AP - Associated Stations Resolver

Just edit the output folder to /www in that line would do the trick you mean, or anything else required?

For testing that's enough.
Since /www (/ really) is stored on flash, you should output associated_stations.htm to /tmp, and create a soft link to it from /www, to avoid flash wear.

I didn't test yet this new script, because the first one from OP does not work propperly on my acesspoint. And I am affraid, the error will be still the same.
I must have something wrong configured or there is missing a package.

The ethers and hosts files get generated with all the IP's and Hostnames, but on the status overview appears MAC with IP's only. The hostnames are still missing.

On my main router this is working, only on the ap not. Anybody a hint where to find the error?

ship the ethers file from the main router.

Sorry to ask, but how can this be done?

On main router

root@OpenWrt:~# cd /www
root@OpenWrt:/www# ln -s /etc/ethers .

on AP:

cd /tmp
wget http://main.router.I.P/ethers
cat /tmp/ethers > /etc/ethers

what I wrote about the script four posts earlier applies here too - consider the flash wear.

1 Like

Thank you!

But, the ethers and hosts files are generated fine on the AP. I think it would not help if I replace them with the ones from my main router.

then I don't understand your question, but it's OT in this thread anyway ...

I think I give up here.

Changed that one line for the output directory to /www.
Still the same error pointing to the old folder.
Don´t know if there is another line in that script what points again to the old folder.

Maybe you could restore the original files and compare the permissions of your files with mine:

Screenshot from 2025-06-10 20-58-16
Screenshot from 2025-06-10 20-59-01
Screenshot from 2025-06-10 20-59-34
Screenshot from 2025-06-10 21-00-30

in folder pr_home
-rw-r--r-- 1 root root 9459 Jun 10 12:13 associated_stations.sh
in folder /usr/lib/lua/luci view
-not created the file associated_stations.htm
in folder /usr/lib/lua/luci/controller
-rw-r--r-- 1 root root 187 Jun 9 14:00 associated_stations.lua
in folder /usr/lib/lua/associated_stations
-rw-r--r-- 1 root root 147 Jun 9 14:57 associated_stations.lua

the .sh does not have the same permissions, why?
I was changing the chmod command in the last line of the .sh to
chmod +x $OUTPUT_FILE (was before chmod 644) but also not running.
Changing output folder to /www was also not successful.

Ok; let's assume you have succesfully restored all "my original files".

Just to be sure, check your /pr_home directory permissions:
image

Now execute chmod +x associated_stations.sh and then manually launch the sh script to see if it creates the htm file. :crossed_fingers:

1 Like

Thanks a lot
That is working now. Just started the LuCI menu entry and I got the output! Well done I would say!!!!

But :slight_smile:
I am on the main router and I see its DHCP leases.
It only shows phy0 and phy1 not br-lan
Column Host is next to the MAC and just shows the mac address again - no hostname
Column IP shows Unknown - Means no ip address

Can I change that or why does it not display these details?

Glad to hear it works, well done!

I believe "names" are not displayed because in your device are different: you have to find out them and change the .sh script accordingly. Nevertheless, as my main router doesn't run OpenWrt right now, another point of improvement would probabily be adapting it to an actual router environment,.