Initial automatic channel selection implementation

Luis R. Rodriguez mcgrof at gmail.com
Wed May 25 10:37:31 EDT 2011


On Wed, May 25, 2011 at 5:19 AM, Helmut Schaa
<helmut.schaa at googlemail.com> wrote:
> On Wed, May 25, 2011 at 12:54 AM, Luis R. Rodriguez <mcgrof at gmail.com> wrote:
>> Yes, thanks this is a lot of work already done. Now we just need a
>> basic algorithm to parse this, quantify how ideal this channel is and
>> then spit out a desired optimal channel.
>
> That's what I've hacked some time ago (in form of the attached _ugly_ shell
> script that does auto channel selection with rt2x00, not sure if it works
> correct with other drivers as the survey dump differs somehow between
> rt2x00, ath5k and ath9k, and it only does channel 1-11):
>
> - Iterate over all channels and stay on each channel for some time

Nice, yeah I was thinking of using the offchannel operation if we want
to spend more time there for inspection and if associated. For first
iteration it should be possible to just move around. In fact for AP
purposes I suppose one will want to just start AP mode ASAP and then
later do offchannel operations to do the inspection on the ideal
channel. Otherwise we sit there idle until we complete the Automatic
Channel Selection thingy.

> - Store busy time stats for each channel
> - Choose the channel with the lowest busy time (and on 2.4Ghz also
>  check the busy times on adjacent channels)

So I was reviewing this -- if we are TX'ing or RX'ing it seems to me
we should skip that time from the busy time, otherwise the "busy" time
includes time we induced on TX'ing or RX'ing ourselves. So I was
thinking of using the:

  (active time - rx time - tx time)  / busy time

as a factor for impact on the given frequency. Then somehow we just
need to add to this the channel noise.

> Btw. is the idea to get the auto channel selection into hostapd/supplicant
> or in a new userspace tool?

Yup.

  Luis


More information about the HostAP mailing list