Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By rodmcm
#50337 If I use
char Ssid[ ] = "mySSID";
char Password[ ] = "mypassword";
and
WiFi.begin (Ssid,Password);

I get a reliable connection

If I assign set up variables char Ssid[20 ]; and char Password [20 ]; and populate them with the same Ssid and Password names via Serial.read(), then I cannot get a connection even though the remaining characters in the arrays are Null, as would be expected with the end of a string.

I have tried making sure both arrays have values in them before enabling WIFI.begin... No luck either

Any thoughts or has anyone done this. What I am doing is Using a Nextion for the user to enter their SSID and password and return to them the IP address as connected.
User avatar
By martinayotte
#50342 I can't believe that both behaviours are not the same, simply because in WiFi.begin() both SSID and Password are copied using strcpy() into station_config structure.

It must be some stupid mistake in your code, such as you are not removing "\r\n" from Serial input.