Hi.
I'm tinkering with my nanopi neo2 and finally managed to build OpenWrt from source.
It's so much lighter than Armbian, and hopefully I could build the WiringNP on it.
I have basic coovachilli setup and still figuring out settings, it seems to be working.
My nanopi is setup as dhcp client, with an old Asus USB n-13 wifi dongle (I have it for a long time but never works untill now).
I'd like to know how I can pass local ip address of eth0 after it get it's address from the router
to chilli configuration.
I looked at /etc/init.d/chilli. I could almost understand what's going on there...but not really
I'm thinking that I could do something like this in the startup script:
. /lib/functions/network.sh
local ip
network_get_ipaddr ip "$2"
echo "uamserver=http://\"$ip\"/hotspot/hotspotlogin.php" >> "$chilli_conf"
That above is an imagined function, knowing very little about scripting and imitated from chilli startup script.
network_find_wan NET_IF
network_get_ipaddr NET_ADDR "${NET_IF}"
uci set chilli.@chilli[0].uamserver="http://${NET_ADDR}/hotspot/login.php"
/etc/init.d/chilli restart
}
I added it to file 30-chilli I found in hotplug.d/iface
I think I could also add a chilli directory in the hotplug.d
If I'm understanding this (snippets from init.d/chilli )correctly: