Initial automatic channel selection implementation

Luis R. Rodriguez mcgrof
Thu Jun 2 15:36:02 PDT 2011

On Thu, May 26, 2011 at 5:59 PM, Luis R. Rodriguez <mcgrof at> wrote:
> ?What I'd like to do is to affect the ratio to nullify it if the noise
> ?is very low on the channel. Given that noise is logarithmic we'd have
> ?to use a logarithmic function as well. Working on that now.

OK I've figured a way to plug the noise into this, I designed the
following function we can use as a factor:


Wolfram|Alpha boring details of this function:

x,y results of different noise values in dBm, using apcalc:

mcgrof at tux ~ $ calc
C-style arbitrary precision calculator (version
Calc is open software. For license details type:  help copyright
[Type "exit" to exit, or "help" for help.]

; define f(x) = 1.1^(x+110)
f(x) defined

; f(-130)
; f(-120)
; f(-119)
; f(-118)
; f(-117)
; f(-116)
; f(-115)
; f(-114)
; f(-113)
; f(-112)
; f(-111)
; f(-110)
; f(-109)
; f(-108)
; f(-107)

So then, we'd use a frequency for initiating beaconing (AP, Mesh, P2P)
which uses the lowest value from the following computation:

(busy time - tx time) / (active time - tx time) * 1.1^(noise + 110)

The 1.1 factor can be modified more accurately to represent the
exponential factor of how noise should affect interference decisions,
the 110 value here can be modified for any other arbitrary value we
find as representative of a regular noise value from a simple AP on
the frequency we are observing, my assumption here was -110 dBm.

If I don't hear yells I'll implement this algorithm, but first I want
to add APIs to let us query for survey data for specific frequencies,
the current stuff assumes the dump data will be useful within the time
period we get it, but the way I'm thinking of doing it is to do each
frequency analysis atomically -- change channel / do offchannel
operation on a frequency, and then get the survey data for that
frequency and compute the above. Then choose the frequency with the
lowest value. This would allow us to do work without regards to any
possible stale data. We could also later add a history of these values
and compute an average and keep picking the best one. Anyway, that's
that. Let me know what you think.


More information about the Hostap mailing list