I am using the MM6108 in Mesh mode. I notice good throughput on some channels, but very poor throughput on others. I suspect this may be due to RF or non-RF interference in the environment.
I am looking for parameters or commands that can indicate the current operating channel occupancy. I tried survey dump, but the results do not seem consistent or reliable. I also came across edconfig in morsectrl, but I couldn’t find any useful documentation or guidance on it.
edconfig <target> <command>
sets the current mode for DCF energy detection
<target> - 'energy' or 'noise' - Change the setting for energy detect threshold or noise estimate
<command> -
automatic - default, chip will automatically select energy dection threshold or noise estimate
static [dbm/linear] <threshold> - set a static energy dection threshold or noise estimate (in integer dBm or linear)
ignore - tell the chip to ignore non-wlan energy completely(only valid for 'energy' target)
jammer - tell the chip to ignore non-wlan energy if in-channel jammer is detected(only valid for 'energy' target)
Could you please provide some details on edconfig? Also, is there any other recommended way to determine current channel quality or occupancy?
edconfig is a command for configuring energy detection thresholds and behaviour. Its primary purpose is for testing during manufacture and I wouldn’t recommend adjusting this configuration in normal operation. It also won’t return anything about the channel quality.
An iw survey dump requires a scan to have been carried out prior to showing anything useful. Doing an active scan on a mesh network may not be ideal. That being said, in mesh mode the survey dump isn’t returning anything at all! I’m investigating this with the team. Also, it’s worth noting that our chip doesn’t report a “channel busy time” like you may expect to measure occupancy. Just active and receive times in surveys.
iwinfo as used in OpenWrt (iwinfo wlan0 info) calculates “link quality” as the average rssi from each connected device. For an AP, the connected devices will be all associated stations. For a station the connected device will be the AP. For mesh nodes, it will be directly reachable mesh nodes.
This gives a quality measurement out of a maximum of 70. This is all queried directly with NL80211_CMD_GET_STATION. I’m of the opinion that this is a fairly crude measurement of “quality” and requires connected devices - so perhaps not what you are looking for.
Instead, you probably want to consider assessing channel quality some of the statistics directly related to the radio. You could look at the output of morse_cli -i wlan0 stats. A few stats in particular will be of value:
Noise (dBm) is a Noise value measured per packet. ie more frequently than what is reported in iw dev wlan0 survey dump.
grep the stats output for DCF. This will show you stats like the following
DCF STF fired : 2509279
DCF LTF fired : 44
DCF energy detect fired : 16085517
DCF aborted : 19163155
DCF granted : 3246602
DCF medium busy before TX : 1801
DCF phy blocked before TX : 0
DCF medium went busy after go : 35
DCF medium went busy during start : 145923
DCF time in past : 0
These stats will tell you how often the transmitter successfully accessed the medium (STF fired, LTF fired, granted) and conditions which caused the transmitter to abort/backoff (energy detect fired - another transmission in the medium, aborted - before sending,
There’s also some Narrowband interference statistics which might be useful.