I have a Raspberry Pi 3B+ running Raspbian 32 bit. It runs correctly as an access point and a wifi client over the integrated wifi. It does not use systemd-kerneld. I followed the different steps mentioned and froze the wifi firmware version as suggested in the first post to firmware-brcm80211_20190114-1+rpt4_all.deb. All works fine for a few hours and at some point, the pi loses wlan0 : the network indicator states that wlan0 is disassociated from my internet box. When typing dmesg I have the following error repeating :

[20295.746407] ieee80211 phy0: brcmf_run_escan: error (-52)  
[20295.746432] ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)

Does anyone have an idea of what might be causing this error when nothing specific seems to occur to create this error ? Is there some logs I could look at to understand better the issue ?

  • 1
    Sounds like a buggy driver/firmware. As a user, the only thing you can do is to try different combinations of kernel/firmware versions in the hope to find one that works. Feb 15, 2022 at 8:05

1 Answer 1


I've had similar problems and solved them by disabling the wireless power management. Seems that sometimes the wifi just goes to sleep and never wakes up again.

You can test this out by running:-

sudo iwconfig wlan0 power off 

However that is cleared when the Pi is rebooted so to make it permanent.

If you are experiencing drop outs on your wifi interent connection, it could be that your dongle is turning itself off after an idle period. To stop your wifi dongle doing this, we need to disable its power management.

Either SSH to your Pi, or login to its desktop and open up a terminal.

First, make a backup of your existing interfaces file:

sudo cp /etc/network/interfaces /etc/network/interfaces.backup

Now edit the original interfaces file: /etc/network/interfaces

The key line to be added again wlan0 is wireless-power off which disables the power management for that interface.

Example block of configuration:-

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
iface default inet dhcp

Now reboot your raspberry pi:

sudo reboot

Once the raspberry pi has come back up, check that the wifi power management has been disabled by typing this command:


And checking for: “Power Management:off”

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.