I just bought a WiFi shield and I cannot connect to my wireless network (WPA2).
- I used the sketch from the Arduino site for connecting to WPA network and put my SSID and password on but it doesn't connect (I know the credentials are correct as I used my phone to connect with these WiFi credentials).
- When I read the serial monitor it just keeps trying to connect. The WiFi-shield board error light is red
- I checked my network settings and my block level is at is lowest (NAT only).
Why can't I connect?
Anonymous Penguin
6,36510 gold badges34 silver badges62 bronze badges
asked Apr 3, 2014 at 4:19
2 Answers 2
In the loop:
// attempt to connect to Wifi network:
while ( status != WL_CONNECTED) {
Serial.print("Attempting to connect to WPA SSID: ");
Serial.println(ssid);
// Connect to WPA/WPA2 network:
status = WiFi.begin(ssid, pass);
// wait 10 seconds for connection:
delay(10000);
}
Can you add Serial.print(status);
before the delay so you can see if any of these arise:
- WL_IDLE_STATUS = 0
- WL_NO_SSID_AVAIL
- WL_CONNECT_FAILED
- WL_CONNECTION_LOST
- WL_DISCONNECTED
They are defined in wl_definitions.h
answered Apr 4, 2014 at 6:31
I was facing the same issue using the Feather M0 board from Adafruit. After updating the Arduino IDE as well as the IDE's libraries and firmware, I was able to connect to WiFi.
lang-cpp