Choose WLAN Channel automatically

Discussion in 'Tomato Firmware' started by unggnu, May 10, 2009.

  1. unggnu

    unggnu Addicted to LI Member

    It would be great if Tomato could have an automatic WLAN channel finding option. Instead of choosing a static one Tomato checks which channel has no or the fewest concurrent aps in range and chooses this channel. From time to time the check should be automatically redone and the channel adapted if the situation has changed and no client is connected atm.
    There have to be an extra option for the country to use the 12-13 channel for consideration in Europe and 14 for japan.
    The Fritzbox has this feature and it is great. It prevents newbies from having all the same channel. But not only for them. The problem is that in an crowded area there are always new aps or they have changed the channel so you have to check it regularly which is annoying. It would be great if Tomato could do the job.

    Thanks and great job
  2. teddy_bear

    teddy_bear Network Guru Member

    The auto channel selection is included into the last build 25 of my USB mod. Of course, if you don't have USB on your router, you don't need the rest of it ;). But if you're using any other mod from this forum, you can ask the author to pick this change up.

    As for official Tomato, Jon is aware of the git repository and the changes and fixes we put there. Whether or not he's going to include any of them into the official Tomato is another question. I guess we'll see when version 24 comes out...
  3. unggnu

    unggnu Addicted to LI Member

  4. jnappert

    jnappert LI Guru Member

    The auto channel feature sounds very interesting - but will WDS-Links be killed, if one of the routers changes its channel or is it noticed by the others?
  5. Engineer

    Engineer Network Guru Member

  6. unggnu

    unggnu Addicted to LI Member

    Because only a trx file was available and afaik this is for Broadcom devices only.

  7. Engineer

    Engineer Network Guru Member

    The GL uses a Broadcom BCM5352 chipset. Based on the DD-WRT upgrade description, looks like a mini version (of DD-WRT) would need to be installed before it will take a regular version. Not sure if you would have to do this (i.e. install the mini version of DD-WRT first and then use that to install Tomato) or not. I do not know if Tomato supports this particular Broadcom chipset or not however.
  8. SgtPepperKSU

    SgtPepperKSU Network Guru Member

    The WRT54GL has 4 MB of flash, so it doesn't need any mini firmware versions. And, if you already have third-part firmware installed, it will accept a .trx just fine. In fact, the ND versions are recommended on the WRT54GL v1.1 (which only come in the .trx variety).

    The only difference between the different .bin and .trx files is header information that indicates what router it is intended for. The stock firmware checks this information and rejects builds that don't match, but most (all?) third-party firmware removes this restriction.
  9. unggnu

    unggnu Addicted to LI Member

    Thanks, I give it a shot. And thanks especially teddy_bear for the implementation.
    It seems to work but there aren't so much aps around atm so I couldn't make a real test.

    Does it check regularly if the situation has changed?
  10. fyellin

    fyellin LI Guru Member

    I asked this question already on the wrong thread. . . .

    Can this patch be used in any of the client modes to find the channel of the access point? On my laptop, I just set the SSID and it finds the channel. It would be nice if I could also do that on my wireless bridge.
  11. unggnu

    unggnu Addicted to LI Member

    I am not sure. I have only one external AP around on channel 1. It has a very low signal I guess because it takes time until my ap fine it. Anyway the auto function set it to six which is fine but after a short time it was on 1 which is bad and than on six again. I enabled wlan of my second ap and set the channel to six. After some time auto changes to 1 but the target would be 11/12/13 I guess. Maybe the problem is the low signal of the other ap but I still find it every time.

    Ok, now it uses 11. So maybe it takes some time but it seems to work.

    [Edit 2]
    Temporally it uses 1 again while there was two external aps using the same channel while clicking scan. After that it uses 14 (scanning) for some seconds and than changes back to six which overlaps with my other ap which has a strong signal.
    *14 is no option because it isn't allowed in Europe. I think there should be a locale option to prevent this.
    *If auto uses e.g. 11 and there is no concurrent channel user in range (7-11) it shouldn't change at all. A change should only be done if there are collisions and also a better solution.
  12. teddy_bear

    teddy_bear Network Guru Member

    It does wireless rescan and reselects the channel every 10 mins.
    I too noticed that if the other AP's signal is weak, it tends to ignore it.

    I don't know what it will do if used in client mode. I guess someone needs to try ;).
  13. occamsrazor

    occamsrazor Network Guru Member

    Forgive my ignorance, but if the router reselects a channel while a client is connected on WLAN... would that interrupt the client's connection (even if only for a short time)?
  14. fyellin

    fyellin LI Guru Member

    I can try this out tonight. Do I need to do anything to test this other than
    wl down
    wl channel 0
    wl up
    and see if my wireless client finds the Access Point?
  15. unggnu

    unggnu Addicted to LI Member

    It seems to work every time I check it.

    I couldn't test it in more crowded areas since I don't have physical access to router right now so it would be great if someone could test it with many aps around.

    If it works there too it would be an awesome feature for standard Tomato.
  16. unggnu

    unggnu Addicted to LI Member

    I am using the latest version (32) and the Firmware uses the Channel 1 while there are other APs using the channel 2 and 11. Shouldn't the wlan channel chooser use the channel 6 instead?
  17. unggnu

    unggnu Addicted to LI Member

    What is needed to get this feature into official Tomato? I mean so many standard router firmwares seem to have a similar feature and it really makes sense since most likely nobody wants to check regularly if another channel would be better.
    I suppose it is not uncommon to have several wlans around so it should help to speed up things or at least make the network more stable.
  18. Toastman

    Toastman Super Moderator Staff Member Member

    Hmmm. Look at it this way. One machine looks around and says, I'll move to channel 11. It's mate loses signal and looks around. It finds it's mate, connects, only to find it then jumps to channel 1. Or the client itself may decide to jump and leave the other one dangling. With both of them jumping around, the network is very unstable.

    Also, there is a big problem with auto channel selection anyway. If a router chooses to jump to channel 3, because it seems clearer, it will transmit across channels 1 and 6, thus causing them interference. Any wireless clients or routers on those channels 1 and 6 will not even be able to tell if the signal interfering with them are valid wifi signals - and will transmit over the top of you.

    If the router does not see any wifi on say channel 8, that doesn't mean that channel is free from interference. It just means the router did not decode any wifi on it. However, if could still suffer badly from interference from a local router on channel 6 or 11, which is too far off channel to be successfully decoded. Effectively, it is just seen as noise. Collision avoidance algorithms cannot work because the other signal has not been successfully decoded and identified as a wifi signal, so the router will not know it is supposed to wait until the others have finished before it sends.

    Do not forget that in USA and most other countries, you effectively have only three channels. 1 - 6 - 11 , and the ones in between are used by stations transmitting on those 3 channels. Using channels in between actually adds to the interference problem, and does not make it better.

    It's a mess. I would strongly advise setting the channel manually.
  19. unggnu

    unggnu Addicted to LI Member

    I don't see the problem.

    I don't know the the algorithm of this implementation but for instance the channel would only be changed if no one is connected which isn't so rare with a normal wlan. It also only changes at max every 10 minutes or something like that.

    Then it should be no problem to take the channel overlap in consideration or just only change between the channels 1, 6 and 11.

    With this everybody should be happy and the effort should be very low.
  20. Toastman

    Toastman Super Moderator Staff Member Member

    The channel selection doesn't select 1,6, or 11. It selects any channel. That is one of the problems.

    I tried it in a building with 28 AP's to see what would happen. Total chaos and complaints from everyone about slowdowns. Connections being broken and having to be re-established - downloads failing, Messenger dropouts. You have no control over what may happen - which is never a good idea.

    BTW - it seems to have a bias for setting channel 1.
  21. unggnu

    unggnu Addicted to LI Member

    Ok, then it has to be optimized but the idea is great.

    I mean who wants to check every week or so if another channel is better?

    If the channel is only changed if no one is connected and after 10 + random(0-5) minutes or something like that there should be no hassle.

    And no one prevents others to use channels like 2, 8 or similar.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice