RaspAP / raspap-webgui

Simple wireless AP setup & management for Debian-based devices
https://raspap.com/
GNU General Public License v3.0
4.37k stars 784 forks source link

[Bug]: hostapd errors in journal #1600

Open frankozland opened 1 week ago

frankozland commented 1 week ago

Code of Conduct

Issue reporting checklist

Operating System

Raspberry Pi OS (64-bit) Lite Bookworm

Quick install or Manual setup?

Quick install

Onboard wireless chipset or external adapter?

Onboard wireless chipset

Hardware

Raspberry Pi 4 Model B

RaspAP version

3.1.3 (Latest)

Other software or services running with RaspAP?

No other software

Contact details (optional)

frankoz95967943@gmail.com

Bug description

Repeatable problem. Out of the box quick install - set wlan country - no other config changes.

In raspap - changed to 5ghz

As soon as i did that the raspberry network dropped - even ssh wouldnt connect.

Log file began to fill with Jun 22 03:57:06 raspberrypirouter kernel: ieee80211 phy0: brcmf_run_escan: error (-52) Jun 22 03:57:06 raspberrypirouter kernel: ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52) Jun 22 03:57:08 raspberrypirouter kernel: ieee80211 phy0: brcmf_cfg80211_start_ap: Set Channel failed: chspec=53282, -52

until i killed hostapd service.

going back to 2.4ghz channel 1 everything returned to normal, no errors in log.

image

image

Steps to reproduce

see above

Screenshots

No response

Additional context

No response

Relevant log output

No response

billz commented 1 week ago

This is a very common error thrown by hostapd. Suggest you google first. Top results: https://forums.raspberrypi.com/viewtopic.php?t=249750 https://github.com/raspberrypi/linux/issues/3849

If not done so already, disabling power management may help. RaspAP is a magnet for reports like this, when often the issue exists at the level of the kernel or firmware. Please bear in mind that this project is, fundamentally, a configuration manager. It isn't magic and cannot work miracles.

billz commented 1 week ago

I carved out some time and upgraded to the latest kernel. I'm able to reproduce this.

$ uname -a
Linux rpi5 6.6.31+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux
$ sudo systemctl restart hostapd.service; journalctl -f
Jun 22 11:42:16 rpi5 kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd022 fail, reason -52
Jun 22 11:42:16 rpi5 kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd026 fail, reason -52
Jun 22 11:42:16 rpi5 kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd02a fail, reason -52
Jun 22 11:42:16 rpi5 kernel: brcmfmac: brcmf_set_channel: set chanspec 0xd02e fail, reason -52
Jun 22 11:42:19 rpi5 kernel: ieee80211 phy0: brcmf_cfg80211_start_ap: Set Channel failed: chspec=53282, -52

Appears it has already been reported https://github.com/raspberrypi/linux/issues/6049

frankozland commented 1 week ago

Incredible support and response.

Thank you mr. billz - im ok with downgraded version - i'll monitor if they fix the OS.

Im guessin anyone who follows instructions to install raspap w/ apt full-upgrade will run into the exact same scenario. I dont know when the network stack was broken or max OS version its not.

frankozland commented 1 week ago

https://wireless.wiki.kernel.org/en/users/documentation/acs

hostap has the option to not specify a channel and it will automatically select channel for you - i dont know if that will fix it, but there seems to be work here on not specifying any channel when setting up hotspot

billz commented 1 week ago

Im guessin anyone who follows instructions to install raspap w/ apt full-upgrade will run into the exact same scenario. I dont know when the network stack was broken or max OS version its not.

News to me also. As evidenced by the forum posts and previous issues, this isn't the first time a kernel update hosed brcmfmac, nor will it be the last.