Commit graph

19 commits

Author SHA1 Message Date
Paul Donald
8b651996ff
Merge pull request #6723 from knarrff/channel_analysis__base-channel
luci-mod-status: highlight primary 20 MHz channel
2023-12-18 00:21:01 +01:00
Frank Löffler
008c1cf356
luci-mod-status: channel_analysis: use svg grad
Instead of using a second, semitransparent quadliteral of the
same station color to highlight the main 20 MHz channel of a
station with a bandwidht wider than 20 MHz, use a semitransparent,
black svg gradient with the same shape and size.
This has the benefit that it is harder to mistake for a second,
overlain station.

The gradient is black because this way it can be reused for
all stations, instead of having to create a separate one for
each station color.

Signed-off-by: Frank Löffler <frank.loeffler@uni-jena.de>
2023-12-10 22:54:02 +01:00
Frank Löffler
aa06da6aa6
luci-mod-status: channel_analysis: correct VHT 20/40 MHz center channels (#6728)
* luci-mod-status: add missing vht40 channels

As of now, channel_analysis is missing 40 MHz VHT channels. 
What it does for those right now is
display them as 20 MHz channels (both in the plot and the table below),
but it uses the center frequency of the 40 MHz channel, which means
their (wrong) 20 MHz band in the plot is offset by 2.

This fixes #6419. Note that this only occurs for **other** stations.
The code for local_wifi is different and already complete.

Signed-off-by: Frank Löffler <frank.loeffler@uni-jena.de>
2023-12-07 14:33:28 +01:00
Frank Löffler
66a00ed8e4
luci-mod-status: highlight primary 20 MHz channel
As of now, channel analysis highlights the complete frequency spectrum of a base station (all channels used by the station, which might be more or fewer depending on channel bonding). This means in particular, that in the plot, a station at one main channel might look identical to another station at a different channel, because both might use the same bonded channel spectrum.

One such example is two 80 MHz stations on channels 100 and 108 respectively: both will be plotted from channel 100 up to 115, as both will use those those 80 MHz. This is not incorrect, but it makes it more difficult to see which station is really where, as they might as well switch back to 20 or 40 MHz at times, or for different clients, and where they are then is currently not visible in the plot.

This patch adds another trapez to the plot at the main 20 MHz channel of a station, with width 20 MHz, in case the station uses a wider general width. This is visible, because those polygons are partially transparent. It also moves the x-position of the label to the main channel of the station (which now is marked: this would have looked odd before).

This does not highlight the primary 40 MHz channel for 80 MHz channels and wider. It should be possible be compute this from the knowledge in luci of the primary 20 MHz channel, the center channel and the bandwidth, assuming ac logic, but I decided against adding it, to keep the plot less cluttered.

Signed-off-by: Frank Löffler <frank.loeffler@uni-jena.de>
2023-11-27 08:19:55 +01:00
Andre Heider
318ef4c83f luci-mod-status: add support for the 6g band
Enable support for the 6GHz band now that the code supports it. For that it
just needs to be added to the "bands" object.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-09-18 13:40:34 +02:00
Andre Heider
31d7943bcd luci-mod-status: only add infos if the band matches
This prevents adding entries to mismatching bands when a channel
number exists on more than one band.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-09-18 13:40:34 +02:00
Andre Heider
9f8a553d19 luci-mod-status: reuse the already provided band info
iwinfo already provides the band information with every channel, so just
use that instead.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-09-18 13:40:34 +02:00
Jo-Philipp Wich
0ea74956c9
Merge pull request #6490 from Ansuel/improve-chan-grap 2023-08-03 17:09:36 +02:00
Christian Marangi
69a8e4a98d luci-mod-status: improve channel graph for 5GHz radio
Improve channel graph for 5GHz radio by using dotted lines to identify
the intermediate channel, full line to identify the different channel
band and bold line to identify the different section of the wifi
channels.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-07-30 23:09:59 +02:00
Christian Marangi
6d722ccdae luci-mod-status: fix wrong position of channel for 5GHz radio
Channel tag for 5GHz radios is wrong and is confusing for any user
that wants to better identify the used channel from the graph.

Add some additional logic to better position the channel tag.

Fixes: #6419
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-07-30 23:09:59 +02:00
Milad Mohtashamirad
03f1684059 luci-mod-status: channel_analysis.js: fix stale scan result.
When the new result is empty, including when another scan is running in the background, the table was emptied, but the graph persisted.
With this change, the list will persist and missing APs will be shown faded.

Signed-off-by: Milad Mohtashamirad <miladmohtashamirad@gmail.com>
2023-07-07 11:14:28 +10:00
Christian Marangi
307e385ba1
luci-mod-status: handle HE channel width for channel_analysis
Handle HE channel width for channel analysis status page and correctly
draw local interface band width.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-12-23 19:28:07 +01:00
Christian Marangi
54f5b171bc
luci-mod-status: fix channel_analysis ReferenceError: diff is not defined
In refactoring the code there was an error and the sort function wasn't
correctly reworked with diff not correctly dropped.

Drop that and correctly sort the WiFi ap if the channel is different.

Fixes: 75dcb09754 ("luci-mod-status: improve channel_analysis page")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-12-23 19:19:26 +01:00
Ansuel Smith
75dcb09754 luci-mod-status: improve channel_analysis page
Many user complained problem with using pool with wifi scan. This comes
from the limitation that some wifi driver have problems with scanning
nearby wifi and keeping traffic.

Fix this by doing the wifi scan only one time on page load and provide a
button to refresh the channels manually. The original implementation is
preserved as the user can simply reenable the poll referesh from the ui.

While at it also sort the table by channel instead of by signal quality
to better track the most used channels in the table.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[rewrap commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-12-13 23:30:53 +01:00
Florian Eckert
8f8ce8613f luci-mod-status: switch to html table for wlan channel analysis
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-06-21 12:18:25 +02:00
Wojciech Jowsa
ead64c0195 luci-mod-status: check if center_chan1 is defined
Signed-off-by: Wojciech Jowsa <wojciech.jowsa@gmail.com>
2021-05-05 16:01:01 +02:00
Giovanni Giacobbi
af422b1924 treewide: removed trailing whitespaces and extra newlines in 'modules'
Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
2021-01-20 17:48:16 +02:00
Ansuel Smith
ea4119f25c luci-mod-status: fix bugs in channel analysis
- Add check for missing ht_operation data
- Add support for radio that both support 5 and 2.4 band
- Hide wireless station that doesn't belong to the graph band

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-01-11 23:01:06 +02:00
Ansuel Smith
91a0008457
luci-mod-status: add channel analysis support
Add channel analysis support. This can be very useful as a user can directly use the webui to check wifi channel utilization without using external tool. This use data already provided by iwinfo.

Fixes: #4572
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-12-06 02:24:05 +01:00