NOTE: this page is for archival only, see the note at the end of the page.

Automatic Channel Selection


Automatic Channel Selection algorithms and implementations are used to enable interfaces to automatically figure out which channel configuration to use for initiating communication, for any mode of operation which initiates radiation (AP, Mesh, IBSS, P2P).

There are different algorithms that can be used to finding an ideal channel. We currently only have one, described below.

Survey based algorithm

The survey based algorithm relies on the nl80211 survey API command to query the interface for channel active time, channel busy time, channel tx time and noise. The active time consists of the amount of time the radio has spent on the channel. The busy time consists of the amount of time the channel has spent on the channel but noticed the channel was busy and could not initiate communication if it wanted to. The tx time is the amount of time the channel has spent on the channel transmitting data. The survey algorithm relies on these values to build an interference factor to give a sense of how much interference was detected on the channel and then picks the channel with the lowest interference factor. The interference factor is defined as the ratio of the observed busy time over the time we spent on the channel, this value is then amplified by the noise based on the lowest and highest observed noise value on the same frequency. This corresponds to:

(busy time - tx time) / (active time - tx time) * 2^(noise + min_noise)

The coefficient of of 2 reflects the way power in "far-field" radiation decreases as the square of distance from the antenna [1]. What this does is it decreases the observed busy time ratio if the noise observed was low but increases it if the noise was high, proportionally to the way "far field" radiation changes over distance. Since the values obtained here can vary from fractional to millions the sane thing to do here is to use log2() to reflect the observed interference factor. log2() values less than 0 then represent fractional results, while > 1 values non-fractional results. The computation of the interference factor then becomes:

log2( (busy time - tx time) / (active time - tx time) * 2^(noise + min_noise))

--- or due to logarithm identities ---

log2(busy time - tx time) - log2(active time - tx time) + log2(2^(noise + min_noise))

This "interference factor" is purely subjective and ony time will tell how usable this is. By using the minimum noise floor we remove any possible issues due to card calibration. The computation of the interference factor then is dependent on what the card itself picks up as the minimum noise, not an actual real possible card noise value.

This is a static dump of the wiki, taken after locking it in January 2015. The new wiki is at
versions of this page: last, v13, v12, v11, v10, v9, v8, v7, v6, v5, v4, v3, v2, v1