Probably don't want to change the cooldown, but I would like a way to control the minimum cycle time, rather than just (8hrs) / (#MACS to cycle). If I'm cycling a lot of MACs, I don't want wifi restarting every 30 seconds.
I'll get you that additional info when next I'm at home. I'm still figuring it out myself, but with the version of OpenWrt I'm using, changing mac/ssid is like so:
Code:
uci set wireless.@wifi-iface[${iface}].macaddr="${mac}"
uci set wireless.@wifi-iface[${iface}].ssid="${ssid}"
uci commit wireless
wifi
The OpenWrt filesystem uses an overlay, so new files you create anywhere persist through a reboot. I've been looking at
this post for reference in what I've been trying to do.
Not at all routers supported by OpenWrt employ the nvram utility. My older broadcom ASUS used it, but the newer atheros TP-LINK does not. Regardless, the mac/ssid can be configured with uci on both, so nvram probably isn't needed. You could detect encryption with
Code:
uci show wireless.@wifi-iface[${iface}].encryption
The web UI is coded with Lua. The "easy" way is to use the luci APIs to modify config files of a predetermined format. Either your script would need to interpret these config files (possibly using "uci show" commands), or the web UI would need to be coded to output configuration more amenable to your script.