Remove the hidden column

This commit is contained in:
Lucidiot 2021-06-25 17:25:10 +02:00
parent 4eceea78fc
commit fec52e8468
1 changed files with 24 additions and 5 deletions

View File

@ -9,7 +9,14 @@ void setup() {
WiFi.mode(WIFI_STA); WiFi.mode(WIFI_STA);
WiFi.disconnect(); WiFi.disconnect();
Serial.printf("ssid%schannel%ssignal%sencryption%sbssid%shidden%s", COLUMN_SEPARATOR, COLUMN_SEPARATOR, COLUMN_SEPARATOR, COLUMN_SEPARATOR, COLUMN_SEPARATOR, ROW_SEPARATOR); Serial.printf(
"ssid%schannel%ssignal%sencryption%sbssid%s",
COLUMN_SEPARATOR,
COLUMN_SEPARATOR,
COLUMN_SEPARATOR,
COLUMN_SEPARATOR,
ROW_SEPARATOR
);
} }
void loop() { void loop() {
@ -19,14 +26,14 @@ void loop() {
String ssid; String ssid;
uint8_t encryptionType; uint8_t encryptionType;
int32_t RSSI; int32_t rssi;
uint8_t* BSSID; uint8_t* bssid;
int32_t channel; int32_t channel;
bool isHidden; bool isHidden;
String encryptionText; String encryptionText;
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
WiFi.getNetworkInfo(i, ssid, encryptionType, RSSI, BSSID, channel, isHidden); WiFi.getNetworkInfo(i, ssid, encryptionType, rssi, bssid, channel, isHidden);
switch (encryptionType) { switch (encryptionType) {
case ENC_TYPE_WEP: case ENC_TYPE_WEP:
@ -52,7 +59,19 @@ void loop() {
encryptionText = String(encryptionType); encryptionText = String(encryptionType);
} }
Serial.printf("%s%s%d%s%d%s%s%s%s%s%u%s", ssid.c_str(), COLUMN_SEPARATOR, channel, COLUMN_SEPARATOR, RSSI, COLUMN_SEPARATOR, encryptionText.c_str(), COLUMN_SEPARATOR, WiFi.BSSIDstr(i).c_str(), COLUMN_SEPARATOR, isHidden, ROW_SEPARATOR); Serial.printf(
"%s%s%d%s%d%s%s%s%s%s",
ssid.c_str(),
COLUMN_SEPARATOR,
channel,
COLUMN_SEPARATOR,
rssi,
COLUMN_SEPARATOR,
encryptionText.c_str(),
COLUMN_SEPARATOR,
WiFi.BSSIDstr(i).c_str(),
ROW_SEPARATOR
);
} }
delay(1000); delay(1000);