Device fails to connect to Arduino Cloud: "ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to iot.arduino.cc:8883 Error: -2"

Continuing the discussion from Arduino Nano 33 IoT - cannot get connected to IoT cloud:

Hello,
To tell I have the exact same issue than you, and I am still stuck...
My device has the connectivity module firmware version 1.5.0
When I look at device list I see Nano33_1 with connectivity module 1.4.8 --> issue or not ??
I followed the steps recommended by Dozie : ( post #9) to create anlog_value variable reading A1 output.
After upload, I can see on local wifi network that the device is connected with IP 192.168.1.28
image

After upload the device is still offline.

Hi, I have done again compilation/upload from arduinoIDE cloud v2.3.2, and I see some more informations:
(with setDebugMessageLevel(4); )

In the log ( file attached ) some warnings which do not stop the compilation saying warning: backslash and newline separated by space

nano33_test_may25a.log (1,0 Mo)

Then in serial monitor I see the following:

20:06:26.752 -> ***** Arduino IoT Cloud - configuration info *****
20:06:26.752 -> Device ID: 7ba2eebb-95dd-45f4-a2f7-de53ec9bf700
20:06:26.752 -> MQTT Broker: iot.arduino.cc:8883
20:06:26.752 -> WiFi.status(): 0
20:06:26.752 -> Current WiFi Firmware: 1.5.0
20:06:28.530 -> Connected to "SFR_2960"
20:06:28.670 -> TimeServiceClass::sync Drift: -769975586 RTC value: 1716660388
20:06:43.787 -> ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to iot.arduino.cc:8883 Error: -2

This last error could be te reason why the thing stay OFFLINE???
What is the function of handle_ConnectMqttBroker routine??
thx

fyi the libraries version used for compilation :slight_smile:
library ArduinoIoTCloud at version 2.0.0
library Arduino_ConnectionHandler at version 0.8.1
library Arduino_DebugUtils at version 1.4.0
library WiFiNINA at version 1.8.14
library ArduinoMqttClient at version 0.1.8
library Arduino_SecureElement at version 0.1.2
library ArduinoECCX08 at version 1.3.8
library Wire at version 1.0
library SNU at version 1.0.2
library ArduinoHttpClient at version 0.6.0
library RTCZero at version 1.6.0 in folder:
library Adafruit SleepyDog Library at version 1.6.5
library SPI at version 1.0

Anything outdated???

my serial monitor is now displaying, but my device still not uploading the sketches (just "verifying" the code)

I got this issue, but I'm not sure how it has gone.
Suggestion : Download the arduino IDE cloud

(You need to install missing libs like arduinoCloudThing
And from there I never got this problem...

You should then get the mqtt connect error...may be

A post was merged into an existing topic: Arduino Nano 33 IoT - cannot get connected to IoT cloud

We have the same issue.

Hi @gimont31 @ramoutcn

by any chance do you have something connected to the external i2c pins of the board. If yes try to disconnect everything from the board.

Is the device id printend on the serial monitor matching the one registered on the device tab of the iot application app.arduino.cc/devices ?

1 Like

Hi pennam, I had nothing connected to the board, but I saw the device ID in serial monitor different from the device ID shown at https://app.arduino.cc/devices.
I have deleted thing, device, dashboard and restarted from scratch, and... SUCCESS my device is online!!!
Not sure about what I did previously.
Thank you !!

1 Like

@gimont31 Great! Thanks for the feedback if board device-id and cloud device-id are different the board can't authenticate connecting to the broker.

Maybe you have more than one nano 33 iot and the one you where using was provisioned some time ago and then deleted from the cloud...

1 Like

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