[PATCH v3 3/4] fff-web: Enable 5 GHz in wifiscan.html
Tim Niemeyer
tim at tn-x.org
Sa Jan 20 12:45:05 CET 2018
Am Samstag, den 20.01.2018, 12:34 +0100 schrieb
mail at adrianschmutzler.de:
> Hallo Tim,
>
> die radioX haben den Nachteil, dass wir nicht wissen, welches welches
> ist.
Das kann man ja wohl rausfinden.. :)
> Wenn das Gerät im sta-Modus ist, kommt eh keiner drauf.
Wieso denn nicht? Gibt es keine Kabel?
Tim
> Grüße
>
> Adrian
>
> > -----Original Message-----
> > From: Tim Niemeyer [mailto:tim at tn-x.org]
> > Sent: Samstag, 20. Januar 2018 12:31
> > To: Adrian Schmutzler <freifunk at adrianschmutzler.de>; franken-
> > dev at freifunk.net
> > Subject: Re: [PATCH v3 3/4] fff-web: Enable 5 GHz in wifiscan.html
> >
> > Am Sonntag, den 26.11.2017, 14:01 +0100 schrieb Adrian Schmutzler:
> > > This externalizes writing the table to a function and switches to
> > > wXap
> > > instead of wXmesh to support KeyXchangeV2 better.
> > >
> > > > Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> > >
> > > ---
> > >
> > > Introduced in v3.
> > > ---
> > > .../fff-web/files/www/ssl/cgi-bin/wifiscan.html | 52
> > > +++++++++++++++-------
> > > 1 file changed, 35 insertions(+), 17 deletions(-)
> > >
> > > diff --git
> > > a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/wifiscan.html
> > > b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/wifiscan.html
> > > index cc2c3b1..f9186d2 100755
> > > --- a/src/packages/fff/fff-web/files/www/ssl/cgi-
> > > bin/wifiscan.html
> > > +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-
> > > bin/wifiscan.html
> > > @@ -13,27 +13,45 @@ readIWinfo() {
> > > > "<!-- \\5 --
> > >
> > > <tr><'${ssid}'>\\2</'${ssid}'><td>\\4</td><td>\\5
> >
> > dBm</td><td>\\3</td><'${mac}'>\\1</'${mac}'><td>\\6</td></tr>",
> > "g");
> > print r;}' | sort -n | sed 's#&#\&#'
> > > > # The HTML comment contains the signal quality
> > > > to allow
> >
> > sorting
> > > }
> > > +printWifiScan() {
> > > > + local iface=$1
> > > > + local freq="2.4 GHz"
> > > > + if [ "$iface" = "w5ap" ] || [ "$iface" = "w5mesh" ] ;
> > > > then
> > > > + freq="5 GHz"
> > > > + fi
> > >
> > > %>
> > > -<table style="width: 100%">
> > > -<tr><td>
> > > -<fieldset>
> > > > - <legend>Wifi Scan</legend>
> > > > - <table class="wifitable">
> > > > - <tr>
> > > > - <th>Name</th>
> > > > - <th>Kanal</th>
> > > > - <th>Signal</th>
> > > > - <th>Typ</th>
> > > > - <th>MAC</th>
> > > > - <th>Encryption</th>
> > > > - </tr>
> > > > + <tr><td>
> > > > + <fieldset>
> > > > + <legend>Wifi Scan: <%= "$freq" %></legend>
> > > > + <table class="wifitable">
> > > > + <tr>
> > > > + <th>Name</th>
> > > > + <th>Kanal</th>
> > > > + <th>Signal</th>
> > > > + <th>Typ</th>
> > > > + <th>MAC</th>
> > > > + <th>Encryption</th>
> > > > + </tr>
> > >
> > > <%
> > > -readIWinfo "w2mesh" "td" "td"
> > > > + readIWinfo "$iface" "td" "td"
> > >
> > > +%>
> > > > + </table>
> > > > + </fieldset>
> > > > + </td></tr>
> > >
> > > +<%
> > > +}
> > > +
> > > +%>
> > > +<table style="width: 100%">
> > > +<%
> > > +if uci -q get wireless.w2ap > /dev/null ; then
> > > > + printWifiScan "w2ap"
> > >
> > > +fi
> > > +if uci -q get wireless.w5ap > /dev/null ; then
> > > > + printWifiScan "w5ap"
> > >
> > > +fi
> >
> > Besser phy0/1 dafür nehmen:
> >
> > Wenn der Eintrag da ist, dann gleich den Wert als Device zum
> > Scannen
> > nehmen: uci get wireless.radio0.phy
> >
> > Die Phy's haben den Vorteil, dass die auch gehen sollten, wenn wir
> > grad noch
> > im Station-Mode sind.
> >
> > Ansonsten schaut der Patch soweit gut aus.
> >
> > Tim
> >
> > > %>
> > > > - </table>
> > >
> > > -</fieldset>
> > > -</td></tr>
> > > </table>
> > >
> > > <%in /www/ssl/cgi-bin/footer %>
> > > --
> > > 2.7.4
> > >
>
>
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : signature.asc
Dateityp : application/pgp-signature
Dateigröße : 488 bytes
Beschreibung: This is a digitally signed message part
URL : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20180120/f85f0063/attachment.sig>
Mehr Informationen über die Mailingliste franken-dev