hostapd repeating "deauthenticated due to local deauth request"

13,043

Solution 1

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.

Solution 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 ;-)

Share:
13,043

Related videos on Youtube

jamespharper
Author by

jamespharper

Mechanical engineer and STEM educator with a smattering of search and rescue, ski patrol, EMT, world traveler, garage mechanic, computer programmer and DIYer.

Updated on September 15, 2022

Comments

  • jamespharper
    jamespharper over 1 year

    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.

    • Gabriel Devillers
      Gabriel Devillers over 6 years
      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.
  • Wayne Werner
    Wayne Werner over 7 years
    Well, I just did that and it's still not working for me
  • Fredrik Håård
    Fredrik Håård over 6 years
    @WayneWerner what is your entropy availability?
  • Ingo
    Ingo over 5 years
    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.