A connected product is a software system wrapped in a thin layer of hardware. Firmware updates allow you to change the software inside your product, even after the hardware has been sold, delivered, and deployed.
Firmware updates require sending a relatively large chunk of data over the air – typically the full size of the on-chip memory – to a wireless, often battery-powered, device. Today we will look into how long such a firmware update may take.
But first, let’s look at what firmware updates really are, and why they are needed in the first place.
What is Firmware?
The firmware runs on the wireless chip inside your product.
The firmware completely defines the behavior of the device. By updating the firmware, you are able to change the behavior your product in the field.
Firmware Updates for Your Customers
When the product is in the hands of your customers, firmware may need to be updated for a number of reasons:
- Introduce new product features
- Fix bugs, such as security patches
Done right, the firmware update process is a smooth process that will help improve the experience for your customers. The end-goal is to keep your customers happy and to maintain a positive relation with them long after they have completed their initial purchase.
Care must be taken though to not be annoying to the customer. For example, firmware updates must not interfere with the regular operation of the product. One example of a pitfall is to require the user to have their smartphone turned on and in the vicinity of the device during the full firmware update. As an update may take several minutes, this has the potential to annoy users.
To make sure to keep the firmware update process as smooth as possible, we recommend doing firmware updates in the background, but to keep the user in control of when updates are installed.
Firmware Update Strategies
There are a number of strategies that can be used to do firmware updates for connected products:
- Automatic firmware updates on first use
- Customer-initiated firmware updates
- Pushing large-scale firmware updates
Each have their merits and trade-offs.
Automatic Firmware Update on First Use
In the consumer space, many connected products require a firmware update the first time they are powered up. This ensures that the product always runs the latest version of the firmware and that any potential security issues that may have been identified since manufacturing should be fixed.
The trade-off is that a lengthy firmware update process slows down the product unboxing experience and may give a bad first impression of the product.
Customer-Initiated Firmware Updates
Asking the user to start the update, then running the update in the background, is generally a good idea.
For industrial and commercial products, allowing the customer to choose when to perform updates is important. Industrial installations may be so large that an automatic firmware update on first use would be impractical.
The ideal strategy for customer-initiated firmware updates is to highlight the fact that an update is available, but allow the user to select a suitable time to update the firmware. The firmware update should then proceed automatically, without requiring any assistance from the user.
Pushing Large-Scale Firmware Updates
No software is perfect and problems may be found long after the initial deployment. Firmware updates allow you to fix issues before they become a problem.
Large number of devices sometimes need to be updated at the same time.
Firmware Updates During Product Development and Testing
Although firmware updates are primarily used to update your product after deployment, they are also an essential mechanism to speed up product development and testing.
In the proof-of-concept phase, new features and ideas can be rapidly tested and evaluated by pushing new firmware versions to the devices.
The alternative to firmware updates is to collect every device, connect a programming cable from a laptop to the microprocessor inside the product, and run a piece of software on the laptop that overwrites the firmware inside the device – a long and rather arduous process, particularly if there are many devices to update.
How Firmware is Updated
Firmware updates need a fair amount of technical infrastructure and interactions with the end-user to work efficiently.
A firmware update goes through a sequence of steps:
- A new firmware version is downloaded to the chip, and stored in a separate memory area
- The validity of the downloaded firmware is established
- The new firmware is installed
- The device is rebooted
- The device is now running the newest version of the firmware
This process requires a fair amount of technology in the background:
- A firmware version database. New versions of the firmware need to be stored and maintained.
- A firmware file server. The devices need to download new firmware versions from somewhere – a firmware file server.
- A firmware download mechanism. The devices need to be able to download and resume a half-way finished download, in case a connection breaks.
- A wireless firmware update protocol. The new firmware version needs to be pushed across the wireless network in a way that reaches all connected devices.
- Encryption, signatures, and error-checking. The integrity of the new firmware version must be ensured through encryption and encrypted signatures, and there must be a way to check that no errors have been introduced during download.
For a connected product, these things need to be there, but will generally not be visible to the customer or end-user.
How Long Does a Firmware Update Take?
To see how long a typical firmware update may take, we measure the speed of a number of firmware updates through the Thingsquare system.
The Thingsquare system supports firmware updates both for individual devices and for entire wireless mesh networks of devices. Firmware updates are triggered by the users, from their smartphone apps or from a web administration panel. Firmware versions are maintained by the backend server, which can hold several firmware versions for each device type.
Weptech Ethernet-to-wireless, combined 2.4 GHz and sub-GHz, gateway
Zolertia Re-Mote combined 2.4 GHz / sub-GHz platform
To measure the time a firmware update takes, we test three configurations: one firmware update of a Weptech Ethernet gateway and firmware updates of a Zolertia Re-Mote wireless device running both in 2.4 GHz and sub-GHz modes. The firmware versions that is sent are 144 kilobytes, 116 kilobytes, and 120 kilobytes large, respectively.
Firmware updates take a few minutes with an Ethernet connection and between 10 and 20 minutes for a wireless device. Because the firmware update happens in the background, the user will not be disturbed by the update process.
As we see in the figure above, the firmware update process takes several minutes, even for a device that is connected directly to the Ethernet. For a wireless device, where the update is sent over the air, the process may take up to 20 minutes. It is therefore important that firmware updates can be done in the background, without requiring the user to manually oversee the procedure.