Chinese character SSID garbled,Cannot connect network

soonrobot
Posts: 3
Joined: Sat Aug 19, 2017 5:47 pm

Chinese character SSID garbled,Cannot connect network

Postby soonrobot » Tue Aug 29, 2017 4:21 pm

Code: Select all

#include "WiFi.h"

void setup() {
	Serial.begin(115200);

	// WiFi.mode(WIFI_AP_STA);
	WiFi.mode(WIFI_STA);

	Serial.println("\n\n\nTansys_>");
	Serial.println("WiFi.getAutoConnect() => "+String( WiFi.getAutoConnect() ));

	Serial.printf("SSID:%s\r\n", WiFi.SSID().c_str());  //
	Serial.printf("PSW:%s\r\n", WiFi.psk().c_str());    //

    WiFi.begin( WiFi.SSID().c_str(), WiFi.psk().c_str() );
    long tm = millis();
    while( WiFi.status() != WL_CONNECTED && millis()-tm < 1000*8 ) {
        delay(500);
        Serial.print(".");
    }

	if( WiFi.status() == WL_CONNECTED ){
		Serial.print("IP Address: ");
		Serial.println(WiFi.localIP());

	}else{

		WiFi.beginSmartConfig();

		Serial.println("Waiting for SmartConfig.");
		while (!WiFi.smartConfigDone()) {
			delay(500);
			Serial.print(".");
		}

		Serial.println("");
		Serial.println("SmartConfig received.");

		Serial.println("Waiting for WiFi");
		while (WiFi.status() != WL_CONNECTED) {
			delay(500);
			Serial.print(".");
		}

		Serial.println("WiFi Connected.");

		Serial.print("IP Address: ");
		Serial.println(WiFi.localIP());
	}

}

void loop() {

}
Description:

1.SSID returns empty,I have modified the“ WiFiSTA.cpp”。
2.Chinese character SSID garbled,Cannot connect network!
p1.png
p1.png (10.28 KiB) Viewed 3766 times
p2.png
p2.png (19.95 KiB) Viewed 3766 times
p3.png
p3.png (54.51 KiB) Viewed 3766 times

Who is online

Users browsing this forum: No registered users and 48 guests