Wlan crashes on PI3 (when loading Grafana login?)

I’m fighting a bizarre crash since early December. Has been very educational for myself, but not helping to boost WAF at all :smiley: Long story short - wlan occasionally disappears, lately when opening Grafana from Android Chrome.

The long story.
All was working fine when wired (even from 1A charger), until I moved PI to closed enclosure, with just 220V and no network cable. It started to crash every now and then, when I’m home and start doing smtg.
First I thought it’s overheating (learned how to do exec binding and record/check T or memory in grafana). Then I blamed power supply (upgraded to ipad’s 2A; plus learned to switch off BT, hdmi, Led’s, etc). Then I found out it’s actually not crashing, just network disappears (added GPIO restart switch plus learned executecommand in rules for sudo reboot when router not available). Has been quite an nightmare:slight_smile:

What is common thing, upon crash there is a tiny:
brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
in the kern.log

More often than not I see crash when trying to open Grafana in Chrome (GalaxyS8) after a while and it goes to login screen, not existing session. Today was even been able to repeat - after a restart, few hours everything works fine; I can open Grafana dashboard in already logged in tab; if create a new Incognito tab, try to open Grafana - I get uncompleted login page and suddenly wlan is down.
Last occurrences of issue been with Grafana login, but, I feel, in past have seen it also when trying to edit HABPanels.

I have not managed (learned) to get Terminal over BT yet, so it’s a little bit hard to debug/troubleshoot, when the wlan is down. My first attempt to do ifdown/ifup in rules instead of sudo reboot did not help (but might be I had some other config issues).

Anyone else seen similar? How to better debug to root cause? Less-drastic remedy than reboot? Or shall I just get a usb wifi and forget the problem all together?

Jan  3 07:38:35 openHABianPi grafana-server[739]: t=2018-01-03T07:38:35+0200 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/ status=302 remote_addr= time_ms=3 size=29 referer=
Jan  3 07:38:38 openHABianPi kernel: [27273.524164] brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012
Jan  3 07:39:12 openHABianPi systemd[1]: Started Turns off Raspberry Pi display backlight on shutdown/reboot.

Linux openHABianPi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
openHAB 2.2.0-1 (Release Build)

Have not figured out root cause, but also not seeing the brcmf_sdio_hostmail anymore. Only thing that changed - ISP replaced the wifi router (oh, and as a result, I had to change hostname config in influxdb.config - from ‘myhost’ to ‘myhosy.lan’). Can’t explain it, but have not seen any restarts since the new router is up. .

Hi Austris_V , It looks we are struggling with the same issue.

I am also fighting this for long time now, on the beggining I was thinking that the whole Pi3B was crashing , unfortunately i had all the devices connected via wlan0 interface. Later I realize that the Pi3B was not crashing only the wlan0 stopped responding and in syslog i have only one message :slight_smile:

Mar 23 07:15:44 raspberrypi kernel: [135037.017021] brcmfmac: brcmf_sdio_hostmail: Unknown mailbox data content: 0x40012

There is nothing else nothing before or after which is abnormal.
I also seperate all the other issues like power supply , heating I disable power saving etc, nothing works.
What is really funny I am able to recreate this by opening the Domoticz app on Android browser with web browser cache with some old data .

I have currently no idea how to solve this, I do not want to move to wired connection , I am currently testing the system and this issue gives me a lot of possibility to lear :slight_smile: at least this is fun.

Hi Marek,
I would check the router specs. Some domestic routers only accept a certain number of wlan connections and then start dropping them. Maybe assign a fixed IP to your pi in the router.

Hi vzroglub,
I suspect router is not the best one, it is rather poor performance one, but on the other way I have all the devices with static IP addresses , I am running Pi3B with Domoticz and 3 Wemos D1 Mini , this is not a really big system, additionally i have one connection to weather station and that is it.
In generally in future on production system I want to change to really good router or AP , but in case this is really the fault of router how come it could crash the wlan0 on Pi3B ?
Best regards

I don’t know why your router drop the connection.
It maybe that the wifi channel you are using is congested, it maybe any other reason.
There are scripts for the Raspberry that try to reconnect when the connection drops, you can try that.
Good luck

1 Like

I think you are right, I am in rather wifi noisy place with lot of additional networks, so also this is the other reason why the connection can sometimes can be interrupted or somehow be dropped . I think lets see how it will behave on the wired connection rather useless to invest into better router now.
Thanks vzorglub !

One additional info seems to be issue known and under investigation, so lets hope for some solution: