ESP8266WiFi library trouble

Hi,

Having issues here, cannot get my wemos boards to work, tried twi one D1R2 and one mini, same thing, when using this example:

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

WiFi.begin(“somethingsomething”, “123456”);

Serial.print(“Connecting”);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println();

Serial.print("Connected, IP address: ");
Serial.println(WiFi.localIP());
}

void loop() {}

it does not change SSID from factory default to the set value, when I connect to the factory set network it connects fine, but nothing happens in the Serial monitor, still keeps telling me that it is connecting.

Any good ideas?

urmas1985:
Any good ideas?

Yes.
Please read "Read this before posting a programming question" at the top of the forum and post your sketch using code tags.

urmas1985:
it does not change SSID from factory default to the set value, when I connect to the factory set network it connects fine, but nothing happens in the Serial monitor, still keeps telling me that it is connecting.

Factory default??
If nothing happens in the serial monitor, how do you know what it's connecting to?
Is your router running WEP or WPA security?

WiFi.begin("somethingsomething", "123456");That is not a valid password, minimum length is 8 characters. In connecting as STA I suppose you would always fill out the correct password. If you want to set it up as an AP (for which you do need to do a bit more..) it is a common 'pitfall'

what you see is SoftAP because it is on by default. so you can connect to it, but the sketch has no service programmed.

your sketch attempts to connect to an Access Point. do you have one and are the SSID and password valid for it?

"what you see is SoftAP because it is on by default. so you can connect to it, but the sketch has no service programmed.

your sketch attempts to connect to an Access Point. do you have one and are the SSID and password valid for it?"

Hey, thanks that worked! Been banging my head against that wall for hours now.