When I try to connect to a mobile phone hotspot, it gives code 6 one time and then it connects. Does anybody know why I cannot connect to my router while the password is correct? The router is using 2.4 GHz, 802.11 b/g/n
Code:
const char* ssid = "SSIDHERE";
const char* password = "Pass HERE";
void setup() {
Serial.begin(115200);
Serial.setDebugOutput(true);
WiFi.disconnect();
// We start by connecting to a WiFi network
Serial.println("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(3500);
Serial.print(".");
Serial.printf("Connection status: %d\n", WiFi.status());
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}