MKR 1010 not connecting to WPA2 secured networks


@yum - I solved the drop/reconnect issue. In Loop I just placed...

1.) Instead of: while (WiFi.status() != 3) you should rather write while (WiFi.status() != WL_CONNECTED) ... more readable, when you use the enums

2.) yes, yes, this would be the code for connecting or re-connecting, but the real problem is that the program is executing somewhere in your code and in my particular case it gets stuck at the line: if(client.connect(server, 443)) within ESP8266TelegramBOT.cpp. When there is an inadvertent cut of the WAP (no more WiFi) the program waits there (forever?) and you do not know that you would have to jump out and reconnect WiFi.

I am working on a solution with watchdog timer / timer interrupt to overcome this problem.


@tatulea - not connecting:

In addition you could try: WiFi.end(); along with WiFi.disconnect();

@tatulea - not working on router WAP, but on phone hotspot:

I encountered the same problem, before I discovered the solution above. Phone hotspot WAP did work sometimes, router WAP nearly never.

I have no idea why, but today it is connecting to router as well by two or three attempt.

The code is

while (WiFi.status() != WL_CONNECTED) {
    Serial.print("Attempting to connect to WPA SSID: ");


And the very next day it will not again not work ... ;) . Let us know your next experiences!

I had the same connection problem for days. My MKR wifi 1010 could connect perfectly to my Mobile hotspot, but was almost impossible to connect it to my home router (Virgin Media Super Hub 2ac). Then I reserved the IP for MKR inside my router DHCP and all problems have been solved immediately. I hope this could helps.


Hi, I have a MKR WiFi 1010 running FW 1.2.1 and version 1.3.0 of the WiFiNINA WiFi libs and I am running into an issue where the board does not consistently connect to my WPA2 router. The router has the SSID broadcast off but this did not pose an issue with the MKR1000. I end up having to load the WiFi sketch multiple times until the board will connect to the router. This seems to be the same with either WiFiWebClient or ConnectWithWPA where the board will not consistently connect to the router. I also have a MKR1000 and it is able to connect to the same router with the same credentials consistently so I am not sure why the MKR WiFi would not work the same.

My problem is the example MKR 1000 > ConnectWithWAP after setting the secret ID and password the serial screen only returns utpu Attempting to connect to WPA SSIDS: HOMEbase Attempting to connect to WPA SSIDS: HOMEbase Attempting to connect to WPA SSIDS: HOMEbase and over again.

All my other phones and ipad connect to the same boardband modem Archer C5 V4 (firmware is current).

I even assigned the device's MAC address with an IP address - still get the same response.

Is the mkr 1000 wifi not operational


The MKR’s are 2.4G not 5G so make sure that is what you are connecting to.

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.

Posting tips.

  • Always list the version of the IDE you are using and the board version if applicable.
  • How to insert an image into your post. ( Thanks Robin2 )
  • Add your sketch where applicable but please use CODE TAGS ( </> )
  • Add a SCHEMATIC were needed even if it is hand drawn
  • Add working links to any specific hardware as needed (NOT links to similar items)
  • Remember that the people trying to help cannot see your problem so give as much information as you can