diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index 026073422..e82314f00 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -129,8 +129,8 @@ void CmndWifiScan(void) char stemp1[20]; ResponseAppend_P(PSTR("{")); for (uint32_t i = 0; i < WiFi.scanComplete(); i++) { - ResponseAppend_P(PSTR("\"" D_STATUS5_NETWORK "%d\":{\"" D_SSID "\":\"%s\", \"" D_BSSID "\":\"%s\", \"" D_CHANNEL - "\":\"%d\", \"" D_JSON_SIGNAL "\":\"%d\", \"" D_RSSI "\":\"%d\", \"" D_JSON_ENCRYPTION "\":\"%s\"}"), + ResponseAppend_P(PSTR("\"" D_STATUS5_NETWORK "%d\":{\"" D_SSID "\":\"%s\",\"" D_BSSID "\":\"%s\",\"" D_CHANNEL + "\":\"%d\",\"" D_JSON_SIGNAL "\":\"%d\",\"" D_RSSI "\":\"%d\",\"" D_JSON_ENCRYPTION "\":\"%s\"}"), i+1, WiFi.SSID(indexes[i]).c_str(), WiFi.BSSIDstr(indexes[i]).c_str(), @@ -139,7 +139,7 @@ void CmndWifiScan(void) WifiGetRssiAsQuality(WiFi.RSSI(indexes[i])), GetTextIndexed(stemp1, sizeof(stemp1), WiFi.encryptionType(indexes[i]), kWifiEncryptionTypes)); if ( ResponseSize() < ResponseLength() + 300 ) { break; } - if ( i < WiFi.scanComplete() -1 ) { ResponseAppend_P(PSTR(", ")); } + if ( i < WiFi.scanComplete() -1 ) { ResponseAppend_P(PSTR(",")); } //AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_WIFI "MAX SIZE: %d, SIZE: %d"),ResponseSize(),ResponseLength()); } ResponseJsonEnd(); diff --git a/tasmota/tasmota_support/support_wifi.ino b/tasmota/tasmota_support/support_wifi.ino index e715b0429..9b51525de 100644 --- a/tasmota/tasmota_support/support_wifi.ino +++ b/tasmota/tasmota_support/support_wifi.ino @@ -358,7 +358,7 @@ void WifiBeginAfterScan(void) Wifi.scan_state++; ResponseClear(); - + uint32_t initial_item = (Wifi.scan_state - 9)*10; if ( wifi_scan_result > initial_item ) { @@ -380,8 +380,8 @@ void WifiBeginAfterScan(void) char stemp1[20]; uint32_t end_item = ( wifi_scan_result > initial_item + 10 ) ? initial_item + 10 : wifi_scan_result; for (uint32_t i = initial_item; i < end_item; i++) { - Response_P(PSTR("{\"" D_CMND_WIFISCAN "\":{\"" D_STATUS5_NETWORK "%d\":{\"" D_SSID "\":\"%s\", \"" D_BSSID "\":\"%s\", \"" D_CHANNEL - "\":\"%d\", \"" D_JSON_SIGNAL "\":\"%d\", \"" D_RSSI "\":\"%d\", \"" D_JSON_ENCRYPTION "\":\"%s\"}}}"), + Response_P(PSTR("{\"" D_CMND_WIFISCAN "\":{\"" D_STATUS5_NETWORK "%d\":{\"" D_SSID "\":\"%s\",\"" D_BSSID "\":\"%s\",\"" D_CHANNEL + "\":\"%d\",\"" D_JSON_SIGNAL "\":\"%d\",\"" D_RSSI "\":\"%d\",\"" D_JSON_ENCRYPTION "\":\"%s\"}}}"), i+1, WiFi.SSID(indexes[i]).c_str(), WiFi.BSSIDstr(indexes[i]).c_str(),