more debug output for wifi scan

ims100
Hansi, dl9rdz 2019-04-28 23:36:59 +02:00
rodzic b191f707dc
commit c5ddec7a14
1 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -434,7 +434,11 @@ void SetupAsyncServer() {
int fetchWifiIndex(const char *id) {
for (int i = 0; i < nNetworks; i++) {
if (strcmp(id, networks[i].id.c_str()) == 0) return i;
if (strcmp(id, networks[i].id.c_str()) == 0) {
Serial.printf("Match for %s at %d\n", id, i);
return i;
}
Serial.printf("No match: '%s' vs '%s'\n", id, networks[i].id.c_str());
}
return -1;
}
@ -1049,7 +1053,8 @@ void loopWifiScan() {
int curidx = fetchWifiIndex(id);
if (curidx >= 0 && index == -1) {
index = curidx;
}
Serial.printf("Match found at scan entry %d, config network %d\n", i, index);
}
}
if (index >= 0) { // some network was found
Serial.print("Connecting to: "); Serial.println(fetchWifiSSID(index));