OPNsense Forum

Archive => 17.1 Legacy Series => Topic started by: stormy on May 27, 2017, 12:45:35 pm

Title: WIFI disconnecting periodically - "Fix" is APPLY in GUI or ifconfig DOWN/UP
Post by: stormy on May 27, 2017, 12:45:35 pm
Hi there!!

I'm using 17.1.7, and configured a wifi adapter

Code: [Select]
ath0@pci0:4:0:0:        class=0x028000 card=0x2091168c chip=0x002e168c rev=0x01 hdr=0x00
    vendor     = 'Qualcomm Atheros'
    device     = 'AR9287 Wireless Network Adapter (PCI-Express)'
    class      = network

Set everything to DEFAULT in the gui, but, every few hours the connection drops, and on android clients getting:

Authentication problem.... and cannot log in.

The "fix", is very simple, I go to the OPN GUI, find the WIFI adapter, scroll to bottom of page, click SAVE.  Then on top APPLY changes, and INSTANTLY, connections are possible using that wifi adapter.

running clog wireless.log does not show anything out of the ordinary, lots of these, but i think this is normal:

Code: [Select]
May 27 09:53:39 OPNsense hostapd: ath0_wlan1: WPA rekeying GTK
May 27 09:58:39 OPNsense hostapd: ath0_wlan1: WPA rekeying GTK
May 27 10:03:39 OPNsense hostapd: ath0_wlan1: WPA rekeying GTK
May 27 10:08:39 OPNsense hostapd: ath0_wlan1: WPA rekeying GTK
May 27 10:13:35 OPNsense hostapd: ath0_wlan1: WPA GMK rekeyd
May 27 10:13:39 OPNsense hostapd: ath0_wlan1: WPA rekeying GTK
May 27 10:18:39 OPNsense hostapd: ath0_wlan1: WPA rekeying GTK
May 27 10:23:39 OPNsense hostapd: ath0_wlan1: WPA rekeying GTK
May 27 10:28:39 OPNsense hostapd: ath0_wlan1: WPA rekeying GTK

I have not yet been able to find/correlate the logs to when the connection initially drops.

What I did do is capture ifconfig BEFORE and AFTER the above APPLY in gui, and this is the difference:

Code: [Select]
# diff ifconfig-b4apply.lis ifconfig-afapply.lis
53,55c53,55
<       privacy MIXED deftxkey 3 AES-CCM 2:128-bit AES-CCM 3:128-bit
<       txpower 20 scanvalid 60 protmode OFF ampdulimit 64k ampdudensity 8
<       shortgi burst -apbridge dtimperiod 1 -dfs
---
>       privacy MIXED deftxkey 2 AES-CCM 2:128-bit txpower 20 scanvalid 60
>       protmode OFF ampdulimit 64k ampdudensity 8 shortgi burst -apbridge
>       dtimperiod 1 -dfs

So, some changes are visible, but not sure what to make of that...

Here is the relevant GUI wifi setup, I've hidden the password field with **** :)

Any tips/ideas are welcomed..

Stormy.


Title: Re: WIFI disconnecting periodically - "Fix" is simply APPLY in GUI
Post by: stormy on June 01, 2017, 12:14:19 pm
After few more days of monitoring, I'm still clueless, but , found a "simpler" workaround, and that is simply to:

ifconfig ath0_wlan1 DOWN, followed by UP, so, just bounce the wifi interface, and IMMEDIATELY all android/windows devices can connect to the wifi, before that they all get authentication failures.   the output of ifconfig before and after are identical this time around (not using the GUI apply method). 

I might add a cron job to do that each night :)

For completeness, here is the ifconfig/output:

Code: [Select]
Initial state, UP, wifi is not working:

root@OPNsense:/var/log # ifconfig ath0_wlan1
ath0_wlan1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 4c:0f:6e:22:17:96
        inet6 fe80::4e0f:6eff:fe22:1796%ath0_wlan1 prefixlen 64 scopeid 0x9
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng <hostap>
        status: running
        ssid STAR channel 2 (2417 MHz 11g ht/40+) bssid 4c:0f:6e:22:17:96
        regdomain 128 country 4007 indoor ecm authmode WPA2/802.11i
        privacy MIXED deftxkey 2 AES-CCM 2:128-bit AES-CCM 3:128-bit
        txpower 20 scanvalid 60 protmode OFF ampdulimit 64k ampdudensity 8
        shortgi burst -apbridge dtimperiod 1 -dfs
        groups: wlan
root@OPNsense:/var/log #
root@OPNsense:/var/log # ifconfig ath0_wlan1 down
root@OPNsense:/var/log # ifconfig ath0_wlan1
ath0_wlan1: flags=8902<BROADCAST,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 4c:0f:6e:22:17:96
        inet6 fe80::4e0f:6eff:fe22:1796%ath0_wlan1 prefixlen 64 tentative scopeid 0x9
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng <hostap>
        status: no carrier
        ssid STAR channel 2 (2417 MHz 11g ht/40+)
        regdomain 128 country 4007 indoor ecm authmode WPA2/802.11i
        privacy MIXED deftxkey 2 AES-CCM 2:128-bit AES-CCM 3:128-bit
        txpower 20 scanvalid 60 protmode OFF ampdulimit 64k ampdudensity 8
        shortgi burst -apbridge dtimperiod 1 -dfs
        groups: wlan

After this if UP then WIFI works again:

root@OPNsense:/var/log # ifconfig ath0_wlan1 up
root@OPNsense:/var/log # ifconfig ath0_wlan1
ath0_wlan1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 4c:0f:6e:22:17:96
        inet6 fe80::4e0f:6eff:fe22:1796%ath0_wlan1 prefixlen 64 scopeid 0x9
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng <hostap>
        status: running
        ssid STAR channel 2 (2417 MHz 11g ht/40+) bssid 4c:0f:6e:22:17:96
        regdomain 128 country 4007 indoor ecm authmode WPA2/802.11i
        privacy MIXED deftxkey 2 AES-CCM 2:128-bit AES-CCM 3:128-bit
        txpower 20 scanvalid 60 protmode OFF ampdulimit 64k ampdudensity 8
        shortgi burst -apbridge dtimperiod 1 -dfs
        groups: wlan