Maker.io main logo

How to Update the NiNa Firmware on Arduino Boards

2022-04-11 | By Maker.io Staff

Various reasons can make it necessary for makers to update the NiNa firmware on wireless Arduino development boards. Some reasons include security updates, bug fixes, or minimum requirements when using the Arduino IoT cloud. Devices that do not run the minimum version of the wireless module firmware required by the Arduino IoT cloud can't establish a connection to the web-based service. This article explains the steps you have to take in order to update the NiNa firmware on a compatible development board.

What Tools Do You Need to Update the NiNa Firmware on an Arduino?

Luckily, updating the firmware on a compatible Arduino development board is a much simpler process than many might expect. To flash the newest firmware on the wireless module, you’ll only need to download and install a recent version of the Arduino IDE on a computer. Also, install the WiFiNINA or WiFi101 library using the Arduino IDE’s built-in library manager. The library you have to install depends on your development board. Install the WiFiNINA library if you use an MKR WiFi 1010, MKR Vidor 4000, Nano 33 IoT, or Uno WiFi Rev2 board. Choose the WiFi101 library if you have an Arduino MKR1000.

Check the Currently Installed Firmware Version

The Arduino IDE allows you to check the currently installed firmware version on compatible Arduino boards. This step is optional, but it can help you troubleshoot connectivity problems with the Arduino IoT cloud. Either way, load the ‘CheckFirmwareVersion’ example sketch in the Arduino IDE to inspect the currently installed firmware version on a supported Arduino board:

How to Update the NiNa Firmware on Arduino Boards Open the CheckFirmwareVersion sketch from the Arduino IDE’s examples section.

Then, connect the Arduino board to your computer and upload the example sketch to the board. Choose the correct port and device settings in the Arduino IDE before hitting the upload button. Once the upload finishes, the board should restart and display the firmware version in the IDE’s serial monitor:

How to Update the NiNa Firmware on Arduino Boards In this example, the Arduino already runs the latest available firmware. You may wish to update the firmware should the test output FAILED instead of PASSED.

Update the Wireless Firmware on An Arduino

In the image above, the firmware version sketch confirms that the most recent firmware is already installed on my Arduino board because I had updated it earlier. However, you’ll often have to perform an update before you can connect a wireless Arduino to the IoT cloud.

To perform an update, make sure to connect the board to your computer, close all serial monitor windows, and select the correct device and port in the IDE settings. Then, open the IDE’s firmware updater tool:

How to Update the NiNa Firmware on Arduino Boards Open the WiFi101 / WiFiNINA Firmware Updater from the Arduino IDE’s main menu bar.

Once the tool opens, make sure that the device shows up in the list of detected devices. Then, choose the firmware version you want to install using the second drop-down menu. You’ll typically want to install the most recent version:

How to Update the NiNa Firmware on Arduino Boards Make sure to select the correct device, port, and firmware version in the pop-up dialog. Then upload the updater sketch. Next, test the connection, and if the test succeeds, update the device’s firmware.

Next, click the “Open Updater Sketch” button next to the device list. Doing so brings up a new sketch that you have to compile and upload to the board you want to update. Once the upload finishes, you can use the “Test connection” button in the updater tool to confirm that the sketch works as intended.

Once you confirm that the board and the uploaded updater sketch are both operational, you can click the “Update Firmware” button to start the update process. Once the update process finishes, you should see a message like this:

How to Update the NiNa Firmware on Arduino Boards The tool will let you know once the update process finishes.

Note that the update process can fail, and it did not succeed twice on my board. If that happens to you, make sure to close all serial monitor windows that might be open. Also, close any Arduino IoT Cloud browser tabs, as the online serial console might also access the Arduino board. The Arduino board will remain operational, even if the update process fails, and you can repeat the update as many times as necessary.

Once the updater finishes flashing the firmware, make sure to re-upload any sketch you might have had uploaded to the Arduino board before you started the update procedure.

Check and Update the Firmware Using the Arduino IoT Cloud

You can also utilize the Arduino IoT cloud to check the Arduino’s wireless firmware version and update it if necessary. However, in many cases, you’ll have to update the firmware before the Arduino development board can establish a connection to the IoT cloud.

Either way, you can check and update the firmware once the Arduino connects itself to the cloud using the Arduino IoT cloud website:

How to Update the NiNa Firmware on Arduino Boards You can check the firmware version and update it using the Arduino IoT cloud if the wireless firmware on your Arduino is recent enough.

The website displays a device’s currently installed firmware version. Additionally, you might see an "Update" button next to the firmware version if there’s a newer version available.

Summary

At first, updating the wireless firmware on an Arduino board might seem like a complicated task. However, you only need the Arduino IDE and a suitable USB cable to connect the Arduino to your computer. Depending on your development board, you’ll have to additionally install the WiFiNINA or WiFi101 library using the Arduino IDE’s library manager. Then, you can use the IDE’s built-in updater to flash a new wireless firmware on the development board. Make sure to close all serial monitor instances and Arduino IoT cloud browser tabs before uploading the firmware to prevent the process from failing. You can repeat the upload process as many times as necessary without damaging the Arduino. You can also use the Arduino IoT cloud website to update the firmware once the board’s firmware version surpasses the minimum requirement.

制造商零件编号 ABX00023
ARDUINO MKR WIFI 1010
Arduino
¥267.08
Details
制造商零件编号 ABX00027
ARDUINO NANO 33 IOT
Arduino
¥134.96
Details
制造商零件编号 ABX00032
ARDUINO NANO 33 IOT WITH HEADERS
Arduino
¥219.78
Details
制造商零件编号 ABX00021
ARDUINO UNO WIFI REV2
Arduino
¥437.94
Details
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum