Open michaelboeding opened 3 weeks ago
Hi @michaelboeding , According to the attached code snippet and logs, it seems that WiFi is not started. Please call esp_wifi_start() after initialising WiFi. For more details relating to the return values of esp_wifi_scan_start(), please refer esp_wifi_scan_start() API description
Answers checklist.
IDF version.
5.2.1
Espressif SoC revision.
ESP32-D0WDR2-V3
Operating System used.
macOS
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-D0WDR2-V3 custom board
Power Supply used.
USB
What is the expected behavior?
I expect the wifi scan to work after I init the wifi station.
What is the actual behavior?
Fails to scan.
Steps to reproduce.
Debug Logs.
No response
More Information.
Get avaliable networks request fired!!!! Initializing WiFi in STA mode... I (18152) wifi:wifi driver task: 3ffea3d8, prio:23, stack:6656, core=0 I (18172) wifi:wifi firmware version: a9f5b59 I (18172) wifi:wifi certification version: v7.0 I (18172) wifi:config NVS flash: enabled I (18172) wifi:config nano formating: disabled I (18182) wifi:Init data frame dynamic rx buffer num: 32 I (18182) wifi:Init static rx mgmt buffer num: 5 I (18192) wifi:Init management short buffer num: 32 I (18192) wifi:Init static tx buffer num: 16 I (18192) wifi:Init tx cache buffer num: 32 I (18202) wifi:Init static rx buffer size: 1600 I (18202) wifi:Init static rx buffer num: 10 I (18212) wifi:Init dynamic rx buffer num: 32 I (18212) wifi_init: rx ba win: 6 I (18222) wifi_init: tcpip mbox: 32 I (18222) wifi_init: udp mbox: 6 I (18222) wifi_init: tcp mbox: 6 I (18232) wifi_init: tcp tx win: 5760 I (18232) wifi_init: tcp rx win: 5760 I (18232) wifi_init: tcp mss: 1440 I (18242) wifi_init: WiFi/LWIP prefer SPIRAM I (18242) wifi_init: WiFi IRAM OP enabled I (18252) wifi_init: WiFi RX IRAM OP enabled Free heap: 2019404 Total free memory: 2019404 I (22582) HEAP: Free Heap: 33323 bytes MALLOC_CAP_8BIT 2019411 bytes MALLOC_CAP_DMA 33323 bytes MALLOC_CAP_SPIRAM 1986088 bytes MALLOC_CAP_INTERNAL 33323 bytes MALLOC_CAP_DEFAULT 2019404 bytes MALLOC_CAP_IRAM_8BIT 0 bytes MALLOC_CAP_RETENTION 0 bytes
ESP_ERROR_CHECK failed: esp_err_t 0x3002 (ESP_ERR_WIFI_NOT_STARTED) at 0x400eeb39
The error occurs on ESP_ERROR_CHECK(esp_wifi_scan_start(NULL, true));
This previously worked on idf v4.4. I upgraded to 5.2.1 and im now also using SPIRAM - not sure if that has something to do with it.