I (1760) wifi: state: 0 -> 2 (b0)
I (1784) wifi: state: 2 -> 3 (0)
I (1818) wifi: state: 3 -> 5 (10)
I (1820) wifi: pm start, type: 2
I (2843) event: sta ip: 192.168.1.152, mask: 255.255.255.0, gw: 192.168.1.1
At this point I can ping the address and everything seems to be working fine. But then between 30 seconds and a couple of minutes I get this:
I (99730) wifi: state: 5 -> 2 (ec0)
I (99732) wifi: pm stop
&&&&&SYSTEM_EVENT_STA_DISCONNECTED, ssid:xxxxx, ssid_len:xx, bssid:60:38:e0:0f:68:36, reason:14
That last line is one I printed when the SYSTEM_EVENT_STA_DISCONNECTED event came in, which is where I got the reason of WIFI_REASON_MIC_FAILURE. I can't find what this means anywhere. Has anyone seen anything like this? Is there something I need to kick periodically?
The rest of my system isn't doing much while all this is going on. I run some code for the first 20 seconds then just have a main task that is sitting in a loop looking for things to do (and not finding any). I've tried adding an xDelay to my loop to see if I'm starving the WiFi. But that didn't help. And besides, my main task is running at idle priority, so hopefully it should prevent the WiFi from getting fed.