I was trying out the wifi/powersave example from the ESP-IDF master branch, but am running into a problem where I get disconnected after a while (seconds to minutes) without being able to reconnect. Boot log ending with the disconnect events:
Code: Select all
]
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5752
load:0x40078000,len:7684
load:0x40080000,len:7392
0x40080000: _iram_start at /home/tim/Projects/2018/ESP32/sdk/components/freertos/xtensa_vectors.S:1685
entry 0x4008039c
0x4008039c: _UserExceptionVector at ??:?
I (28) boot: ESP-IDF v3.2-dev-57-ge75628b4 2nd stage bootloader
I (28) boot: compile time 21:00:01
I (28) boot: Enabling RNG early entropy source...
I (34) boot: SPI Speed : 40MHz
I (38) boot: SPI Mode : DIO
I (42) boot: SPI Flash Size : 4MB
I (46) boot: Partition Table:
I (50) boot: ## Label Usage Type ST Offset Length
I (57) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (65) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (72) boot: 2 factory factory app 00 00 00010000 00100000
I (80) boot: End of partition table
I (84) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x13964 ( 80228) map
I (121) esp_image: segment 1: paddr=0x0002398c vaddr=0x3ffb0000 size=0x03a5c ( 14940) load
I (127) esp_image: segment 2: paddr=0x000273f0 vaddr=0x3ffb3a5c size=0x00000 ( 0) load
I (127) esp_image: segment 3: paddr=0x000273f8 vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _iram_start at /home/tim/Projects/2018/ESP32/sdk/components/freertos/xtensa_vectors.S:1685
I (137) esp_image: segment 4: paddr=0x00027800 vaddr=0x40080400 size=0x08810 ( 34832) load
I (160) esp_image: segment 5: paddr=0x00030018 vaddr=0x400d0018 size=0x66f58 (421720) map
0x400d0018: _stext at ??:?
I (308) esp_image: segment 6: paddr=0x00096f78 vaddr=0x40088c10 size=0x08ac4 ( 35524) load
0x40088c10: rcGetSched at ??:?
I (323) esp_image: segment 7: paddr=0x0009fa44 vaddr=0x400c0000 size=0x00064 ( 100) load
I (323) esp_image: segment 8: paddr=0x0009fab0 vaddr=0x50000000 size=0x00000 ( 0) load
I (340) boot: Loaded app from partition at offset 0x10000
I (340) boot: Disabling RNG early entropy source...
I (341) cpu_start: Pro cpu up.
I (345) cpu_start: Starting app cpu, entry point is 0x4008114c
0x4008114c: call_start_cpu1 at /home/tim/Projects/2018/ESP32/sdk/components/esp32/cpu_start.c:225
I (0) cpu_start: App cpu up.
I (355) heap_init: Initializing. RAM available for dynamic allocation:
I (362) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (368) heap_init: At 3FFBA100 len 00025F00 (151 KiB): DRAM
I (374) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (381) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (387) heap_init: At 400916D4 len 0000E92C (58 KiB): IRAM
I (393) cpu_start: Pro cpu start user code
I (412) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (414) application: application starting up
I (414) application: free memory: 269480 bytes
I (414) application: IDF version: v3.2-dev-57-ge75628b4
I (464) pm_esp32: Frequency switching config: CPU_MAX: 80, APB_MAX: 80, APB_MIN: XTAL, Light sleep: ENABLED
I (474) wifi: wifi driver task: 3ffc16f4, prio:23, stack:4096, core=0
I (474) wifi: wifi firmware version: a7a46e9
I (474) wifi: config NVS flash: enabled
I (474) wifi: config nano formating: disabled
I (484) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (494) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (534) wifi: Init dynamic tx buffer num: 32
I (534) wifi: Init data frame dynamic rx buffer num: 32
I (534) wifi: Init management frame dynamic rx buffer num: 32
I (534) wifi: Init static rx buffer size: 1600
I (534) wifi: Init static rx buffer num: 10
I (544) wifi: Init dynamic rx buffer num: 32
I (594) wifi: Set ps type: 2
I (674) phy: phy_version: 3910, c0c45a3, May 21 2018, 18:07:06, 0, 0
I (674) wifi: mode : sta (b4:e6:2d:b1:aa:21)
I (674) application: waiting for WiFi connection
I (674) application: SYSTEM_EVENT_STA_START
I (804) wifi: n:6 0, o:1 0, ap:255 255, sta:6 0, prof:1
I (2764) wifi: state: init -> auth (b0)
I (2774) wifi: state: auth -> assoc (0)
I (2784) wifi: state: assoc -> run (10)
I (2804) wifi: connected with Planet Internet, channel 6
I (2814) wifi: pm start, type: 2
I (5094) event: sta ip: 192.168.0.143, mask: 255.255.255.0, gw: 192.168.0.1
I (5094) application: SYSTEM_EVENT_STA_GOT_IP
I (5094) application: got IPv4 address 192.168.0.143
I (5104) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (13004) wifi: bcn_timout,ap_probe_send_start
I (15514) wifi: ap_probe_send over, resett wifi status to disassoc
I (15514) wifi: state: run -> init (1)
I (15514) wifi: pm stop, total sleep time: 3284901 us / 12429939 us
I (15514) wifi: n:6 0, o:6 0, ap:255 255, sta:6 0, prof:1
I (15524) application: SYSTEM_EVENT_STA_DISCONNECTED
I (17954) application: SYSTEM_EVENT_STA_DISCONNECTED
I (20364) application: SYSTEM_EVENT_STA_DISCONNECTED
I (22784) application: SYSTEM_EVENT_STA_DISCONNECTED
I (25204) application: SYSTEM_EVENT_STA_DISCONNECTED
I (27624) application: SYSTEM_EVENT_STA_DISCONNECTED
I (30034) application: SYSTEM_EVENT_STA_DISCONNECTED
I (32454) application: SYSTEM_EVENT_STA_DISCONNECTED
I'm new to ESP32 development, so I'm not sure how to debug this. Automatic light sleep looks like a new feature, so maybe it's just unstable? Although I couldn't find other issues to confirm that.