Opened 3 years ago

Last modified 21 months ago

#20114 new enhancement

RFE: Obey wifi channel settings

Reported by: valentt Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: Cc:


OpenWrt in repeater mode has one know issue; if STA (wifi client) interface looses connection to upstream AP then both wifi interfaces on OpenWrt router go down.

Most of you probably experienced this issue. Why does this happen?

I have tracked down this issue and communicated with OpenWrt developers regarding this issue.

It seams that currently OpenWrt stack ignores channel settings in wireless config file (for example option channel '1') if STA mode is also enabled. It just searches for AP by it's SSID and uses which ever channel upstream AP is set to.

To confirm this I changed channel in OpenWrt settings from "1" to "2" and OpenWrt device would still connected to upstream AP which is using channel 1.

Benefit of how currently OpenWrt works is that if for any reason upstream AP changes channel then OpenWrt station will follow it to new channel. Upstream channel could be changed manually or automatically if upstream AP has "auto channel" option enabled.

But what happens if upstream AP goes out of range and drops connection? Then AP interface on OpenWrt device also goes down. This happens because channel setting is not being read from config file but from upstream AP channel. And if there is no link to upstream AP then the AP interface is also missing information which channel it should use and it goes down.

But if you use OpenWrt devices in repeater mode then you would expect that AP inteface is always up and available. Other wifi vendors who offer similar repeater functionality don't have this issue and keep local AP interface always up and runnung.

What would be a solution to this issue?

Maybe an config option that says "obey wifi channel settings" so that both station and AP channel is set OpenWrt config file and not from upstream AP.

Other solution would be to have channel in wireless config as fallback, so it doesn't go down when STA interface goes down.

Third option is to use last know wifi channel that upstream AP so that local AP interface doensn't go down.

Any other suggestion?

Currenty there is a workaround for this issue - this script [1] which checks via ubus if STA interface, if it is not connected then it enables AP interface only. Script is quite badly written and if needed I'll rewrite it.


Attachments (0)

Change History (8)

comment:1 Changed 3 years ago by valentt

This is how typical wifi repeater config looks like:

config wifi-device  radio0
        option type     mac80211
        option channel  10
        option hwmode   11g
        option path     'platform/ar933x_wmac'
        option htmode   HT20
        option disabled 0

config wifi-iface
        option device   radio0
        option network  wwan
        option mode     sta
        option ssid     UpstreamAP
        option encryption psk2+ccmp
        option key      password1

config wifi-iface
        option device   radio0
        option network  lan
        option mode     ap
        option ssid     LocalAP
        option encryption psk2+ccmp
        option key      password2

comment:2 Changed 3 years ago by valentt

There is one nice thing in latest Chaos Chalmer, and that is that you can have disable specific wifi interface.

So if STA looses connection I could write hotplug script that would disable it and then restart wifi. I tested this manually on CC and it works. This was I only have AP running, but I can still access the device remotely over wifi.

comment:3 Changed 3 years ago by anonymous

I think this is not a issue, if the router looses upstream connection why have a ap without internet/connection ?

comment:4 Changed 3 years ago by valentt

@Anonymous just one example - with local wifi network running clients that are connected on AP still are able to communicate between them selves. Of if you have a local wifi printer you can print to that printer.

Also to access the device itself over wifi if some config changes are needed.

Good enough for you? :)

Last edited 3 years ago by valentt (previous) (diff)

comment:5 Changed 3 years ago by anonymous

@vallentt i understand, in that case u should not use repeater modes, cable is a must for this case, or use 2 ap, one sta conected do upstream and other as ap with all yours services running.

comment:6 Changed 3 years ago by valentt

@anonymous when I have cable I use it. When I have two router I use them.

In some situations you have only one router and you make best use of what you have. In most situations buying two routers is overkill. For some situations it is a mush have, it depends on situation.

comment:7 Changed 2 years ago by anonymous

Is this bug stil present?

comment:8 Changed 21 months ago by anonymous


Add Comment

Modify Ticket

as new .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.