WiFi hotspot keeps dropping
Adrian Chadd
adrian.chadd at gmail.com
Fri Jun 19 16:14:00 UTC 2020
On Thu, 18 Jun 2020 at 16:37, D'Arcy Cain <darcy at druid.net> wrote:
> I have set up my FreeBSD box as a gateway. It used to work fine but
> suddenly my hotspot keeps failing. It drops a few times a day.
> Restarting hostapd gets it back up again but I really want to keep it
> up. I am running FreeBSD 12.1-RELEASE-p1 GENERIC amd64. My WiFi card is:
>
> ath0 at pci0:1:0:0: class=0x028000 card=0x30a4168c chip=0x002e168c
> rev=0x01 hdr=0x00
> vendor = 'Qualcomm Atheros'
> device = 'AR9287 Wireless Network Adapter (PCI-Express)'
> class = network
>
Ah! AR9287! My favourite 2G only 11n NIC!
>
> It is a HP running Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz on 2 quads
> and 16GB of memory.
>
> From my rc.conf:
>
> # Internal wifi network
> wlans_ath0=wlan0
> create_args_wlan0="wlanmode hostap"
> ifconfig_wlan0="inet 192.168.225.1 netmask 0xffffff00 ssid druid"
> hostapd_enable=YES
> DHCPD_INTERFACES="$DHCPD_INTERFACES wlan0"
>
> If I can't keep it running can someone suggest a system test I can do to
> decide that hostapd needs to be restarted?
>
So, you shouldn't need to restart hostapd after a stuck beacon. It should
recover.
>
> One thing I found was lots of log entries like this:
>
> ath0: stuck beacon; resetting (bmiss count 4)
>
So there's plenty of reasons for a stuck beacon. I've mostly fixed the
programming problems and now it's typically really busy air.
> From reading up on that it seems that it is just a cosmetic warning.
> Could this be an indication of something that is killing the hotspot?
>
It's possible but it shouldn't be killing the interface.
What you could try is forcing a full reset every time the NIC needs to
reset.
sysctl dev.ath.0.hal.force_full_reset=1
See if that helps.
I can go whack an AR9287 into a laptop and set it up as a 2G hotspot.
What I suggest you do is recompile your kernel/modules with the following
options:
IEEE80211_DEBUG
ATH_DEBUG
AH_DEBUG
ATH_DIAGAPI
Then you'll get access to a lot more debugging tools (ie, the stuff in
tools/tools/ath/) which we can use to diagnose what's going on.
-adrian
More information about the freebsd-net
mailing list