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.
Prepare and trigger a software update
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 its definition available as a Vorto model on our GitHub repository.
Navigate to the Vorto models view of the Developer Console.
In the search bar type softwareUpdatable.
Select the model with version 2.0.0.
Copy its ID (up to the version, included - org.eclipse.hawkbit.swupdatable-SoftwareUpdatable-2.0.0), as you will need to enter it in the next step.
Then, as shown on the image below:
Navigate to the Things 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, copy/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 you just copied
To comply with the required format (namespace:name:version) replace the dashes with colons, as shown below:
Confirm the definition with OK and then again OK to save the whole new feature.
Navigate to Developer Console > Home > Software updates > Rollouts > Deployment view and find your device on the list of targets in the Rollouts UI.
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.
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.
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.
You can now monitor the progress and status of your software update in the action history area to the right.
With this, you have reached the end of our getting started guide.