I have a brand new MKR WiFi 1010 that won't connect to my local Wi-Fi network and I can't figure out why. I'm using the code generated by the Arduino Cloud, and I've tried the SSID for my local public Wi-Fi network, and my Guest network.
// attempt to connect to WiFi network:
Serial.print("Attempting to connect to WPA SSID: ");
Serial.println(ssid);
while (WiFi.begin(ssid, pass) != WL_CONNECTED) {
// unsuccessful, retry in 4 seconds
Serial.println("failed ... ");
delay(4000);
Serial.print("retrying: ");
Serial.println(ssid);
}
}
The sketch repeatedly fails, then retries over and over and over again. The Device is just a few feet from my HotSpot (Google Wi-Fi) and I've tried it across the room. I have a few devices in this room connected to the hotspot with no problems. I've unplugged the Google Wi-Fi device and plugged it back in again. I've unplugged the MKR 1010 and even held the reset button down to reset it.
Its a brand new board, but I think it's broken. There was a card in the box telling me the antenna is fragile, but you know, I can't find any picture or image that shows me what the antenna is. Looking at the back of the card, I see a diagram that I think is showing me the antenna, but I've not touched it.
It doesn't feel like there's a lot I can do to troubleshoot it. What am I missing?
// check for the presence of the shield:
if (WiFi.status() == WL_NO_SHIELD) {
Serial.println("WiFi shield not present");
// don't continue:
while (true);
}
and when I run it, it tells me the shield isn't present. Bad board?
Make sure you have the WiFiNINA examples loaded and use them only. Dont use the examples for the WiFi101 as they will not work due to the way the WiFi module talks to the SAMD MCU
You may want to try to a 2.4g wirless connection first to try those examples out.
And btw there is a specific section for the MKR series boards including the 1010.
@ballscrewbob, the way WiFiNiNA library talks to WiFi module is SPI, same as with WiFi101. even the low level protocol for exchange with firmware is almost the same.
A belated reply...
I had the same issue. I had a Wifi sketch that worked on the MKR Wifi 1010, then I had to change Wifi router and then sketched stopped working. It could see the new router, but wouldn't connect.