Skip to content

Updating Firmware

Danger

Please think very carefully before uploading any Arduino sketches to your DataLogger IoT.

You will overwrite the DataLogger IoT firmware, leaving it unable to update or restore itself.

Each DataLogger IoT comes pre-programmed with amazing firmware which can do so much. It is designed to be able to update itself and restore itself if necessary. But it can not do that if you overwrite the firmware with any Arduino sketch. It is just like erasing the restore partition on your computer hard drive. Do not do it - unless you really know what you are doing.

Really. We mean it.

Firmware Update - SD Card

This action enables the ability to update the onboard firmware to an image file contained an SD card. This user is presented a list of available firmware images files contained in root directory of the on-board SD card, and updates the board to the selected file.

This option is available on ESP32 devices that contained two update firmware (OTA type) partitions within the on-board device flash memory. Consult the specific products production and build system for further details.

To download the latest firmware and update through the microSD card, you will need to head to the GitHub repository containing the firmware. Select the firmware version and download.

Once downloaded, insert the microSD card into a card reader or USB adapter. Then move the files into the memory card's root directory. Below shows an image of v01.00.01 and v01.00.02 on a Windows OS.

Once the files are copied to the memory card, eject the microSD card from your computer. Insert the card back into the DataLogger IoT's microSD card socket. Connect the DataLogger IoT to your computer using a USB cable.

Insert MicroSD Card DataLogger IoT Connecting USB

Note

What's going on here?!? This tutorial was updated for firmware version 01.01.00!!! You will notice this menu option has changed to 17 !!!

Open a Serial Terminal, connect to the COM port that your DataLogger enumerated to, and set it to 115200 baud. In this case, we connected to COM13. Press any key to enter the Main Menu. Type 1 to enter the Settings menu. Then type 17 to enter the System Update Menu. Finally, type 3 to update the firmware from the microSD card. You should see an image similar to the output below.

The system will search the root directory of the on-board SD card for available firmware files. The firmware files are selected using the following criteria:

  • The file is contained in the root "/" folder of the SD card.
  • The filename has a ".bin" extension.
  • The filename starts with a specified name prefix. The prefix is optional and is set by the developers at SparkFun using this action.
    • For example, the DataLogger IoT boards use a prefix value of "SparkFun_DataLoggerIoT_".

Once a file is selected, the system new firmware is read off the SD card and written to the device.

And once updated, the system is rebooted and starts using the new firmware image!

Firmware Update - Over-the-Air (OTA)

This action enables the ability to update the onboard firmware to an image file contained on an update server, which is accessed via the WiFi network the system is connected to. This Over-The-Air (OTA) capability contacts the systems update server and searches for newer firmware (later version) for the specific board.

This option is available on ESP32 devices that contained two update firmware (OTA type) partitions within the on-board device flash memory. Consult the specific products production and build system for further details.

If you have not already, connect the DataLogger IoT to your computer using a USB cable.

DataLogger IoT Connecting USB

Open a Serial Terminal, connect to the COM port that your DataLogger enumerated to, and set it to 115200 baud. In this case, we connected to COM13. Press any key to enter the Main Menu. Type 1 to enter the Settings menu. Then type 16 to enter the System Update Menu. Finally, type 4 to update the firmware over-the-air.

System Update Menu Options

When this option is selected, the system will contact the update server and search for available upgrade firmware, selecting the latest version available. If a newer version is found, a prompt is presented to confirm the upgrade.

Note

For the upgrade option to occur, a the system must be connected to a network and have access to the firmware OTA server.

Typing Y (or hitting enter) starts the update operation. As the firmware is downloaded, the percent complete status is updated. If connectivity fails during the download, the operation is halted and the update aborted.

Once the update file is downloaded, it is verified as being the correct file. Once verified, the system is rebooted and starts using the new firmware image! You will notice the firmware version change as the DataLogger IoT initializes.