Environment
- Development Kit: Adafruit Huzzah32 or nodemcu
- Kit version (for WroverKit/PicoKit/DevKitC): [v1|v2|v3|v4]
- Module or chip used: ESP32-WROOM-32
- IDF version (run
git describe --tags to find it): v3.1.1 and master @960c240
- Build System: Make
- Compiler version (run
xtensa-esp32-elf-gcc --version to find it):
xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 5.2.0
- Operating System: linux
- Power Supply: usb
Problem Description
I am trying to get the wifi/power_save example to work but what happens is that at boot-up it associates with my AP but 5 seconds later looses the beacons and then cannot reconnect. I see the same behavior:
- on my AP as well as if I use my Android phone hotspot AP
- using the adafruit huzzah32 and a nodemcu, both have the esp-wroom-32
- using a clean checkout of the esp-idf v3.1.1 tag as well as a clean checkout of master
- the simple_wifi example does not exhibit this problem
Expected Behavior
- the module should maintain an association or at least reconnect
Actual Behavior
After 5 seconds the wifi disconnects due to reason 200 (lost beacons) and then reconnect attempts fail due to reason 201.
Steps to reproduce
- clean checkout of esp-idf v3.1.1 and recursive submodule init
- copy wifi power_save example into working dir
- change wifi event disconnected log line to
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED: %d", event->event_info.disconnected.reason);
- make menuconfig and update: ssid, password, serial loader device
- make flash monitor
Debug Logs
I (735) power_save: SYSTEM_EVENT_STA_START
I (735) wifi: Set ps type: 1
I (855) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (2825) wifi: state: init -> auth (b0)
I (2825) wifi: state: auth -> assoc (0)
I (2835) wifi: state: assoc -> run (10)
I (3145) wifi: connected with tve-home, channel 1
I (3145) wifi: pm start, type: 1
I (9185) wifi: bcn_timout,ap_probe_send_start
I (11685) wifi: ap_probe_send over, resett wifi status to disassoc
I (11685) wifi: state: run -> init (100)
I (11685) wifi: pm stop, total sleep time: 51069 us / 8527784 us
I (11685) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (11695) power_save: SYSTEM_EVENT_STA_DISCONNECTED: 200
I (14115) power_save: SYSTEM_EVENT_STA_DISCONNECTED: 201
I (16535) power_save: SYSTEM_EVENT_STA_DISCONNECTED: 201
I (18945) power_save: SYSTEM_EVENT_STA_DISCONNECTED: 201
After this is continues indefinitely with reason 201.
Environment
git describe --tagsto find it): v3.1.1 and master @960c240xtensa-esp32-elf-gcc --versionto find it):xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 5.2.0
Problem Description
I am trying to get the wifi/power_save example to work but what happens is that at boot-up it associates with my AP but 5 seconds later looses the beacons and then cannot reconnect. I see the same behavior:
Expected Behavior
Actual Behavior
After 5 seconds the wifi disconnects due to reason 200 (lost beacons) and then reconnect attempts fail due to reason 201.
Steps to reproduce
ESP_LOGI(TAG, "SYSTEM_EVENT_STA_DISCONNECTED: %d", event->event_info.disconnected.reason);Debug Logs
After this is continues indefinitely with reason 201.