Sming - Open Source framework for high efficiency native ESP8266 development

User avatar
By anakod
#15436 tavalin , I just have tried this code:
Code: Select allBssList aps;

// Will be called when WiFi station network scan was completed
void listNetworks(bool succeeded, BssList list)
{
   if (!succeeded)
   {
      Serial.println("Failed to scan networks");
      return;
   }

   aps = list;
}

// Will be called when WiFi station was connected to AP
void connectOk()
{
   debugf("I'm CONNECTED");

   for (int i = 0; i < aps.count(); i++)
   {
      Serial.println(aps[i].ssid);
   }
}


connectOk called after scan, and all works well. So I think something wrong in your code.