ESP_ERROR_CHECK(esp_wifi_scan_get_ap_num(&ap_count));
It always returns 0 even though there are APs return in the results.
Code: Select all
����x�x⌂�������x�x���x��ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_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:0x3fff0030,len:7172
load:0x40078000,len:15540
load:0x40080400,len:4
0x40080400: _init at ??:?
ho 8 tail 4 room 4
load:0x40080404,len:3904
entry 0x40080640
I (31) boot: ESP-IDF v5.2.1 2nd stage bootloader
I (31) boot: compile time Apr 19 2024 09:51:20
I (31) boot: Multicore bootloader
I (35) boot: chip revision: v0.0
I (40) boot.esp32: SPI Speed : 40MHz
I (43) boot.esp32: SPI Mode : DIO
I (48) boot.esp32: SPI Flash Size : 2MB
I (52) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (61) boot: ## Label Usage Type ST Offset Length
I (69) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (76) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (84) boot: 2 factory factory app 00 00 00010000 00100000
I (91) boot: End of partition table
I (95) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=22254h (139860) map
I (152) esp_image: segment 1: paddr=0003227c vaddr=3ffb0000 size=03ba4h ( 15268) load
I (158) esp_image: segment 2: paddr=00035e28 vaddr=40080000 size=0a1f0h ( 41456) load
I (174) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=81294h (529044) map
I (356) esp_image: segment 4: paddr=000c12bc vaddr=4008a1f0 size=0c48ch ( 50316) load
I (387) boot: Loaded app from partition at offset 0x10000
I (387) boot: Disabling RNG early entropy source...
I (398) cpu_start: Multicore app
I (407) cpu_start: Pro cpu start user code
I (407) cpu_start: cpu freq: 160000000 Hz
I (407) cpu_start: Application information:
I (410) cpu_start: Project name: scan
I (415) cpu_start: App version: 1
I (419) cpu_start: Compile time: Apr 19 2024 09:51:06
I (426) cpu_start: ELF file SHA256: cf21d9c7d...
I (431) cpu_start: ESP-IDF: v5.2.1
I (436) cpu_start: Min chip rev: v0.0
I (440) cpu_start: Max chip rev: v3.99
I (445) cpu_start: Chip rev: v0.0
I (450) heap_init: Initializing. RAM available for dynamic allocation:
I (457) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (463) heap_init: At 3FFB7CB8 len 00028348 (160 KiB): DRAM
I (470) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (476) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (482) heap_init: At 4009667C len 00009984 (38 KiB): IRAM
I (490) spi_flash: detected chip: gd
I (493) spi_flash: flash io: dio
W (497) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (511) main_task: Started on CPU0
I (521) main_task: Calling app_main()
I (551) wifi:wifi driver task: 3ffbfae8, prio:23, stack:6656, core=0
I (551) wifi:wifi firmware version: a9f5b59
I (551) wifi:wifi certification version: v7.0
I (551) wifi:config NVS flash: enabled
I (551) wifi:config nano formating: disabled
I (561) wifi:Init data frame dynamic rx buffer num: 32
I (561) wifi:Init static rx mgmt buffer num: 5
I (571) wifi:Init management short buffer num: 32
I (571) wifi:Init dynamic tx buffer num: 32
I (571) wifi:Init static rx buffer size: 1600
I (581) wifi:Init static rx buffer num: 10
I (581) wifi:Init dynamic rx buffer num: 32
I (591) wifi_init: rx ba win: 6
I (591) wifi_init: tcpip mbox: 32
I (591) wifi_init: udp mbox: 6
I (601) wifi_init: tcp mbox: 6
I (601) wifi_init: tcp tx win: 5760
I (601) wifi_init: tcp rx win: 5760
I (611) wifi_init: tcp mss: 1440
I (611) wifi_init: WiFi IRAM OP enabled
I (621) wifi_init: WiFi RX IRAM OP enabled
I (621) phy_init: phy_version 4791,2c4672b,Dec 20 2023,16:06:06
W (631) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
I (721) wifi:mode : sta (24:0a:c4:05:34:a4)
I (721) wifi:enable tsf
I (3221) scan: Max AP number ap_info can hold = 10
I (3221) scan: Total APs scanned = 0, actual AP number ap_info holds = 4
I (3221) scan: SSID NETGEAR07
I (3221) scan: RSSI -3
I (3221) scan: Authmode WIFI_AUTH_WPA2_WPA3_PSK
I (3231) scan: Pairwise Cipher WIFI_CIPHER_TYPE_CCMP
I (3241) scan: Group Cipher WIFI_CIPHER_TYPE_CCMP
I (3241) scan: Channel 4
I (3241) scan: SSID ORBI13-IoT
I (3251) scan: RSSI -6
I (3251) scan: Authmode WIFI_AUTH_WPA2_PSK
I (3261) scan: Pairwise Cipher WIFI_CIPHER_TYPE_CCMP
I (3261) scan: Group Cipher WIFI_CIPHER_TYPE_CCMP
I (3271) scan: Channel 4
I (3271) scan: SSID ORBI13-IoT
I (3271) scan: RSSI -38
I (3281) scan: Authmode WIFI_AUTH_WPA2_PSK
I (3281) scan: Pairwise Cipher WIFI_CIPHER_TYPE_CCMP
I (3291) scan: Group Cipher WIFI_CIPHER_TYPE_CCMP
I (3291) scan: Channel 4
I (3301) scan: SSID NETGEAR07
I (3301) scan: RSSI -39
I (3301) scan: Authmode WIFI_AUTH_WPA2_WPA3_PSK
I (3311) scan: Pairwise Cipher WIFI_CIPHER_TYPE_CCMP
I (3321) scan: Group Cipher WIFI_CIPHER_TYPE_CCMP
I (3321) scan: Channel 4
I (3321) main_task: Returned from app_main()
Mike