Unable to set up Wifi on Raspberry Pi 4

I have a Raspberry Pi 4 with OpenWrt SNAPSHOT r17693-c2222f74c8
I want to make a dumb AP, I follow the guides out there, but the network does not show.
Appreciate if some one can help me with wifi on raspberry pi. Its not working.
Here are my settings:
etc/config/wireless

        option type 'mac80211'
        option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option band '5g'
        option htmode 'VHT80'
        option cell_density '0'
        option channel '36'
        option country 'ES'

config wifi-iface 'wifinet0'
        option device 'radio0'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'psk2'
        option key '***'
        option network 'lan'

etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdb3:51c0:4d85::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.172'
        option gateway '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        list dns '192.168.1.1'
        list dns '8.8.8.8'
        list dns '1.1.1.1'

Does your client support the channel specified?

Is that the whole /etc/config/wireless file? The first block needs to be under a header of config wifi-device 'radio0'.

Try channel 149 instead of 36 as the group 3 channels have unrestricted use in Spain.

fwiw, I presume the actual wifi password is at least 8 characters long ?

yes , is longer than 8 characters

I forgot to paste the header block in the forum but I have it in the configuration, same happens with channel 149

I want to conect a wireless pc and and my iphone

Open a ssh session and run logread -f to watch the log. Then in another terminal attempt to (re)start wifi by running the command wifi or on the gui disable and re-enable wifi. Post the log entries. If there's no error you should see AP-ENABLED as one of the messages.

Tue Oct 12 17:54:09 2021 kern.err kernel: [   51.749126] ieee80211 phy0: brcmf_cfg80211_start_ap: Set Channel failed: chspec=57386, -52
Tue Oct 12 17:54:14 2021 daemon.notice hostapd: Remove interface 'wlan0'
Tue Oct 12 17:54:14 2021 daemon.notice hostapd: wlan0: interface state ENABLED->DISABLED
Tue Oct 12 17:54:14 2021 daemon.notice hostapd: wlan0: AP-DISABLED
Tue Oct 12 17:54:14 2021 daemon.notice hostapd: wlan0: CTRL-EVENT-TERMINATING
Tue Oct 12 17:54:14 2021 daemon.notice hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Tue Oct 12 17:54:14 2021 kern.info kernel: [   56.305042] device wlan0 left promiscuous mode
Tue Oct 12 17:54:14 2021 kern.info kernel: [   56.309552] br-lan: port 2(wlan0) entered disabled state
Tue Oct 12 17:54:14 2021 daemon.notice netifd: radio0 (1515): command failed: No error information (-524)
Tue Oct 12 17:54:14 2021 daemon.notice netifd: Wireless device 'radio0' is now down
Tue Oct 12 17:54:14 2021 daemon.notice netifd: radio0 (1539): command failed: No error information (-524)
Tue Oct 12 17:54:15 2021 kern.warn kernel: [   57.075933] netlink: 'iw': attribute type 302 has an invalid length.
Tue Oct 12 17:54:15 2021 daemon.notice netifd: radio0 (1539): command failed: I/O error (-5)
Tue Oct 12 17:54:16 2021 daemon.notice hostapd: Configuration file: /var/run/hostapd-phy0.conf (phy wlan0) --> new PHY
Tue Oct 12 17:54:16 2021 kern.info kernel: [   58.224677] br-lan: port 2(wlan0) entered blocking state
Tue Oct 12 17:54:16 2021 kern.info kernel: [   58.230026] br-lan: port 2(wlan0) entered disabled state
Tue Oct 12 17:54:16 2021 kern.info kernel: [   58.235467] device wlan0 entered promiscuous mode
Tue Oct 12 17:54:16 2021 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Tue Oct 12 17:54:16 2021 daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->HT_SCAN
Tue Oct 12 17:54:16 2021 kern.err kernel: [   58.242603] ieee80211 phy0: brcmf_run_escan: error (-52)
Tue Oct 12 17:54:16 2021 kern.err kernel: [   58.247966] ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Tue Oct 12 17:54:16 2021 kern.info kernel: [   58.775029] br-lan: port 2(wlan0) entered disabled state
Tue Oct 12 17:54:16 2021 kern.info kernel: [   58.780680] device wlan0 left promiscuous mode
Tue Oct 12 17:54:16 2021 kern.info kernel: [   58.785266] br-lan: port 2(wlan0) entered disabled state
Tue Oct 12 17:54:16 2021 kern.err kernel: [   58.862018] ieee80211 phy0: brcmf_run_escan: error (-52)
Tue Oct 12 17:54:16 2021 kern.err kernel: [   58.867374] ieee80211 phy0: brcmf_cfg80211_scan: scan error (-52)
Tue Oct 12 17:54:16 2021 daemon.err hostapd: Failed to request a scan of neighboring BSSes ret=-52 (No error information)
Tue Oct 12 17:54:16 2021 daemon.notice hostapd: wlan0: interface state HT_SCAN->DISABLED
Tue Oct 12 17:54:16 2021 daemon.notice hostapd: wlan0: AP-DISABLED
Tue Oct 12 17:54:16 2021 daemon.err hostapd: wlan0: Unable to setup interface.
Tue Oct 12 17:54:16 2021 daemon.notice hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Tue Oct 12 17:54:16 2021 daemon.notice hostapd: nl80211: Failed to remove interface wlan0 from bridge br-lan: Invalid argument
Tue Oct 12 17:54:17 2021 daemon.notice hostapd: wlan0: CTRL-EVENT-TERMINATING
Tue Oct 12 17:54:17 2021 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
Tue Oct 12 17:54:17 2021 daemon.notice netifd: radio0 (1539): Command failed: Invalid argument
Tue Oct 12 17:54:17 2021 daemon.notice netifd: radio0 (1539): Device setup failed: HOSTAPD_START_FAILED
Tue Oct 12 17:54:17 2021 daemon.notice netifd: Wireless device 'radio0' set retry=0
Tue Oct 12 17:54:17 2021 daemon.crit netifd: Wireless device 'radio0' setup failed, retry=0
Tue Oct 12 17:54:17 2021 daemon.notice netifd: Wireless device 'radio0' is now down

now its a loop and i get this every time


If I restart the RPI
but the Ap doesnt show

Try option htmode ‘HT20’ or ‘HT40’, VHT80 seems to be very finicky on the pi4.

2 Likes

Thanks a lot!! It worked with htmode 'HT20'

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.