Over the air updates failing

Hey all,

I’ve been trying to update my target using AirVantage. I’ve managed to get my bundle uploaded, released, and published. Unfortunately every time I try to install it on a device, we receive Read operation failure [legato.1.0.3: BAD_REQUEST,legato.1.0.5: BAD_REQUEST] in return (shown below).

Has anyone seen this before or have any ideas?

Cheers!

@nvd

No I can update easily my target. For the moment only the apps (not try with a bundle).

Do you have a avcController in charge of the update ? If you use the WP85 with légato 17 or higher you must modify the app attached per default to the wp85. I will share you the file tomorrow.

Francis

Hey Francis,

I have completed this step as per our previous discussion on a forum post. My guess would be this is failing when it reaches the target. I tried this with individual apps instead of a bundle and I got this error: Upgrade failure [Invalid Update State value: 0].

AVCController is needed for firmware update.
You can use my source code.

Look on this topic

Hey Francis,

Thanks again for the help. I have an avcControl app running to receive the update. I’ll post some logs to show what it’s doing.

Hey all,

I captured some logs of the system trying to apply the update (https://gist.github.com/nvandoorn/78c68484aa95a49782b62b03e98079e8). Not sure how much of this is expected/normal.

Hi,

What version of legato are you using? If you are using legato > 16.10 which is AVC2 (https://docs.legato.io/latest/avMigration.html), the LWM2M_LEGATO_SYSTEM_UDPATE feature is no longer supported (OTA update using the *.update).

However you can still update your system through FOTA (Bundling mechanism). Instead of using the *.update file, you’ll be using the legatoz.cwe file in your build directory.

Here is an example of a FOTA package used to update a legato system (assuming the version is 18.04.0_612aee16f4e1ar736d…).

<?xml version="1.0" encoding="UTF-8"?>
<app:application xmlns:app="http://www.sierrawireless.com/airvantage/application/1.0" name="nick_bundle" revision="LE=18.04.0_612aee16f4e1ar736d2" type="WP7603-1">

    <binaries>
        <binary file="legatoz.cwe" type="FULL"/>
    </binaries>

    <application-manager use="LWM2M_AIRPRIME_BUNDLE"/>
  

</app:application>

Note: The type field must match your “Firmware” linked to your device. You can check what is it by going to Inventory->Systems->(Your device) and under “Firmware” click on the highighted package.

To perform a bundle update on the server, go to Monitor->Systems->(Your device) and under More->Install Bundle.

Enoch

Thanks for the details @esun. I’ll try and give this a go by the end of the day.

Hey @esun,

Updating using the .cwe bundle failed with the same error code I described here: Over the air updates failing. It seems our targets are missing some file/configuration required for updates (see here https://gist.github.com/nvandoorn/78c68484aa95a49782b62b03e98079e8)

Can you check that the firmware model linked to your device is for AVC2 (Inventory->Systems->(Your device) and under “Firmware” click on the highlighted package.

The firmware model xml should contain the following lines under the communication tags

        <communication>
            <protocol comm-id="IMEI" type="LWM2M">
                <parameter name="dtls" value="psk"/>
                <parameter name="version" value="core=1_0-20151214,sw=1_0-20151201"/>
            </protocol>
        </communication>

If it does not then the device is currently using an AVC1.0 firmware model.

Hey @esun,

My apologies for letting this sit. @prushp made the same suggestion and it’s been working great. Thanks so much for the help!

Hey @esun,

I’m still looking for a way to push system updates in some way. I tried your suggestion but it’s been a bit of a versioning nightmare. The target always reports the the Legato version as the 3 digit version (18.04.0 in my case), so this is the version that must be specified in manifest.app for this to work. I tried simply specifying 18.0.4 in my manifest file, but in this case the target assumes it’s already up to date and does not install the update. I then tried tagging my own versions of Legato (confirmed this worked by running legato version on the target after applying over micro USB), but this seemed to confuse the avcService and caused it to lock up.

Generally speaking, app updates work well, but this does not really cover cases where some major changes have been made (e.g when renaming or deleting a service). Also note that the service I need to delete was not installed through AirVantage so it does not list show it in the web interface (see below).

Hi @nvd, you have to sync the server and device to reflect apps installed on the devices etc., (system applications). Click sync button on server to know what apps are installed. I guess you need to change the legato version in /mnt

Thanks @prushp. I’m assuming I need to upload these apps to AirVantage (at the correct version) in order for this to work and for these messages to disappear?

Hi @nvd
yes you’re right,
best regards,

Hey all,

I’ve since upgraded to Legato 18.10.02 on release 16.1 of the WP85 firmware.

I’ve created a custom firmware bundle (.spk) using the modem firmware, MCU firmware, and Linux Distro bundled with release 16.1 for the WP85. The Legato system is custom and was concatenated using systocwe and swicwe.

I seem to be getting a new error:

Furthermore this process seems to have taken my unit offline as well.

Hi @nvd did you ever get SOTA and FOTA working?

I’m getting the legato.1.0.3 BAD_REQUEST attempting SOTA as well.
app install and FOTA works apart from the Legato version showing only 3 digits…

Hey @nilsa,

I don’t really work on Legato anymore or use AirVantage so I’m not super helpful here.

Almost all of my issues related to updates stemmed from version mismatches. It was such a pain that I did some questionable bash scripting to generate bundles for AirVantage.

@dbeckwith inherited this code from me so he may be able to help.