WiFi.scanNetworks() limits list to 10

Hello all. I’ve been stumbling on this for a while.

I am testing a MKR WiFi 1010 in an environment that has a lot of Wifi networks (i.e. 25+). I noticed that WiFi.scanNetworks() keeps returning only first 10 networks it finds.

To further test that I wrote the simple code below, which loops through the scans and prints the result to the serial monitor. Indeed every time I only get 10 networks (SSID number 0 - 9) and btw the list keeps changing (unclear how the networks are ranked, maybe signal strength or else). I tried to look into the documentation but I haven’t found anything specifying this limitation.

I’ll pass along the code, but I don’t think there is anything odd here that would prevent having a list bigger than 10 items. Maybe it’s in one of the library or else.

Any idea?

#include <SPI.h>
#include <WiFiNINA.h>

void setup() {
  // Open serial
  while (!Serial) {

  // WiFi module?
  if (WiFi.status() == WL_NO_MODULE) {
    Serial.println("No Wifi Module");
    while (true);
  // Latest Firmware?
  String fv = WiFi.firmwareVersion();
    Serial.println("Old Firmware");


void loop () {

void scanForWiFis() {
  int numberOfWiFi = WiFi.scanNetworks();
  Serial.print("WiFi Networks Found:");
  for (int i = 0; i<numberOfWiFi; i++) {
    Serial.print("- ");

There is a limit set in the WiFiNINA library. The library folder is in your project folder.

Have a look into the wl_definitions.h file.

// Maximum size of a SSID list

There might be a reason why this was set. So, change at your own risk and test everything. There might be other things you need to change e.g some buffer ...

Thanks. I had a gut feeling there was a limit somewhere but couldn't find it. Also good advice; now that I am certain of the limit I can work around it without modifying that max value. Thanks again.