OTA Connect Developer Guide

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.

Creating a Virtual Secondary

  1. 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 .deb releases mentioned and the virtualsec.json file, 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.

  2. Afterwards, you will be able to download the arbitrary files to the location specified in the firmware_path variable.

  3. 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_id variable of the virtualsec.json file.

    ecu_hardware_id must be unique per each file type that you’ll like to deliver, otherwise an update of one of them will rewrite the others.

Updating via Virtual Secondaries

To issue the update perform the following steps:

  1. Go to your Devices tab and find your Primary. (You can run aktualizr-info locally to get the name of the Primary if you don’t know it.)

  2. Afterwards, select your virtual Secondary and the file you uploaded to the Software versions tab.

  3. 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.

Integrating Virtual Secondaries into Yocto

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.