FOTA baseline Legato System


I’m having trouble installing a new Baseline bundle with my updated legato system. I’m making my own Legato system with a few of my apps included. If I update my apps only, I experience roll backs to the old baseline system at times and that is not an issue with a baseline update.

I tried to upgrade my Legato system to a newer version (from 18.02 -> 18.06.4 WP8548) OTA but then I got a certificate error next time I try to run a FOTA and they seem locked from installing new updates OTA now!

So sticking with the same legato version but modifying my apps and then build and install this new Legato system seem like the best solution so far. (except the 5-6MB of data it consumes)

But the problem is that Airvantage claims the update failed even tho it works. This is because of the expected Legato version is not the same as the actual legato version. Unexpected final version [LE=18.06.4] If I put revision=“LE18.06.4” in my it will not install as my system thinks that it is the same version as the old. If I put LE=18.06.4_38ccaf4084e6a259c96ccf8f247dcb0f it will install but I will get the Unexpected final version error as GetLegatoVersion() only responds with Legato version = 18.06.4, len 7 while writing legato version on the command line responds: 18.06.4_38ccaf4084e6a259c96ccf8f247dcb0f

Anybody able to help me with this?

@nilsa Can you share your manifest file?


<?xml version="1.0" encoding="UTF-8"?>
<app:application xmlns:app="" name="WP8548_GW_v1.0.0RC1" type="WP8548" revision="LE=18.06.4_38ccaf4084e6a259c96ccf8f247dcb0f">
    <binary file="legato.cwe"/>
<application-manager use="LWM2M_AIRPRIME_BUNDLE"/>

Did also try to define LEGATO_VERSION in buildVars of my sdef file by setting something like

    LEGATO_VERSION = "18.06.4_GWv1.0.0RC1"

And then the same revision in my but that did not work either…

@nilsa, This matches what this document states

I know we had trouble with this and a previous dev worked around it by creating a custom Legato version but I was hoping the above document would have solved this issue and we could dispense with the custom version.

Have you tried posting in the Mangoh forum or contacting Sierra support, if you do manage to get response I’d appreciate it if you could share that with me.

Yes have read that document many times now😉

Do you have any more info about this custom version?
Maybe it works in legato 19.04?

Yes I’m in contact with sierra support and they suggested the buildVars modification…

@nilsa The custom version method was definitely a hack and something we moved away from. I was able to successfully FOTA a unit from 18.09.0 to 19.02.0 today. This was a “Full Device image bundle”, >50MB.

Are you trying to update systems at the same Legato version or are you doing major version updates?

Ok. Updating systems with different legato versions works but we updated like 10 devices with WP8548 with R15 firmware and legato 18.02 to legato 18.06.4. That worked fine but next time we tried to run FOTA on one of theese devices (App or system or whatever) we get a certificate error and downloading of new update/cwe/spk failes. So we have learned to be carefull when upgrading legato only.

We want to upgrade systems with the same lagato version like 18.06.4 to another 18.06.4 but does not work like it should.

@dbeckwith have you managed to get an overlay legato system bundle or delta system bundle to work? (with .update file)
When I try to install a .update bundle I only get:
Read operation failure [legato.1.0.3: BAD_REQUEST,legato.1.0.5: BAD_REQUEST] but I have not had the time to explore this further.

@nilsa No I haven’t tried an overlay or delta system bundle SOTA because we have seen rollback (even on overlays that are marked good) issues when our device battery voltages get low. At the moment our plan is to only do FOTA’s with either a “Full Device” bundle or a partial device bundle (IE: just the new version of Legato and apps).

We would like to be able to update apps at the same version of Legato but I was thinking of doing this as a partial bundle.

Has Sierra support been able to provide any guidance?


Yeah I see what you are saying ReadLegatoVersion() in osPortDevice.c reads the full Legato version string from the file but then tokenizes it at the ‘_’ stripping off the hash, which is weird.

Yes we experience rollbacks on good systems as well but that is to be expected says sierra support as we always have to power down the system in the right manner… That is why we also want to do baseline (FOTA) updates of the complete legato system. But just for testing I wanted to make SOTA or overlay system update work but of course that fails as well.

Yeah I was checking in on osPortDevice.c as well and what is now called ReadLagatoVersion() vas called GetLegatoVersion() in legato 18.08 and older… So there has been some changes to this file but we still just get the stripped legato version string.

@nilsa I was able to FOTA a unit from 18.09.0 to 19.02.0 using a partial device image last week. I also tried 19.02.0 to 19.02.0 (the same version and hash). This failed with the version check we are talking about above.

I am planning on reaching out to my Sierra support contacts today as well.


Were you able to make it any further with updating at the same Legato version?

Well I did not try it but the response from support was to make a custom legato name by adding export LEGATO_VERSION=“custom name” in the legato makefile and then recompile legato from scratch.

@nilsa, you modified just the Makefile! your manifest still the same?

Did not test any further as I use leaf and I ran into problems recompiling legato.

But if anybody does test this I would love to hear about it.

Hi nilsa,
AirVantage determines the uniqueness of a package by comparing the Device Type and the Revision. In newer versions of Legato, only the short form of the version string is passed to AV in the LWM2M message. As you’ve noticed, this means that you can only have a single package with for that Legato version.

To resolve the issue, you have 2 options, but both require re-building Legato.

  1. As support suggested, if you build Legato with the LEGATO_VERSION environment variable set to a custom value, this will enable the firmware to report your custom version in the LWM2M message. You’d also need to change your AV package with the same version. Also ensure that your custom version is unique for each of your releases.

  2. Older versions of Legato (I’m unsure which version the change was made) included the hash when the Legato version was returned in the LWM2M object. You could patch the framework to report the hash in the object, then you don’t need to change the manifest. However, you do need to ensure the hash changes each build. If you’re using the Yocto build environment, it’s simple. Just add this line to legato-af.bbappend:

    do_compile[nostamp] = “1”

If you’re building Legato using the standalone makefile, you’ll need to come up with a way to ensure the hash changes.


Tanks for the info @cchenry :smiley:

At the moment I just add some metadata, like _FW_project, to the device type in order to have several bundles with the same legato version in Airvantage. But that does not fix the issue with updating a WP with a new bundle with the same legato version.

Option 1 sounds best to me.
But how do I build Legato with leaf?
Do I go to leaf-data/profile/wp85-legato/ and just build wp85 with custom LEGATO_VERSION?
And then move the legato.cwe file to wp85-legato-image?

You need to switch to the source code mode with “leaf getsrc swi-legato”, after that you will get the legato source and build your legato sys.

You should not modify " or this is not a proper method) the content of the “leaf-data/profile/wp85-legato/” package as they might be shared between multiple workspaces