Wifi adapter shuts down from time to time

Thanks, Jim. Find enclosed the content of the files. I masked all stuff which I do not want to be publicly available. Let me know if you need something of that as well:

/etc/config/network:
====================

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'XXXXXXXXXXXXXX'

config interface 'lan'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option ipaddr 'XXXXXXXXXX'
        option netmask 'XXXXXXXXXX'
        option _orig_ifname 'eth1 wlan0 wlan1'
        option _orig_bridge 'true'
        option ifname 'eth1'
        option dns 'XXXXXXXXXX'
        option ip6assign '64'

config interface 'wan'
        option ifname 'eth0'
        option _orig_ifname 'eth0'
        option _orig_bridge 'false'
        option proto 'static'
        option ipaddr 'XXXXXXXXXX'
        option netmask 'XXXXXXXXXX'
        option gateway 'XXXXXXXXXX'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 2 3 4 5'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '1 6'

config route
        option interface 'lan'
        option target 'XXXXXXXXXX'
        option netmask 'XXXXXXXXXX'
        option gateway 'XXXXXXXXXX'

config interface 'guest'
        option _orig_ifname 'wlan1-1'
        option _orig_bridge 'false'
        option proto 'static'
        option ipaddr 'XXXXXXXXXX'
        option netmask 'XXXXXXXXXX'
        option ipv6 '1'

config route
        option interface 'lan'
        option target 'XXXXXXXXXX'
        option netmask 'XXXXXXXXXX'
        option gateway 'XXXXXXXXXX'

config interface 'henet'
        option proto '6in4'
        option peeraddr 'XXXXXXXXXX'
        option ip6addr 'XXXXXXXXXX'
        option tunnelid 'XXXXXXXXXX'
        option username 'XXXXXXXXXX'
        option password 'XXXXXXXXXX'
        option ip6prefix 'XXXXXXXXXX'


-----------

/etc/config/wireless:
====================

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'pci0000:01/0000:01:00.0'
        option bursting '1'
        option ff '1'
        option compression '1'
        option country 'DE'
        option txpower '14'
        option channel '36'
        option htmode 'HT20'

config wifi-iface
        option device 'radio0'
        option mode 'ap'
        option ssid 'XXXXXXXXXX'
        option encryption 'psk2'
        option key 'XXXXXXXXXX'
        option network 'lan'
        option disabled '1'

config wifi-device 'radio1'
        option type 'mac80211'
        option hwmode '11g'
        option path 'platform/qca955x_wmac'
        option htmode 'HT40'
        option bursting '1'
        option ff '1'
        option compression '1'
        option noscan '1'
        option channel 'auto'
        option country 'TW'
        option txpower '25'

config wifi-iface
        option device 'radio1'
        option mode 'ap'
        option ssid 'XXXXXXXXXX'
        option encryption 'psk2'
        option network 'lan'
        option key 'XXXXXXXXXX'
        option macfilter 'allow'
        list maclist 'XXXXXXXXXX'
        list maclist 'XXXXXXXXXX'
		list maclist 'XXXXXXXXXX'
        list maclist 'XXXXXXXXXX - and some more mac list lines ...'		

config wifi-iface
        option device 'radio1'
        option mode 'ap'
        option ssid 'XXXXXXXXXX'
        option network 'guest'
        option encryption 'psk-mixed'
        option key 'XXXXXXXXXX'
1 Like

2.4 Ghz -

Take channel selection off auto and use either channel 1, 6, or 11.

Set channel width to HT20.

Transmit power can be set up to 25.

5 Ghz -

Change the channel to one in the higher range that doesn't require DFS, In the US, I recommend starting at 153.

Set channel width to VHT80.

Transmit power can be set up to 30.

Both -

Set encryption to WPA2-PSK and AES.

I would also recommend Lizard Systems free WiFi Scanner to see what wireless traffic in your area looks like…

https://lizardsystems.com/wi-fi-scanner

1 Like

Hi Jim, thanks. I changed the config to the suggested values. Could you explain to me why you think these settings will make the Wifi interface more stable? Should mean, why would my former settings could have caused the interface to shutdown automatically?

In Germany/Europe 1, 5, 9, 13 actually allow one more undisturbed channel than the 1, 6, 11 combination recommended in the U.S., see https://en.wikipedia.org/wiki/List_of_WLAN_channels.

I agree that 40 MHz is pushing it on 2.4GHz (there is only room for two such 40Mhz broadcasters in the available 2.4 GHz spectrum, so unless you have no neighbors 40 MHz will probably be less robust than 20 MHz), even though I always assumed that the AP would degrade to 20 MHz channel given enough on-air competition.

This seems wrong, I would guess this should be DE as well

1 Like

Just to make sure: My issue is not an unstable Wifi connection. If the Wifi adapter is acive then all connections are stable and fast. However, from time to time (once a week or so), Wifi on the router shuts down completely. See the log entries in my first post. Then I need to re-enable the Wifi adapter on the router again.

Sat Feb 10 18:25:26 2018 kern.info kernel: [76971.958094] br-lan: port 2(wlan1) entered disabled state
Sat Feb 10 18:25:26 2018 daemon.notice netifd: Network device 'wlan1' link is down

Except when neighboring connections are using 1, 6, 11 which will cause issues for those using 1, 5, 9, 13.

I did read your initial post.

Try running with those settings and see if it helps.

Lots of info online about channel selection, channel width, and encryption.

One of the guides you might look at is on DD-WRT's wiki...

https://dd-wrt.com/wiki/index.php/QCA_wireless_settings

This seems to describe a similar problem. I have the same hardware:

However, I have no additional USB device active on the router. And I had never the issue with OpenWRT before.

Ok, will give it a try. If that does not help I will also disable SQM as I am unsure if the issue started to happen directly after upgrading to LEDE or 2 weeks later after I added SQM.

Another one reporting similar issue with that hardware, but the solution does not work for my settings as I do not have set "Distance Optimization":

1 Like

If you have set up SQM by following the guidelines in the LEDE User Guide, it should not be causing issues...

As you have seen, several things can cause similar issues.

You can set Distance Optimization in LuCI by clicking on Network > Wireless and click on a radio link at the top.

Then in Device Configuration, click on the Advanced Settings tab.

I personally have both radios set to 1350, but it depends on your maximum distance from the router.

Another thought...if you upgraded from an older version of OpenWrt and used the old configurations, that could also be a contributing factor.

In that case, I would reset LEDE to factory settings, and reconfigure from scratch.

1 Like

Many thanks. I will now try the following things:

  1. Wait, if the settings I made according the information above will already help
  2. If not, try to disable SQM, although we all do not think it might have something to do
  3. If nothing helps, reset LEDE to factor defaults and manually reconfigure all settings (this I will do only if really nothing else helps ;-))

I will give an update here, which things solved the issue. It will take some time to make sure it is solved, as the Wifi shutdown was not reproducable and not happening very often.

That sounds like a good plan.

If it comes to that, this OpenWrt wiki article will help make it much less painful...

https://wiki.openwrt.org/doc/howto/generic.sysupgrade

Did you manage to find a solution for your issue? I'm having the same problem with my TP-LINK and I'm going insane with this.

No, I did not. In the meantime I switched from OpenWrt to pfSense ... And switched my Wifi to Ubiquiti

I having the same issue as above (similar sys log with @m0urs 's c7) and done multiple of checking on the config for weeks. It just somehow wlan1: interface state ENABLED->DISABLED for no reason.

When I was going to give up on it last week, I push the 'On/Off' switch behind the C7 toward 'Off' (from 'On').

One week past and so far no interface state ENABLED->DISABLE

Note: It might not apply to you. Just to share

i have the same problem. how did you make this cron job that check every minute adapter?

1 Like

I have the same problem here.

I used my router about 2 years with no problems, but during last month after a restart, it starts the issues.

Anyone found anything to do?

Archer c7?