Personally I've not tested this, because I do not use client mode. That's why I'm asking you to do this.
As for existing association - this due to the fact wl module was previously in AP mode and shoing garbage to you. Don't worry - new firmware will switch it to the right state with no broken association.
As for loops - I think there will be one like this
This will catch reassociation (in case APs signal is lost) also. Try this one, but perform wl disassoc before it (hope this helps now).Code:while sleep 15s; do if ! $(wl assoc | grep -q BSSID); then wl join $(nvram get wl0_ssid); fi; done
