Use of Virtual Secondaries
Virtual Secondaries can be used as a way to update a configuration file on the Primary (where the Primary is an ECU with a standard OSTree image running aktualizr). You can do this in two parts:
First you need a virtual Secondary configured that can be used to update a configuration file.
Afterwards you can integrate it into your Yocto build.
You can create a virtual Secondary to run locally by following the steps on how to simulate a device without building a disk image.
You can use the provided
.debreleases mentioned and the
virtualsec.jsonfile, which you can edit to suit your needs: such as removing one of the two entries and setting the paths and names to whatever you prefer.
Afterwards, you will be able to download the arbitrary files to the location specified in the
Next, you can upload the files for the virtual Secondary. To do so, go to the Software versions tab in the OTA Connect Portal and click Add Software. You should make sure the ECU Types field matches the value specified in the
ecu_hardware_idvariable of the
ecu_hardware_idmust be unique per each file type that you’ll like to deliver, otherwise an update of one of them will rewrite the others.
To issue the update perform the following steps:
Go to your Devices tab and find your Primary. (You can run
aktualizr-infolocally to get the name of the Primary if you don’t know it.)
Afterwards, select your virtual Secondary and the file you uploaded to the Software versions tab.
After your selection, the Primary will begin to download the file.
For future reference, you can use the Campaigns tab to send updates to multiple devices simultaneously.
You can use the files in the repository here as an example to get the virtual Secondaries to work in Yocto. You can use the files directly or you can copy them to one of your layers and modify them according to your needs.