I am using an ESP32_wroom_32 for a Wifi-connected project.
The function ScanForSSID reports the WiFi networks visible at the location, so you can select the one you want to connect to.
Unfortunately, it only reports the first 8 networks it sees.
In my location, there are currently 18 (!) networks visible, and only 8 are reported.
It's a toss-up if the network I need is within the first 8, depending on momentary signal strength I guess.
So this is a show stopper for my project.
Is it a big deal to increase the number of reported networks, like to 256, to be future-proof?
Edit: the number of networks reported is correct, and the correct number of names can be displayed, but only the first 8 have a meaningful string, the remaining are either empty or show gibberish. See attached with 18 detected networks.
Jan
Increase number of SSID reported by scan-for-SSID in ESP32
-
- Posts: 113
- http://meble-kuchenne.info.pl
- Joined: Mon Feb 13, 2023 7:56 pm
- Has thanked: 28 times
- Been thanked: 12 times
Increase number of SSID reported by scan-for-SSID in ESP32
- Attachments
-
- ssid help.PNG (13.28 KiB) Viewed 6245 times
-
- SSID list.jpg (200.09 KiB) Viewed 6247 times
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 684 times
Re: Increase number of SSID reported by scan-for-SSID in ESP32
Hello,
The problem with increasing the max number to 256 is that there is a RAM usage hit for each additional SSID slot that is created.
If you want to increase the max count yourself then you can do so by looking at the ESP_CAL_WIFI.c file here using a text editor.
v9
v10
Copy and paste the path into your Windows file explorer to get to the directory.
Inside the file look for this line, around line 70.
Then change to suit your needs, e.g.
Save the file and then recompile and hopefully it will work as expected now.
I'll investigate and see if we can increase the stock amount a bit without having too much of an impact on existing projects.
The problem with increasing the max number to 256 is that there is a RAM usage hit for each additional SSID slot that is created.
If you want to increase the max count yourself then you can do so by looking at the ESP_CAL_WIFI.c file here using a text editor.
v9
Code: Select all
C:\ProgramData\MatrixTSL\FlowcodeV9\CAL\ESP
Code: Select all
C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\ESP
Inside the file look for this line, around line 70.
Code: Select all
#define WIFI_SCAN_LIST_MAX 8
Code: Select all
#define WIFI_SCAN_LIST_MAX 30
I'll investigate and see if we can increase the stock amount a bit without having too much of an impact on existing projects.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Increase number of SSID reported by scan-for-SSID in ESP32
Thanks Ben, I'll try that.
The 256 was a bit tongue-in-cheek of course - but something like 16 or 32 should be doable. The mem in that ESP32 is huge.
Jan
The 256 was a bit tongue-in-cheek of course - but something like 16 or 32 should be doable. The mem in that ESP32 is huge.
Jan
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 684 times
Re: Increase number of SSID reported by scan-for-SSID in ESP32
Yes good idea. I'll make that change now in v10.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Increase number of SSID reported by scan-for-SSID in ESP32
Set it to 32 and all is fine.
Now that people get home from work I'm flooded with no less than 23 active networks.
Next is to figger out to make a scrollable list and how to select from it.
Should be fun.
Thanks Ben!
Jan
Now that people get home from work I'm flooded with no less than 23 active networks.
Next is to figger out to make a scrollable list and how to select from it.
Should be fun.
Thanks Ben!
Jan
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: Increase number of SSID reported by scan-for-SSID in ESP32
Hi Jan
Ages ago I used a mobile phone to configure. Basically if the ESP couldn't connect it then went it to a "configure routine". This routine created an AP and published a page with all found SSIDs. You could then select the required one and enter a password.
The ESP can remember the last connection so this only ran if things changed.
If I remember correctly I think Benj published something similar.
Maybe that would help?
Regards
Ages ago I used a mobile phone to configure. Basically if the ESP couldn't connect it then went it to a "configure routine". This routine created an AP and published a page with all found SSIDs. You could then select the required one and enter a password.
The ESP can remember the last connection so this only ran if things changed.
If I remember correctly I think Benj published something similar.
Maybe that would help?
Regards
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 501 times
- Been thanked: 684 times
Re: Increase number of SSID reported by scan-for-SSID in ESP32
Topic here for reference.
https://flowcode.co.uk/forums/viewtopic.php?f=10&t=634
https://flowcode.co.uk/forums/viewtopic.php?f=10&t=634
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Increase number of SSID reported by scan-for-SSID in ESP32
That is the way my audio streamer works; it goes into AP mode, you can connect to it and tell it which network to connect to.chipfryer27 wrote: ↑Mon Jun 12, 2023 5:44 pmAges ago I used a mobile phone to configure. Basically if the ESP couldn't connect it then went it to a "configure routine". This routine created an AP and published a page with all found SSIDs. You could then select the required one and enter a password.
It's not reliable though, so if I go that way I definitely need a soft button to force it into that mode.
It's attractive; I don't look forward to fiddle with a soft keyboard on the small display to enter password strings and such.
Much easier on a phone or tablet.
At this point I have no idea how to publish a 'setup' page to say a phone though.
Jan