ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to iot.arduino.cc:8885 Error: -2

Greetings,

I have used the Arduino MKR Wifi 1010 in the past on the Arduino cloud without issues. I recently purchase a new MKR Wifi 1010 and tried to add it as a device on the Arduino cloud, however, after two days of trying every suggestion I could find, including some suggestions from the AI community, I have not succeeded to connect my new, or old MKR Wifi 1010.

I follow the standard procedure to create a device, a thing, variables, attached device, update network. I increased the logging level in the sketch created and the message is:

***** Arduino IoT Cloud - 2.7.0 *****

Device ID: f8725b6e-2996-402e-bad5-99479f4b5286

MQTT Broker: iot.arduino.cc:8885

WiFi.status(): 0

Current WiFi Firmware: 2.0.0

Connected to “<Deleted for security>”

TimeServiceClass::sync done. Drift: -808156240 RTC value: 1754841042

ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to iot.arduino.cc:8885 Error: -2

Environment:

Cloud IDE

MKR Wifi 1010

Latest version of firmware

Operating systems used: MacOS Sequoia, Windows 11

Latest version of Agent

I have exactly the same issue.
Used different device, account, wifi, new code, flashed the device again. Tried a Windows and Mac computer too with all the above changes.

I believe it has to do with the latest security improvements. I believe that when you create a new device, the procedure for the MKR Wifi 1010 generates a unique UUID and writes it to the device and registers the new UUID with the cloud. The problem seems to be that the UUID written to the device and the one on the cloud do not match and when you try to connect, the MQTT server cannot establish the trust because it does not recognize the UUID that is sent when the connection attempt is initiated.

Not sure how to fix it and hoping to get confirmation of the issue and a solution from the Arduino technical staff.

It seems almost certain it is a security/certificate/ID clash! I’ve tried multiple devices (Arduino Nano 33 IoT), multiple computers (Mac and Windows) and multiple networks, in and out of my house. Turned all firewalls off (briefly). Fingers crossed it’s on the next update. A disabled Lift in my house made it easier for my kids to call as I rewired the remote and they have the dashboard on their phones. Thankfully, I kept the physical keys working as well. They just have to call me to press them!

Wow. I’ve been working this for 2 days. Exactly the same serial monitor report about the MQTT Broker and Port 8885. AI says this is a deal breaker. I too checked my WiFi router, my ISP Modem. I even changed to a Verizon Hot Spot on my phone. Same error. I tried on 2 PC’s and a Mac. I ran the same sketch on 3 different MKR WiFi 1010 Opla boards. Same error. AI says to delete your account and restart. But that seems extreme. Is there any update on this? I submitted and email help support request. I have a one-off data collection project due Saturday. I really need to get this working (I inherited the Opla kits from the previous project lead and “must” mke these work).

1 Like

I have also requested technical support, but I have not response yet. I also have projects that are delayed due to this issue and I am hopeful there is a quick/easy solution.

1 Like

No joy for me yet. Don’t bother with a new account. I have one for work and one for home stuff. Same issue on both!

Thank you rorysteel, I was going to try this option in a desperate attempt to get going again. Now that I know it does not work, I will avoid this hassle. :smiling_face_with_sunglasses:

Received this email from Arduino support last night. I was traveling to my work site and just read it.

Arduino suppor:
Hello,

Thanks for contacting Arduino Support.

The handle_ConnectMqttBroker error is usually connected to issues during the setup of the Thing. Make sure to follow the Activity instructions to set up the Thing correctly.

As a first approach, follow the steps below:

  1. Check that you have the latest version of the NINA Firmware installed on your device and update if necessary.
  2. Check the firewall settings on your computer. The firewall can sometimes block the communications between the computer and the Arduino IoT Cloud. Make sure that the following domains are whitelisted:

I received a response from Arduino technical support. Initially, the response was similar to what I had seen in other posts, which I tried and they did not work. However, after close review, I noticed that while the steps were similar, the order was different. Just for fun, I tried the EXACT procedure sent by technical support and it worked on both my bricked MRK Wifi 1010’s.

Here is the response from technical support. The main difference to this procedure is the order of the steps. Previously, I began the procedure with a new device, then thing, variables, code, Wifi, upload. As indicated in the procedure sent, I started with a new thing with all variables, code, etc. When I linked to device, I selected the option to create new instead of using existing. Not sure exactly what the difference is, but I do know that is worked for both devices that were previously unable to connect to the Arduino cloud.

Elizabeth Esparza (Arduino)

Aug 13, 2025, 00:31 GMT+2

Hello William,

Thanks for contacting Arduino Support.

As the first approach, we would like to recommend you to try the following:

1. Open the "Things" page: https://app.arduino.cc/things

2. Click the "+ THING" button to create a Thing (or if you have an existing Thing you want to use, select that instead).

3. Click the "Select Device" button under the "Associated Device" section of the Thing page.

4. Click the "SET UP NEW DEVICE" button in the "Associate device" dialog.

5. Click the "Arduino board" button in the "Setup Device" dialog.

6. Complete the Device creation process.

Please feel free to let us know if you have any questions or updates.

Best regards,

Elizabeth E.

1 Like

I tried this step sequencing first. It didn’t work. I followed Arduino Tech’s response to my original email by port-forwarding or “whitelisting” the 3 MQTT addresses/ports in my Norton 360 Anti-virus software Firewall “traffic manager”. Then I followed the order you show in your email response. I’m not sure what was the ultimate fix, but after doing both sets of things my setup now works on the IoT Cloud.

The only thing not working for me now is the Thing Variable units paramete for temperature. For temperatures you have 4 choices: a simple FLOAT, a Cloud Temperature (supposed to give you a widget choice for F or C units), a Cloud Temperature Sensor-F and Cloud Temperature-C. I need my results in degrees F. My dashboard only displays the value in Celsius no matter what I do. I’m using the Dallas Semiconductor DS18B20 digital “smart” temperature sensors. The Arduino Cloud Editor sets up the properties and declarations based on choosing one of the 4 temperature variables.

In any case, i’m removing old cobwebs for controller software that I’ve long forgotten. I have plans for some other projects using this little MKR controller. For my immediate project, I’m probably going to have to go to an UNO or maybe even a small PLC because the cloud based data collection and the simple dashboard display choices aren’t going to be good enough.

Hey thanks for the email correspondence. This is how we solve problems. Good luck.

Stu

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.