Can't Get on WiFi

Good … morning?
I can’t get my ESP32 to connect to WiFi. I’ve been off it a year, but the libraries are all updated and the code should work.
I wrote this to test it:

#include <Arduino.h>
#include <WiFi.h>

const char *ssid = "64411811";
const char *password = "TP-Link_7C28";

void setup() {
  Serial.begin(9600);
  // put your setup code here, to run once:

  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);
  Serial.print("Connecting to WiFi ..");
  while (WiFi.status() != WL_CONNECTED)
  {
    Serial.print('.');
    delay(1000);
  }
  Serial.println(WiFi.localIP());
}

void loop() {
  // put your main code here, to run repeatedly:
}

I had a lower-case C in the SSID, but it’s correctly capitalized now.
I have a 2.4GHz router (connected to a 5GHz router).
Shouldn’t this connect to WiFi?

Erm… are your SSID and password definitions swapped over?

Cripes. I spent an hour scratching my head yesterday. Wow, what a goof.
Thanks.

1 Like

Brilliant catch Sir, I salute you!

Cheers,
Norm.

1 Like