Raspberry Pi 0 w AP+STA

Hello all,

The basic problem is that if you try to use the pi in AP+STA mode it will not work, and will continually cycle the interface between blocking, forwarding, and disabled states.

In another thread, I discovered that this can be somewhat worked around by disconnecting wpa_supplicant from hostapd (making it so that wpa_supplicant does not connect to the control interface created by hostapd).

Sadly, that seems to break your ability to host encrypted networks. Note that if the pi was not a client of a network, this worked just fine; however, when I tried to host a WPA-PSK network at the same time that it was connected to the wifi, I was unable to connect to the pi.

At this point I believe this is either a driver issue or a bug with hostapd. I'm attempting to troubleshoot / fix this myself, but I'm inexperienced and will welcome any help diagnosing and solving this issue.

Also I did make a bug report, but it hasn't gotten any attention yet.

Lastly, here's a snippet from the logread output. Hopefully someone will be able to help.

root@OpenWrt:~# logread | tail -50
Sat May 16 18:35:56 2020 daemon.notice wpa_supplicant[1042]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sat May 16 18:35:56 2020 daemon.notice wpa_supplicant[1042]: wlan0: CTRL-EVENT-DISCONNECTED bssid=myBSSID reason=0 locally_generated=1
Sat May 16 18:35:56 2020 daemon.notice netifd: Network device 'wlan0-1' link is down
Sat May 16 18:35:56 2020 kern.info kernel: [  101.063308] br-lan: port 2(wlan0-1) entered disabled state
Sat May 16 18:35:57 2020 daemon.notice wpa_supplicant[1042]: wlan0: Trying to associate with myBSSID (SSID='myWifiSSID' freq=2412 MHz)
Sat May 16 18:35:57 2020 daemon.notice netifd: Network device 'wlan0' link is up
Sat May 16 18:35:57 2020 daemon.notice netifd: Interface 'wwan' has link connectivity
Sat May 16 18:35:57 2020 daemon.notice netifd: Interface 'wwan' is setting up now
Sat May 16 18:35:57 2020 daemon.notice wpa_supplicant[1042]: wlan0: Associated with myBSSID
Sat May 16 18:35:57 2020 daemon.notice wpa_supplicant[1042]: wlan0: CTRL-EVENT-CONNECTED - Connection to myBSSID completed [id=0 id_str=]
Sat May 16 18:35:57 2020 daemon.warn hostapd: wlan0-1: Could not connect to kernel driver
Sat May 16 18:35:57 2020 kern.err kernel: [  101.637296] ieee80211 phy0: brcmf_link_down: WLC_DISASSOC failed (-52)
Sat May 16 18:35:57 2020 kern.info kernel: [  101.761564] br-lan: port 2(wlan0-1) entered blocking state
Sat May 16 18:35:57 2020 kern.info kernel: [  101.773437] br-lan: port 2(wlan0-1) entered forwarding state
Sat May 16 18:35:57 2020 daemon.notice netifd: Network device 'wlan0-1' link is up
Sat May 16 18:35:57 2020 daemon.notice wpa_supplicant[1042]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sat May 16 18:35:57 2020 daemon.notice wpa_supplicant[1042]: wlan0: CTRL-EVENT-DISCONNECTED bssid=myBSSID reason=0 locally_generated=1
Sat May 16 18:35:58 2020 daemon.notice netifd: wwan (1393): udhcpc: started, v1.30.1
Sat May 16 18:35:58 2020 daemon.notice netifd: Network device 'wlan0' link is down
Sat May 16 18:35:58 2020 daemon.notice netifd: Interface 'wwan' has link connectivity loss
Sat May 16 18:35:58 2020 kern.info kernel: [  102.255791] br-lan: port 2(wlan0-1) entered disabled state
Sat May 16 18:35:58 2020 daemon.notice netifd: Network device 'wlan0-1' link is down
Sat May 16 18:35:58 2020 daemon.notice netifd: wwan (1393): Command failed: Permission denied
Sat May 16 18:35:58 2020 daemon.notice netifd: wwan (1393): udhcpc: sending discover
Sat May 16 18:35:58 2020 daemon.notice netifd: wwan (1393): udhcpc: received SIGTERM
Sat May 16 18:35:58 2020 daemon.notice netifd: Interface 'wwan' is now down
Sat May 16 18:35:58 2020 daemon.notice netifd: Interface 'wwan' is disabled
Sat May 16 18:35:58 2020 daemon.notice netifd: Interface 'wwan' is enabled
Sat May 16 18:35:58 2020 daemon.notice wpa_supplicant[1042]: wlan0: Trying to associate with myBSSID (SSID='myWifiSSID' freq=2412 MHz)
Sat May 16 18:35:58 2020 daemon.notice netifd: Network device 'wlan0' link is up
Sat May 16 18:35:58 2020 daemon.notice netifd: Interface 'wwan' has link connectivity
Sat May 16 18:35:58 2020 daemon.notice netifd: Interface 'wwan' is setting up now
Sat May 16 18:35:58 2020 daemon.notice wpa_supplicant[1042]: wlan0: Associated with myBSSID
Sat May 16 18:35:58 2020 daemon.notice wpa_supplicant[1042]: wlan0: CTRL-EVENT-CONNECTED - Connection to myBSSID completed [id=0 id_str=]
Sat May 16 18:35:58 2020 daemon.warn hostapd: wlan0-1: Could not connect to kernel driver
Sat May 16 18:35:58 2020 kern.err kernel: [  103.175521] ieee80211 phy0: brcmf_link_down: WLC_DISASSOC failed (-52)
Sat May 16 18:35:59 2020 daemon.notice wpa_supplicant[1042]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Sat May 16 18:35:59 2020 daemon.notice wpa_supplicant[1042]: wlan0: CTRL-EVENT-DISCONNECTED bssid=myBSSID reason=0 locally_generated=1
Sat May 16 18:35:59 2020 kern.info kernel: [  103.305069] br-lan: port 2(wlan0-1) entered blocking state
Sat May 16 18:35:59 2020 kern.info kernel: [  103.316535] br-lan: port 2(wlan0-1) entered forwarding state
Sat May 16 18:35:59 2020 daemon.notice netifd: Network device 'wlan0' link is down
Sat May 16 18:35:59 2020 daemon.notice netifd: Interface 'wwan' has link connectivity loss
Sat May 16 18:35:59 2020 daemon.notice netifd: Network device 'wlan0-1' link is up
Sat May 16 18:35:59 2020 daemon.notice netifd: Interface 'wwan' is now down
Sat May 16 18:35:59 2020 daemon.notice netifd: Interface 'wwan' is disabled
Sat May 16 18:35:59 2020 daemon.notice netifd: Interface 'wwan' is enabled

thanks