Since I was not able to figure how to configure openwrt-packages-yun/wifi-live-or-reset at master · arduino/openwrt-packages-yun · GitHub to have the configuration I want - meaning AP with my custom password and SSID because whatever I did it always went to rename-wifi-if-access-point, meaning this file
openwrt-packages-yun/rename-wifi-if-access-point at master · arduino/openwrt-packages-yun · GitHub
I decided to apply brute force, where is no brain you need just muscles
so I modified it . The downside is that I have to wait for the live or reset first to decide that it needs to rename the wifi because is AP, the good side is that having no brains I can get a bigger hammer and cut the timer to 0 in that file (instead of 60) so I waste no time ]![]()
#!/bin/sh /etc/rc.common
START=18
start() {
MODE=`/sbin/uci get wireless.@wifi-iface[0].mode`
SSID=`/sbin/uci get wireless.@wifi-iface[0].ssid`
if [ "$MODE" == "ap" -a "$SSID" == "Arduino" ]
then
#SSID_SUFFIX=`/sbin/ifconfig wlan0 | /usr/bin/head -n 1 | /bin/grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | /bin/sed 's/://g'`
#SSID="Arduino Yun-$SSID_SUFFIX"
#/sbin/uci "set" "wireless.@wifi-iface[0].ssid=$SSID"
/sbin/uci "set" "wireless.@wifi-iface[0].ssid=mySSID"
/sbin/uci "set" "wireless.@wifi-iface[0].encryption=psk-mixed"
/sbin/uci "set" "wireless.@wifi-iface[0].key=mykey"
/sbin/uci "set" "wireless.@wifi-iface[0].network=lan wan"
/sbin/uci "set" "wireless.radio0.channel=11"
/sbin/uci "set" "wireless.radio0.country=DE"
/sbin/uci commit wireless
logger -t rename "WiFi renamed $SSID"
fi
}
if someone knows a better way, please let me know, if not, maybe someone can have a use for this.