mcdudeabides wrote:
> Hello Steen. It was interesting in trying to troubleshoot. It seems
> that the field separator rules work differently in x86 versus ARM
> environments (or at least that was one difference I could see right off
> the start). I should always test in the RPi environment to make sure
> before throwing something out there. I had to pick a character that
> would allow for the explicit delimiting of the return string from AWK.
> I chose the "+" sign. It could be most any other character if you think
> there is a risk for SSID and password to contain "+".
>
> I was able to quickly test with your default wifi.db (contains the
> Steens\ 2.4GHz parm) and verify that it would work for the config.cfg
> file translation. I have to make another appointment now, but tomorrow
> I should be able to bring up another AP and exercise with "spaced out"
> SSIDs. In the mean time, take a look at this and try it in your
> environment.
> >
Code:
--------------------
> > #!/bin/sh
>
> alias awk="busybox awk"
> IFS=+
> CONFIG=/usr/local/sbin/config.cfg
>
> read TCUSER < /etc/sysconfig/tcuser
> DB=/home/"$TCUSER"/wifi.db
>
> set -- $(echo "" | awk -v dbfile="$DB" '
> BEGIN {
> getline dbitem < dbfile
> split(dbitem,field,"\t")
> ssid = field[1]
> passwd = field[2]
> enc = field[3]
> close(dbfile)
> }
> END {
> print( "\"" ssid "\"" "+" "\"" passwd "\"" "+" "\"" enc "\"" )
>
> } ' )
>
> sudo sed -i "s/\(SSID *=*\).*/\1$1/" $CONFIG
> sudo sed -i "s/\(PASSWORD *=*\).*/\1$2/" $CONFIG
> sudo sed -i "s/\(ENCRYPTION *=*\).*/\1$3/" $CONFIG
>
--------------------
> >
Thank you for working on this. Very kind of you to take the time.
I will give this a try tonight. My short term solution has been to
un-hide the 2.4ghz network and keep the 5ghz network hidden (I have an
Asus NT66u and it creates two networks that are connected) and the
Edimax connects just fine to the 2.4 network.
------------------------------------------------------------------------
notben's Profile: http://forums.slimdevices.com/member.php?userid=62777
View this thread: http://forums.slimdevices.com/showthread.php?t=97803
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix