more debug output for wifi scan
This commit is contained in:
parent
b191f707dc
commit
c5ddec7a14
|
|
@ -434,7 +434,11 @@ void SetupAsyncServer() {
|
||||||
|
|
||||||
int fetchWifiIndex(const char *id) {
|
int fetchWifiIndex(const char *id) {
|
||||||
for (int i = 0; i < nNetworks; i++) {
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -1049,7 +1053,8 @@ void loopWifiScan() {
|
||||||
int curidx = fetchWifiIndex(id);
|
int curidx = fetchWifiIndex(id);
|
||||||
if (curidx >= 0 && index == -1) {
|
if (curidx >= 0 && index == -1) {
|
||||||
index = curidx;
|
index = curidx;
|
||||||
}
|
Serial.printf("Match found at scan entry %d, config network %d\n", i, index);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (index >= 0) { // some network was found
|
if (index >= 0) { // some network was found
|
||||||
Serial.print("Connecting to: "); Serial.println(fetchWifiSSID(index));
|
Serial.print("Connecting to: "); Serial.println(fetchWifiSSID(index));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue