-->
Page 1 of 2

optimise wifi channel for softap

PostPosted: Thu Jun 25, 2020 8:31 am
by ian
I'm working on a project which uses softap exclusively. In use my ESP8266 talks to a mobile phone. Neither has network access in the application.

I had this working nicely at home but it fell over badly when I tried it at a friends place.

We realised that this was a congestion issue, softap defaults to wifi channel 6 which was very congested at his site. This was verified using a wifi analyser app.

I configured the softap to use channel 13 which looked much less crowded and it worked just fine in both locations.

Clearly, a 'site survey' isn't always practical & channel 13 isn't guaranteed to be good everywhere!

What I'd like to do is automate this.

I can perform a network scan with ESP8266 & see what's happening locally, but it doesn't seem entirely trivial determining an optimal channel from this. Unless I'm missing something which is always possible :)

Anyone else faced this issue? Bright ideas?

Cheers

Ian

Re: optimise wifi channel for softap

PostPosted: Thu Jun 25, 2020 10:09 am
by schufti
that is the same problem for wifi-routers.
just do several scans and add up (logarithmic) the received power levels per channel on each scan, average the results and choose the one with lowest interfering power.

p.s.: unfortunately this does only sum up the power of base stations, not of - maybe closer located - multiple clients.

Re: optimise wifi channel for softap

PostPosted: Thu Jun 25, 2020 1:48 pm
by quackmore
here are a couple of reference on how wifi works:

How WiFi Works

Why Channels 1, 6 and 11?

according to the readings, I'd try this:

1) stick to channels 1, 6, 11
2) choose the best channel according to:
2-a) the channel with less APs count on the closest 3 channels (on the right and on the left)
2-b) the channel with less APs on the same channel

the situation is not static, as wifi routers do something similar, so you may want to periodically check it and adapt

Re: optimise wifi channel for softap

PostPosted: Sun Jun 28, 2020 7:47 am
by ian
schufti wrote:that is the same problem for wifi-routers.
just do several scans and add up (logarithmic) the received power levels per channel on each scan, average the results and choose the one with lowest interfering power.

p.s.: unfortunately this does only sum up the power of base stations, not of - maybe closer located - multiple clients.


As I said, it isn't entirely trivial to implement. Maybe I'll wait for the next pandemic lockdown ;)