Why you need software updates
With firmware and software updates over the air (aka FOTA and SOTA) you can efficiently safeguard your IoT devices against the multiple threats which arise since the moment they get connected to the Internet. Such updates also allow you to remotely enrich the feature sets of your devices deployed in the field, which reduces the frequency with which you need to design, manufacture, and release new device models.
You can easily organize and deploy the firmware and software updates for your devices with Bosch IoT Device Management and in particular its software updates layer, Bosch IoT Rollouts.
In a nutshell, the process involves creating software modules of the types supported by your devices and uploading the relevant software artifacts to these modules; then grouping the software modules into distribution sets of the relevant type and triggering a deployment on the target devices.
This chapter reflects the functionalities of the software updates layer of Bosch IoT Device Management, fulfilled by Bosch IoT Rollouts.
If you are using Bosch IoT Rollouts as a standalone service, please read the Bosch IoT Rollouts documentation. This is important, as some functionalities and workflows work differently with a Bosch IoT Rollouts subscription.
Add the softwareUpdatable feature to your device
Your devices which have been provisioned to work with Bosch IoT Device Management have to implement the softwareUpdatable feature in order to be recognized as a target for a potential firmware or software update.
How to implement the softwareUpdatable feature on any device is described in the detailed specification and integration guide. However, as it might be complex to implement this feature if you are a beginner, you can add this feature to your device by using the UI.
Navigate to the Devices view on the left sidebar
Select your provisioned device.
Open its Features blade, Manage tab.
Click the + icon to add a new feature.
In the ID field, enter a unique ID for your new feature, e.g. softwareUpdate.
In the Properties field, paste the code block below, which contains the mandatory property for our feature, namely the softwareModuleType property.
As a value of this property enter a string of your choice. This name will later be displayed in the list of available Software Module types in the Rollouts UI.
In the Definitions field, click the + icon to add a definition for this feature.
In the ID, field paste the ID of the Vorto model org.eclipse.hawkbit.swupdatable:SoftwareUpdatable:2.0.0
Confirm the definition with OK
And click again OK to save the whole new feature.
Use the Bosch IoT Rollouts UI
Starting at the Bosch IoT Suite Console opened, click the Rollouts entry in the left navigation.
In case it is not there, use the search, and click the star icon to pin it to your navigation bar.
The Bosch IoT Rollouts UI will open in a new browser tab. Now that the device has the softwareUpdatable feature, it is listed as a target, meaning you can send a software update to this device.
Upload the software to be distributed to the device
Navigate to the Upload view on the left sidebar. This is where you can prepare the software or firmware update which will be deployed on the device (aka target).
Click the + icon in the Software Module column. With this you can create a new software module of the type accepted by your device - the one which we have set in the softwareUpdatable feature properties, in our case MySimpleType.
In the dialog that opens, select the relevant type from the combobox.
Fill in the other required fields and Save the software module.
Click the Upload button (bottom right corner) to select your artifacts or directly drag and drop them in the designated area.
The uploaded artifact will appear in the right column.
Describe the distribution details
Navigate to the Distributions view on the left sidebar. This is where you can prepare a distribution which will include the newly created software module.
Create a new distribution set type
First you need to create a new distribution set type and indicate that it will accept software modules of the type we created in the previous step.
Click the configure icon in the left column.
Click the + icon for create.
In the dialogue that opens (as on the screenshot below), enter a name and a key of your choice.
Select MySimpleType in the mid column.
Use the forward arrow in order to add it to the column of Selected software module types.
Confirm with Save.
Create a new distribution set
When your new type is ready, you can create the distribution itself.
Click the + icon in the Distributions column in the middle.
Fill in the required fields of the dialogue as you did with the software module.
The new distribution will appear in the Distributions column.
Select the software module from the column to the right and drag and drop it on the distribution.
Confirm the assignment on the pop-up.
Assign a distribution to a device
As a last step, go to the Deployment view from the left sidebar. There:
Drag and drop the distribution set on the target device.
Confirm the assignment with the default Forced option on the pop-up.
Currently, Bosch IoT Device Management does not support the Time Forced and Use maintenance window options when assigning а distribution.
You can now monitor the progress and status of your software update in the action history area to the right.
After the software update has been downloaded or installed successfully on the device, it needs to communicate this with the cloud service, so that the twin state can be updated accordingly. This means that the device has to send feedback to Bosch IoT Device Management, communicating that a particular step in the process has indeed completed. The final intention of this procedure is to update the status of the target in Bosch IoT Rollouts and complete the whole software update process.
See the expected flow of messages between Bosch IoT Device Management and the device at Communicate software update statuses from a device to Bosch IoT Device Management.
With this, you have reached the end of our getting started guide.