Hello I have a couple of Nano 33 IOT and they both can no longer connect to the cloud. They worked beautifully for months, then were switched off, and now a few months later neither works.
The symptom is they boot and connect (my router shows the connection active) but then go into a loop printing:
ArduinoIoTCloudTCP:handle_ConnectMqttBroker could not connect to iot.arduino. cc:8885 Error: -2
Stuff I tried -
Moving to a different LAN/router.
Installing new firmware on board
Uploading SSL root certificates
Updating all libraries and recompiling
completely deleting the device in the cloud management and adding again
Nothing has worked so far and I have not been able to figure out how to get either back online. I am using a Mac to compile, it was originally built on Ubuntu. All the software and agents seem to work fine on the Mac and are the latest versions.
recently, the certificate exposed by the MQTT broker has been changed, and the old boards' certificates have been invalidated. If you compile with the cloud editor, your board's certificate will be automatically migrated. If you use the IDE or the cli, please follow this procedure:
Go to the Thing page and execute a “detach” from the Associated Device section
You can go to Devices page, look up for the Device that you just detached from the Thing and delete it
You can safely delete the device that was attached to your Thing; this will not delete any historical data or sketch (they are all stored in the Thing
Go to Devices, use “Create new” and setup a new device with your board connected via USB
Once done, go to the Thing page in Associated Device section (where you detached the device) and attach it to the new device using the “Select Device” button
At this point, still using USB cable, either
Open Arduino IDE
make sure the Arduino IoTCloud library is updated at the new 2.3.1 version
Upload your IoT sketch with the upload function
Using Arduino CLI
Ensure Arduino IoTCloud library is updated at the new 2.3.1 version with the “lib install” command
Execute compile and upload commands to flash to your board
From this point, the device will connect and start working again as before, with an updated security identity.
I was pretty sure I had done this last night, and when I tried again it still didn't work. I deleted the device again, reassociated with the thing, and pushed the code from the cloud.
That didn't seem to help.
I also verified that locally I am using Arduino IoTCloud library 2.4.0 in the IDE as updated from yesterday. But 2.4.1 is available just now so I updated to that, and presto, everything works again (after recompile and push)!
Thanks very much for your help and suggestions. I am not 100% sure, but it does seem like the 2.4.1 library was the answer for me. Unless I mangled a step somewhere.