hostapd repeating "deauthenticated due to local deauth request"
Asked Answered
M

4

25

I have recently setup my Raspberry Pi to operate as an AP/router for my home network. Using many tutorials online, I finally succeeded but have been encountering a serious problem: hostapd repeatedly announces "deauthenticated due to local deauth request" in /var/log/syslog.

This repeating error regularly kicks clients off the AP, making it useless. The RPi still seems to have an internet connection; the problem only affects the local network.

I have looked into this problem at length online, and no one seems to have a good answer. Some possibilities include an improper wifi dongle driver or wifi chipset, which I have not yet tried to change due to my lack of knowing how to do so (I'm relatively new to this!). Signal strength should not be an issue (my RPi is right next to my computer).

I would appreciate any thoughts you all may have. Please let me know if you need more details.

Mell answered 6/1, 2016 at 23:52 Comment(1)
You should triple check your passphrase. I had added unnecessary quotes around my passphrase inside hostapd's configuration file which of course was making me entering an incorrect passphrase.Indonesian
G
5

Answering the question I put a bounty on... for me it turned out to be a lack of entropy, cat /proc/sys/kernel/random/entropy_avail gave 156 while it should be >2000. Installing haveged (apt-get install haveged) solved the issue for me, entropy always >2k, and link has been up and running for a full day now.

edit: it would be nice for downvoters to comment why this is a bad answer.

Griffy answered 3/7, 2016 at 18:50 Comment(3)
Well, I just did that and it's still not working for meNobleminded
@WayneWerner what is your entropy availability?Ironstone
Because Raspberry Pi has a True Random Number Generator in hardware you should sudo apt install rng-tools instead of haveged. rng-tools supports the hardware TRNG.Standpipe
B
2

Same here! Looking a little bit deeper showed that in my configuration the key exchange seems to be a problem: setting wpa_group_rekey=10 in hostapd.conf increases probability of the deauth requests. Also channel selection influences probability.

So my current solution are the following entries in hostapd.conf:

ap_max_inactivity=1800
skip_inactivity_poll=1
disassoc_low_ack=0

wpa_group_rekey=3600
channel=acs_survey
acs_num_scans=5

My configuration is as follows:

  • raspbian testing
  • kernel 4.1.15
  • hostapd 2.3
  • WLAN Ralink RT5370

This is actually a hack, because it just reduces probability.

On the other hand it allows to increase likelihood of the problem to investigate further ;-)

Bramante answered 13/1, 2016 at 21:15 Comment(0)
N
0

I had encountered the same issue of "hostapd repeatedly announces deauthenticated" around 15 seconds after connecting by a Wi-Fi STA, when I configured my Raspberry Pi zero w as the Routed Wireless Access Point according to this page.

My solution was the below.

I created the file /etc/network/interfaces.d/00_wifi0.conf as the below.

allow-hotplug wlan0
iface wlan0 inet static
    address xxx.yyy.zzz.1
    netmask 255.255.255.0
    network xxx.yyy.zzz.0
    broadcast xxx.yyy.zzz.255
    post-up /sbin/iw dev wlan0 set power_save off

And, sudo reboot.

You may check if this configuration works or not with the command iwconfig, and see if Power Management: is on or off. If Power Management is off for Wi-Fi device, it seems to be good for avoiding unexpected deauthenticated.

My environment was the below.

  • Raspberry Pi zero w

    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Raspbian
    Description: Raspbian GNU/Linux 11 (bullseye)
    Release: 11
    Codename: bullseye
    $ uname -a
    Linux raspberrypi 5.10.63+ #1488 Thu Nov 18 16:14:04 GMT 2021 armv6l GNU/Linux
    $ hostapd -v
    hostapd v2.9
    User space daemon for IEEE 802.11 AP management,
    IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
    Copyright (c) 2002-2019, Jouni Malinen [email protected] and contributors

Needless answered 24/12, 2021 at 7:57 Comment(0)
G
0

I had it with an HP 7520 printer when I played around with new settings when switching from OpenWRT 17.x to 19.x.

For me the solution was to switch off "802.11w Management Frame Protection".

Garnetgarnett answered 2/2, 2022 at 18:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.