fixed wifiscan for layer-3 firmware (#172) #173
|
@ -3,9 +3,17 @@
|
|||
<%in /www/include/header %>
|
||||
<table style="width: 100%">
|
||||
<tr><td>
|
||||
<fieldset>
|
||||
<legend>Wifi Scan</legend>
|
||||
<table class="wifitable">
|
||||
<%
|
||||
htmloutput=0
|
||||
devs=$(iw dev | sed -n '/^phy/,/Interface/{s/^.*Interface //p}')
|
||||
for dev in $devs
|
||||
|
||||
do
|
||||
scanresult="$(iw dev $dev scan)"
|
||||
if [ $? -ne 0 ]; then continue; fi
|
||||
%>
|
||||
<fieldset class="wifitable">
|
||||
<legend>Wifi Scan: <% echo -n $dev %></legend>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Frequenz</th>
|
||||
|
@ -14,12 +22,19 @@
|
|||
</tr>
|
||||
|
||||
<%
|
||||
iw dev w2mesh scan | sed 's/^BSS/\nBSS/g' |\
|
||||
awk -v RS='' '{r = gensub(/.*BSS ([0-9a-f:]*)?.*freq: ([0-9]*).*signal: (-[0-9]*\.[0-9]*) dBm.*SSID: ([^\n]*).*/, "<!-- \\3 --><tr><td>\\4</td><td>\\2 MHz</td><td>\\3 dBm</td><td>\\1</td></tr>", "g"); print r;}' | sort -n | sed 's#&#\&#'
|
||||
# The HTML comment contains the signal quality to allow sorting
|
||||
echo "$scanresult" | sed 's/^BSS/\nBSS/g' |\
|
||||
awk -v RS='' '{r = gensub(/.*BSS ([0-9a-f:]*)?.*freq: ([0-9]*).*signal: (-[0-9]*\.[0-9]*) dBm.*SSID: ([^\n]*).*/, "<!-- \\3 --><tr><td>\\4</td><td>\\2 MHz</td><td>\\3 dBm</td><td>\\1</td></tr>", "g"); print r;}' | sort -n | sed 's#&#\&#'
|
||||
# The HTML comment contains the signal quality to allow sorting
|
||||
htmloutput=1
|
||||
%>
|
||||
</table>
|
||||
</fieldset>
|
||||
<%
|
||||
done
|
||||
if [ ${htmloutput} -eq 0 ]; then
|
||||
echo "No wireless interface available that supports scan."
|
||||
fi
|
||||
%>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -146,6 +146,10 @@ fieldset th {
|
|||
vertical-align: top;
|
||||
}
|
||||
|
||||
fieldset.wifitable:not(:last-child) {
|
||||
margin-bottom: 1.5em !important;
|
||||
}
|
||||
|
||||
.wifitable th {
|
||||
text-align: center;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Ich hab es jetzt nicht getestet. Aber hier können doch richtig viele Devices vorhanden sein. Bei der node sind es schon mal 3 pro radio. Ich hatte mir auch schon mehrere auf der l3 für verschiedene Netze konfiguriert.
Da sollte man sicherstellen, dass pro radio nur ein scan läuft.
Robert
Kommt hier noch was?
Mein Vorschlag waere pro phy ein dev ausschneiden und scannen:
Waere schon schoen, wenn das im webui wieder funktionieren wuerde.
Hallo Robert,
ich habe deinen Vorschlag auf meinem TL-WDR4900 v1 getestet und mit dem Commit
47e9c390b0
hinzugefügt.Ist das nun so in Ordnung oder sollen noch weitere Code-Teile überarbeitet werden?