Hello,
I'm trying out this Arduino Cloud thing for the first time in a while. I'm trying to add my MKR WiFi 1010 to the Cloud editor via the "Add Device" button. The downloaded program flashes something to the Arduino fine, then sits at "Updating your board for improved setup" indefinitely. I have also found an Arduino Opta related post on what appeared to be the same issue, someone mentioned it's a known bug and to try creating a thing and then adding a device from inside the thing. This workaround worked for them but not for me.
I've tried firefox and chrome via USB on both and bluetooth on chrome. No difference.
I opened the cloud agent debug console and every few minutes it outputs the following:
{
"P": "COM13",
"D": "VaoCAAraAAEgAIEYZBwyqlU="
}
{
"P": "COM13",
"D": "VaoCAETaAAEgAYZpTVRXX0d1ZXN0ODNqTVRXX0FjY2Vzczg1eB9ESVJFQ1QtREMtSFAgRGVzaWduSmV0IFQ4MzAgTUZQOE3QEapV"
}
A couple characters change each time, but I have to wonder if it's not actually doing anything. It's been at it for an hour or so and will still be going until someone posts a reply to this. I've also flashed a blink sketch a couple times to wipe (I'm assuming part of the devices' flash). I've also tried the USB on my thunderbolt 4 monitor and my laptops internal USB port.
Thank you in advance
Hi @sparctan. The MKR WiFi 1010 board has a module that provides functionality such as Wi-Fi and Bluetooth communication. This module is referred to by the name "NINA". This module has an ESP32 microcontroller, which runs a custom open source firmware created by Arduino.
I investigated and found that the problem you encountered occurs when the NINA module on your board has an outdated firmware version. Ideally Arduino Cloud would handle updating the firmware automagically, but apparently this is not happening.
I apologize for any inconvenience this has caused. I notified the Arduino Cloud developers of the problem.
Solution
The workaround will be to update the firmware on your board's NINA module to the latest version. The easiest way to do that is by using Arduino IDE. I'll provide instructions you can follow to do that:
â There is an alternative approach, which is to use the Arduino Firmware Uploader command line tool.
- If you don't already, install Arduino IDE on your computer:
https://docs.arduino.cc/software/ide-v2/tutorials/getting-started/ide-v2-downloading-and-installing
- Start Arduino IDE.
- If you haven't already, use Boards Manager to install the "Arduino SAMD Boards (32-bits ARM Cortex-M0+)" platform:
https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-board-manager
- If you haven't already, use Library Manager to install the "WiFiNINA" library:
https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-installing-a-library#installing-a-library
- Select Tools > Board > Arduino SAMD Boards (32-bits ARM Cortex-M0+) > Arduino MKR WiFi 1010 from the Arduino IDE menus.
- Select the port of the MKR WiFi 1010 board from Arduino IDE's Tools > Port menu.
- Select File > Examples > WiFiNINA > Tools > FirmwareUpdater from the Arduino IDE menus.
The "FirmwareUpdater" sketch will open in a new Arduino IDE window.
- Select Sketch > Upload from the Arduino IDE menus.
Arduino IDE will start an upload operation.
- Wait for the upload to complete successfully.
- Connect the MKR WiFi 1010 board to your computer with a USB cable.
- Select the port in the Arduino IDE.
- Select Tools > WiFi101 / WiFiNINA Firmware Updater from the Arduino IDE menus.
The "Firmware Updater" dialog will open.
- Select the Arduino MKR WiFi 1010 board from the "Select Board" menu in the "Firmware Updater" dialog.
- Click the "Check Updates" button.
After a short delay, a "Select firmware version" menu and "INSTALL" button will appear in the dialog.
- Click the "INSTALL" button.
The message at the bottom of the dialog will change to "Installing firmware."
- Wait for the firmware installation process to finish successfully.
- Click the X icon in the dialog.
The dialog will close.
- Select File > Quit from the Arduino IDE menus.
All Arduino IDE windows will close.
Now try creating the Device in Arduino Cloud once again. Hopefully everything will work as expected this time.
Please let us know if you have any questions or problems while following those instructions.
Wow, holy Arduino guru. Thank you for looking into my issue. And didn't know there was an ESP32 in the MKR lol. I guess that makes sense as that's what most other wifi Arduinos use.
In the Arduino IDE (after installing the board and wifinina library and flashing wifinina's FirmwareUpdater) I went into tools > firmware updater and opened it there. I didn't see a wifinina specific firmware updater, just the regular firmware updater. I am on IDE version 2.3.10.
Nonetheless, selected board, check for updates, install version 3.0.1, try the cloud thing again, same exact problem. I tried firefox and chrome via USB, and let it sit for about 30 minutes each time, watching the log. I've also closed all Arduino IDE instances in case there is weirdness with the serial port, and restarted my computer.
I went and flashed wifinina's firmware sketch, we are indeed on 3.0.1, I wish I would have done that before updating out of curiosity but oh well. I exported the log, but can't upload it because my forum account is brand new but if you want me to send it somewhere (or even just pastebin if that's allowed) I can definitely do that.
It looks like the board is definitely flashed with the cloud firmware. The blue light stays on while flashing, if I quit the updater, the blue light starts flashing every few seconds (like it's in bluetooth pairing mode). I can then go and try to add it via bluetooth in chrome, it connects up fine, but when you click "continue" it just sits and spins. Can't see the log there to see if anything is happening but it's been about 10 minutes.
Thanks for your time
Your board side is actually working. Those "D" payloads in the agent console are base64. Decode them and they're your Wi-Fi scan list: MTW_Guest, MTW_Access, the HP DesignJet direct network. So the provisioning sketch is running and talking over COM13, and it's the web page that isn't moving on.
Things to try:
- Close the IDE, any serial monitor, and any other tab with Cloud open. Only one thing can hold COM13.
- Update the Arduino Cloud Agent and restart it, then rerun Add Device in one browser tab.
- If MTW_Guest is a captive-portal network or MTW_Access is WPA2-Enterprise, the 1010 can't join either one. Test with a phone hotspot (2.4 GHz, WPA2) first.
- Update the NINA firmware with the IDE's firmware updater before retrying.
If it still hangs with the hotspot, it's on Arduino's end and worth a support ticket with that console log.
Huh, enlightening. Thanks for the insight.
I have not gotten to the point of being able to ask it to connect to any WiFi networks. I guess that would explain why it changes slightly between messages. Signal strength fluctuations, probably. I agree the problem is probably more on the Arduino Cloud stuff side. If it's scanning for WiFi networks, it should be done with the flashing and rebooting.
Worth mentioning again that restarting the process makes me flash it again (even if now I can start the process over bluetooth) and just ends up in this same place again.
I just downloaded the cloud agent yesterday, but it is version 1.7.0-87f097b. It should have my COM13 all to itself.
I can spin up a hotspot but probably won't do much if it's not to the point of asking me which one to connect to. This might be something I should take to Arduino if Ptillisch has not already.
Hi @sparctan. The Arduino Cloud developers have informed me that the bug I mentioned in my previous reply has been fixed.
Please try again. Hopefully everything will work as expected now.
Just let us know if you still encounter any problems.
That's a pretty fast bug fix turnaround time, nice.
Unfortunately though still having the same issue... Tried firefox/chrome USB and bluetooth via chrome (can only try bluetooth after going through the process then quitting once the device starts scanning for wifi)
Nothing is connected to the arduino either physically. Restarted the computer as well. I'm assuming the Arduino team would like to see the logs so let me know where to send them
Thanks for your help
The issue remains, I went ahead and submitted a support ticket to Arduino. I'll report back here with the findings.
Thanks for your guys' time