No, you can’t change the SDK version, Mongoose-OS is a complex piece of software that works over several manufacturers’ SDKs and it is stable to a defined SDK for a release. The developers will in turn migrate to a more recent SDK when circumstances allow it.
Would you care to explain what fails and what works ?
Your code seems to be C++ and I don’t have the faintest idea on what STAILQ_NEXT() does.
What do you call ? What do you get ? What did you do “manually” ? What is bss_info ? Do you get the correct result for ‘n’ and just a corrupt listing ?
@nliviu I’ve run the example on a ESP32 and the logs look strange; the number of SSIDs found is correct, but only a handful are printed, and intertwined with other logs:
[Nov 23 14:41:10.821] main.c:17 Starting WiFi scan
[Nov 23 14:41:10.825] esp32_wifi.c:196 WiFi mode: AP+STA
[Nov 23 14:41:10.832] I (2778) wifi:mode : sta (30:ae:a4:80:7a:98) + softAP (30:ae:a4:80:7a:99)
[Nov 23 14:41:10.838] mgos_mongoose.c:66 New heap free LWM: 227908
[Nov 23 14:41:11.848] mgos_mongoose.c:66 New heap free LWM: 225728
[Nov 23 14:41:12.191] main.c:4 WiFi scan result: SSIDs 8, arg 0x0, results:
[Nov 23 14:41:12.205] esp32_wifi.c:196 main.c:11 WiFi mode: AP SSID: Pandora , BSSID: 92:f6:52:a4:c0:1e auth: 3, channel: 11, RSSI: -63
[Nov 23 14:41:12.205]
[Nov 23 14:41:12.220] main.c:11 SSID: LinternaVerde , BSSID: 96:f6:52:a4:c0:1e auth: 3, channel: 11, RSSI: -63
[Nov 23 14:41:12.220] I (4158) wifi:mode : softAP (30:ae:a4:80:7a:99)
[Nov 23 14:41:19.966] main.c:17 Starting WiFi scan
[Nov 23 14:41:19.970] esp32_wifi.c:196 WiFi mode: AP+STA
[Nov 23 14:41:19.977] I (11928) wifi:mode : sta (30:ae:a4:80:7a:98) + softAP (30:ae:a4:80:7a:99)
[Nov 23 14:41:20.988] mgos_mongoose.c:66 New heap free LWM: 225528
[Nov 23 14:41:21.377] main.c:4 WiFi scan result: SSIDs 10, arg 0x0, results:esp32_wifi.c:196
[Nov 23 14:41:21.380] WiFi mode: APmain.c:11
[Nov 23 14:41:21.394] SSID: Sandbox , BSSID: 90:f6:52:a4:c0:1e auth: 3, channel: 11, RSSI: -65
[Nov 23 14:41:21.394] I (13338) wifi:mode : softAP (30:ae:a4:80:7a:99)
[Nov 23 14:41:29.966] main.c:17 Starting WiFi scan
[Nov 23 14:41:29.970] esp32_wifi.c:196 WiFi mode: AP+STA
[Nov 23 14:41:29.977] I (21928) wifi:mode : sta (30:ae:a4:80:7a:98) + softAP (30:ae:a4:80:7a:99)
[Nov 23 14:41:31.295] main.c:4 WiFi scan result: SSIDs 6, arg 0x0, results:
[Nov 23 14:41:31.309] esp32_wifi.c:196 main.c:11 WiFi mode: AP SSID: SkinlessSkin , BSSID: 9a:f6:52:a4:c0:1e auth: 3, channel: 11, RSSI: -64
[Nov 23 14:41:31.309]
[Nov 23 14:41:31.324] main.c:11 SSID: Sandbox , BSSID: 90:f6:52:a4:c0:1e auth: 3, channel: 11, RSSI: -65
[Nov 23 14:41:31.324] I (23268) wifi:mode : softAP (30:ae:a4:80:7a:99)
See the “done” text is not printed, this is is weird.
I added a “Entry # of #” text and most of the times the loop seems to exit before all the lines are printed, and the “done” text is not printed (?)(the callback exits ?).
[Nov 23 14:32:24.736] main.c:18 Starting WiFi scan
[Nov 23 14:32:24.740] esp32_wifi.c:196 WiFi mode: AP+STA
[Nov 23 14:32:24.747] I (11928) wifi:mode : sta (30:ae:a4:80:7a:98) + softAP (30:ae:a4:80:7a:99)
[Nov 23 14:32:25.758] mgos_mongoose.c:66 New heap free LWM: 225824
[Nov 23 14:32:26.062] esp32_wifi.c:196 WiFi mode: AP
[Nov 23 14:32:26.067] I (13248) wifi:mode : softAP (30:ae:a4:80:7a:99)
[Nov 23 14:32:34.736] main.c:18 Starting WiFi scan
[Nov 23 14:32:34.740] esp32_wifi.c:196 WiFi mode: AP+STA
[Nov 23 14:32:34.750] I (21928) wifi:mode : sta (30:ae:a4:80:7a:98) + softAP (30:ae:a4:80:7a:99)
[Nov 23 14:32:35.758] mgos_mongoose.c:66 New heap free LWM: 225724
[Nov 23 14:32:36.108] main.c:4 WiFi scan result: SSIDs 8, arg 0x0, results:esp32_wifi.c:196
[Nov 23 14:32:36.112] WiFi mode: APmain.c:6
[Nov 23 14:32:36.118] Entry 1 of 8:
[Nov 23 14:32:36.118] I (23298) wifi:mode : softAP (30:ae:a4:80:7a:99)
[Nov 23 14:32:44.737] main.c:18 Starting WiFi scan
[Nov 23 14:32:44.740] esp32_wifi.c:196 WiFi mode: AP+STA
[Nov 23 14:32:44.747] I (31928) wifi:mode : sta (30:ae:a4:80:7a:98) + softAP (30:ae:a4:80:7a:99)
[Nov 23 14:32:46.147] main.c:4 WiFi scan result: SSIDs 8, arg 0x0, results:
[Nov 23 14:32:46.154] esp32_wifi.c:196 main.c:6 WiFi mode: APEntry 1 of 8:
[Nov 23 14:32:46.154]
[Nov 23 14:32:46.169] main.c:12 SSID: Sandbox , BSSID: 90:f6:52:a4:c0:1e auth: 3, channel: 11, RSSI: -66
[Nov 23 14:32:46.169] I (33338) wifi:mode : softAP (30:ae:a4:80:7a:99)
[Nov 23 14:32:54.737] main.c:18 Starting WiFi scan
[Nov 23 14:32:54.740] esp32_wifi.c:196 WiFi mode: AP+STA
[Nov 23 14:32:54.748] I (41928) wifi:mode : sta (30:ae:a4:80:7a:98) + softAP (30:ae:a4:80:7a:99)
[Nov 23 14:32:56.066] main.c:4 WiFi scan result: SSIDs 6, arg 0x0, results:
[Nov 23 14:32:56.073] esp32_wifi.c:196 main.c:6 WiFi mode: APEntry 1 of 6:
[Nov 23 14:32:56.073]
[Nov 23 14:32:56.088] main.c:12 SSID: Sandbox , BSSID: 90:f6:52:a4:c0:1e auth: 3, channel: 11, RSSI: -66
[Nov 23 14:32:56.088] I (43258) wifi:mode : softAP (30:ae:a4:80:7a:99)
[Nov 23 14:33:04.737] main.c:18 Starting WiFi scan
[Nov 23 14:33:04.741] esp32_wifi.c:196 WiFi mode: AP+STA
[Nov 23 14:33:04.748] I (51928) wifi:mode : sta (30:ae:a4:80:7a:98) + softAP (30:ae:a4:80:7a:99)
[Nov 23 14:33:06.106] main.c:4 WiFi scan result: SSIDs 7, arg 0x0, results:
[Nov 23 14:33:06.113] esp32_wifi.c:196 main.c:6 WiFi mode: APEntry 1 of 7:
[Nov 23 14:33:06.113]
[Nov 23 14:33:06.128] main.c:12 SSID: Sandbox , BSSID: 90:f6:52:a4:c0:1e auth: 3, channel: 11, RSSI: -66
[Nov 23 14:33:06.128] I (53298) wifi:mode : softAP (30:ae:a4:80:7a:99)
[Nov 23 14:33:14.737] main.c:18 Starting WiFi scan
[Nov 23 14:33:14.741] esp32_wifi.c:196 WiFi mode: AP+STA
[Nov 23 14:33:14.748] I (61928) wifi:mode : sta (30:ae:a4:80:7a:98) + softAP (30:ae:a4:80:7a:99)
[Nov 23 14:33:16.106] main.c:4 WiFi scan result: SSIDs 6, arg 0x0, results:
[Nov 23 14:33:16.112] esp32_wifi.c:196 main.c:6 WiFi mode: APEntry 1 of 6:
[Nov 23 14:33:16.112]
[Nov 23 14:33:16.128] main.c:12 SSID: Sandbox , BSSID: 90:f6:52:a4:c0:1e auth: 3, channel: 11, RSSI: -66
[Nov 23 14:33:16.128] I (63298) wifi:mode : softAP (30:ae:a4:80:7a:99)
However, toying with the texts like for example adding a \n here or there, sometimes it works OK.
stack trashing ?