seemoo-lab / nexmon

The C-based Firmware Patching Framework for Broadcom/Cypress WiFi Chips that enables Monitor Mode, Frame Injection and much more
GNU General Public License v3.0
2.45k stars 455 forks source link

brcmfmac crashes on RPi0W when internet goes down. #222

Open jjdbrrr opened 6 years ago

jjdbrrr commented 6 years ago

Hi guys, I've noticed that brcmfmac crashes every time the device has no internet access. When there's no internet access during boot up, or if the connection drops at a later time, this issue seem to happen.

This pops in the kernel logs:

[ 8237.434034] brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012  
[ 8239.890302] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout  
[ 8239.890822] brcmfmac: brcmf_sdio_checkdied: firmware trap in dongle  
[ 8239.890835] brcmfmac: brcmf_run_escan: error (-110)  
[ 8239.890845] brcmfmac: brcmf_cfg80211_scan: scan error (-110)

Now I'm quite sure that this is unrelated to Nexmon, as the issue seems to exist on the Raspberry Pi Zero W, even with the original Broadcom drivers: https://github.com/raspberrypi/linux/issues/1342. But there seems to be good news, because Broadcom / Cypress have released a firmware update (7.45.98.38) that seems to fix the issue.

Now my question is, what should I do to get Nexmon working with the latest firmware? Any help or suggestions would be appreciated.

mame82 commented 6 years ago

Unfortunately I'm facing the same issue on kernel 4.14.x.

Hostapd could only be started with virtual monitor interface up. If wpa_supplicant is started without disabling the monitor interface, this firmware crash occurs.

The brcmfmac driver has to be redeployed afterwards to get everything working again. Although wpa_supplicant with enabled monitor interface allows to reliably reproduce the issue, it seems not to be related directly to nexmon (or monitor interface). As highlighted above, the issue exists in newer Raspbian kernels with legacy firmware, too