# Install application from airvantage

**URL:** <https://mangoh.discourse.group/t/install-application-from-airvantage/1002>\
**Category:** mangOH Red\
**Created:** [December 18, 2017, 1:26pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002 "2017-12-18T13:26:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nilsarve](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nilsarve](https://mangoh.discourse.group/u/nilsarve)\
**Post date:** [December 18, 2017, 1:26pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/1 "2017-12-18T13:26:34Z")

</div>

Hello

Have several mangoh Red with WP8548 (SWI9X15Y\_07.12.09.00) and have to get the “install application” or “install bundle” to work from airvantage. Have followed the [Getting started](http://mangoh.io/uploaded-documents/Reference/mangOH%20Red/Discover/Getting%20Started/mangOHRed_GS_WinCli_r3/#t=41110402_Tutorials_-_HTML5%2F41110479-80-81-82_PrepMangoh%2F41110479-80-81-82_PrepMangoh.htm) and installed redSensorToCloud. Have registered the module on airvantage and sending data with redSensorToCloud works. I then activate 15 min heartbeat with the configure communication button.

Have buildt helloWorld with av-pack and published on airvantage like [this](http://legato.io/legato-docs/latest/avInstallUpload.html). But when I try to install the application from airvantage nothing is installed.

from airvantage:  
action [LWM2M\_SW\_UPDATE]  
The software is not installed on the device - Installing FULL package  
Upgrade failure [Invalid Update State value: 0]

logs:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/1X/694c8df3be14128879bb5023a9de6ba674a3ecc1.png)

Automatically deffering download, while waiting for control app to register? Do I need to install avcControl?

Appname is empty?  
manifest.app  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/1X/c027db3d85de241a03dea68a4a8de63f3fd27c4b.png)

Any help would be greatly appreciated:+1:

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [December 18, 2017, 3:33pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/2 "2017-12-18T15:33:01Z")

</div>

Yes, you need to install avcControl.

---

<div class="post-metadata">

**Author:** ![nilsarve](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nilsarve](https://mangoh.discourse.group/u/nilsarve)\
**Post date:** [December 18, 2017, 8:27pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/3 "2017-12-18T20:27:08Z")

</div>

Thank you for clarifying that!

But now I got a new problem.  
I cant install an app anymore… (with update)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/1X/e0c18aecc73dd4f6a213fe5006144e73cf0c6f1a.jpg)

 ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/1X/f7185f03980ab095784c6d20ffb23ada5bd72951.jpg)

Is my system read only or what has happened?

---

<div class="post-metadata">

**Author:** ![nilsarve](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nilsarve](https://mangoh.discourse.group/u/nilsarve)\
**Post date:** [December 19, 2017, 1:55pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/4 "2017-12-19T13:55:50Z")

</div>

Ok. Changed to another WP8548 module since “update” command stopped working.  
App status before I try to install helloWorld from airvantage:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/1X/94679ea2e81c23fb5806a99c4742e0bdadf3266c.png) after: ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/1X/90e0776854149e39008713209d6123360c781f2b.png)

As you can see 3 apps get uninstalled including avcControl.  
Why is that? This is install application not install bundle.

---

<div class="post-metadata">

**Author:** ![nilsarve](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nilsarve](https://mangoh.discourse.group/u/nilsarve)\
**Post date:** [December 19, 2017, 2:28pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/5 "2017-12-19T14:28:18Z")

</div>

[http://legato.io/legato-docs/latest/avInstallUpload.html](http://legato.io/legato-docs/latest/avInstallUpload.html)  
feels a bit outdated. Could someone look into it please?

> Uploading a 17.05 Legato System Bundle

17.05 is a bit old…

> av-pack -f helloWorld.wp85.signed abcCo.jsmith.helloWorld \_build\_helloWorld/wp85

av-pack -f is no longer supported I think

etc.

---

<div class="post-metadata">

**Author:** ![nilsarve](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nilsarve](https://mangoh.discourse.group/u/nilsarve)\
**Post date:** [December 21, 2017, 7:07am UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/6 "2017-12-21T07:07:43Z")

</div>

@asyal my control app avcControl get marked as an “object 9 instance” (?) and uninstalled when I try to install application from airvantage! This then stops the download and install of the new app…

How do I avoid that the apps I add to my sdef get uninstalled?

---

<div class="post-metadata">

**Author:** ![nilsarve](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nilsarve](https://mangoh.discourse.group/u/nilsarve)\
**Post date:** [December 21, 2017, 12:46pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/7 "2017-12-21T12:46:09Z")

</div>

Maybe you @dfrey can give me a hint as to what I’m doing wrong?  
Can’t install or upgrade my application from airvantage because avcControl always get uninstalled in the progress.

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [December 21, 2017, 3:03pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/8 "2017-12-21T15:03:28Z")

</div>

Can you show logread -f?  
Might be a legato version mismatch

---

<div class="post-metadata">

**Author:** ![nilsarve](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nilsarve](https://mangoh.discourse.group/u/nilsarve)\
**Post date:** [December 21, 2017, 4:30pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/9 "2017-12-21T16:30:59Z")

</div>

Thank you for responding @asyal . Will post a log later.

You mean a mismatch between the legato framework (17.11) in $legato\_root and the one in $mangoh\_root?

---

<div class="post-metadata">

**Author:** ![nilsarve](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nilsarve](https://mangoh.discourse.group/u/nilsarve)\
**Post date:** [December 21, 2017, 4:58pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/10 "2017-12-21T16:58:16Z")

</div>

First I sync then I try to install application from airvantage.

[install\_application.txt](https://mangoh.discourse.group/uploads/short-url/g2sEtt7tyqKpsx8R8ruJLzA2Emc.txt) (47.4 KB)

Have reinstalled the legato framework but avcControl is still uninstalled. Feel this response to sync is a clue as these apps get uninstalled:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/1X/ca36dda806f29262cc95a977d0845b93b4df4499.png)

---

<div class="post-metadata">

**Author:** ![virpadte](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/virpadte/32/245_2.png) [@virpadte](https://mangoh.discourse.group/u/virpadte)\
**Post date:** [December 21, 2017, 6:11pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/11 "2017-12-21T18:11:58Z")

</div>

@nilsarve which version of legato are you using. I faced similar update issues and finally I had to roll back to legato 16.10.1

---

<div class="post-metadata">

**Author:** ![nilsarve](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nilsarve](https://mangoh.discourse.group/u/nilsarve)\
**Post date:** [December 21, 2017, 6:14pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/12 "2017-12-21T18:14:12Z")

</div>

Hmm. I just upgraded to 17.11. Tried 17.09 and 17.07 earlier…

---

<div class="post-metadata">

**Author:** ![virpadte](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/virpadte/32/245_2.png) [@virpadte](https://mangoh.discourse.group/u/virpadte)\
**Post date:** [December 21, 2017, 6:41pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/13 "2017-12-21T18:41:51Z")

</div>

@nilsarve: I had a lot of discussions with some folks regarding this issue. This seems to be a Legato problem.

Here is a link from the legato forum which helped me coming up with a solution:

> **[Cannot perform SOTA updates for Fx30 using Legato-17.09.0](https://forum.legato.io/t/cannot-perform-sota-updates-for-fx30-using-legato-17-09-0/2784/4)**
>
> Hi Virajpadte, Which is the firmware version used on FX30 module? You can get the info using “cm info” command and also can you please provide the “app status” output before and after you try to update the SOTA ? Regards, Muralidhara N.

At my company we are developing a solution using both FX30 and mangOH green. While in the forum I only asked questions regarding FX30, I was facing the same problems with mangOH board as well. We finally had to roll back to 16.10.1 and deploy on both hardware target and its working now.

@asyal: May be someone from the legato team could potentially fix this so that we can use the feature for versions beyond 16.10.1 on all hardware platforms.

---

<div class="post-metadata">

**Author:** ![nilsarve](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nilsarve](https://mangoh.discourse.group/u/nilsarve)\
**Post date:** [December 21, 2017, 7:34pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/14 "2017-12-21T19:34:33Z")

</div>

Thnaks for the update @virpadte 👍

Tried legato 16.10.1 now! Modified the avcControl from 17.11 to make it run and it does download the package without uninstalling any apps! Guess I just need to add som code to install the package when it’s complete.

Using 16.10.1 is a work around but I would be more comfortable using a newer legato version…  
Hopefully someone can fix this issue!  
Or can someone confirm that it works with legato 17.11?

---

<div class="post-metadata">

**Author:** ![virpadte](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/virpadte/32/245_2.png) [@virpadte](https://mangoh.discourse.group/u/virpadte)\
**Post date:** [December 21, 2017, 8:17pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/15 "2017-12-21T20:17:15Z")

</div>

Hi @nilsarve,

I am glad I could help and add to developer community for mangOH. My team hated the rollback especially with all the changes in the asset creation.

---

<div class="post-metadata">

**Author:** ![Prush](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/prush/32/1398_2.png) [@Prush](https://mangoh.discourse.group/u/Prush)\
**Post date:** [December 21, 2017, 10:16pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/16 "2017-12-21T22:16:46Z")

</div>

So the problem is : Few apps are getting uninstalled while you tried to install a helloWorld application from the server.

If that is the case I would check the application model associated with your device on the server side. Specifically the version. The Lwm2m spec changed between these two versions of legato and what used to be a app in good state is different. Hence if you don’t indicate to the server correct lwm2m spec to use, the server would think the app is in a bad state and would initiate an Uninstall.

```
<capabilities>
    <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>

```

Can you post the application model you are using?

---

<div class="post-metadata">

**Author:** ![nilsarve](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nilsarve](https://mangoh.discourse.group/u/nilsarve)\
**Post date:** [December 21, 2017, 10:38pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/17 "2017-12-21T22:38:59Z")

</div>

Interesting!  
I used av-pack to create zip files and I only edited the application model when making a bundle. So to add avcControl to my system I need to add it to airvantage first, with the protocol part added to the application model?

This is what it looked like earlier:

```
  <application-manager use="LWM2M_SW"/>
  <capabilities>
    <communication use="legato"/>
    <data>
      <encoding type="LWM2M">
        <asset default-label="Application Objects" id="le_avcControl">
          <node default-label="Application Object" path="0">
            <variable default-label="Version" path="0" type="string"/>
            <variable default-label="Name" path="1" type="string"/>
            <variable default-label="State" path="2" type="int"/>
            <variable default-label="StartMode" path="3" type="int"/>
          </node>
          <node default-label="Process Object" path="1">
            <variable default-label="Name" path="0" type="string"/>
            <variable default-label="ExecName" path="1" type="string"/>
            <variable default-label="State" path="2" type="int"/>
            <variable default-label="FaultAction" path="3" type="int"/>
            <variable default-label="FaultCount" path="4" type="int"/>
            <variable default-label="FaultLogs" path="5" type="string"/>
          </node>
        </asset>
      </encoding>
    </data>
  </capabilities>
  <binaries>
    <binary file="avcControl.wp85.update"/>
  </binaries>
</app:application>
```

---

<div class="post-metadata">

**Author:** ![Prush](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/prush/32/1398_2.png) [@Prush](https://mangoh.discourse.group/u/Prush)\
**Post date:** [December 21, 2017, 10:59pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/18 "2017-12-21T22:59:02Z")

</div>

Sorry, This is not the application model I was referring to. If you browse to your device on the server side (Monitor-\>Systems-\>YourDevice] you will see the Firmware application model tied you  
device Application-Model|470x294.

If you click on the Firmware application model, it should take you to a page where you can see the application model.

Mine has: Yours should be similar.

\<?xml version="1.0" encoding="UTF-8"?\>

```
<capabilities>
    <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>
    <dm>
        <action impl="LWM2M_SYNCHRONIZE"/>
        <action impl="LWM2M_REBOOT"/>
        <action impl="LWM2M_SW_UPDATE"/>
        <action impl="LWM2M_SW_UNINSTALL"/>
        <action impl="LWM2M_SW_START"/>
        <action impl="LWM2M_SW_STOP"/>
        <action impl="LWM2M_OBSERVE"/>
        <action impl="LWM2M_CONFIGURE_HEARTBEAT"/>
        <action impl="LWM2M_AIRPRIME_BUNDLE_INSTALL"/>
        <action impl="LWM2M_LEGATO_SYSTEM_UPDATE"/>
    </dm>
    <include>
        <file name="legatofwk.cp"/>
        <file name="oma.cp"/>
        <file name="swir.cp"/>
    </include>
</capabilities>
<application-manager use="LWM2M_AIRPRIME_FW"/>

```

\</app:application\>

---

<div class="post-metadata">

**Author:** ![Prush](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/prush/32/1398_2.png) [@Prush](https://mangoh.discourse.group/u/Prush)\
**Post date:** [December 21, 2017, 11:09pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/19 "2017-12-21T23:09:40Z")

</div>

Image of Firmware application model.

![Application-Model](https://us1.discourse-cdn.com/flex016/uploads/mangoh/original/1X/82b81ea367066a9d63088b008fa63cf79ca42473.PNG)

---

<div class="post-metadata">

**Author:** ![nilsarve](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@nilsarve](https://mangoh.discourse.group/u/nilsarve)\
**Post date:** [December 21, 2017, 11:13pm UTC](https://mangoh.discourse.group/t/install-application-from-airvantage/1002/20 "2017-12-21T23:13:58Z")

</div>

Ok. That one. Here it is.  
\<?xml version="1.0" encoding="UTF-8"?\>\<app:application xmlns:app=“[http://www.sierrawireless.com/airvantage/application/1.0](http://www.sierrawireless.com/airvantage/application/1.0)” type=“WP8548” name=“WP8548\_SWI9X15Y\_07.12.09.00” revision=“SWI9X15Y\_07.12.09.00”\>

```
    <capabilities>
        <communication>
            <protocol comm-id="IMEI" type="LWM2M">
                <parameter name="dtls" value="psk"/>
            </protocol>
        </communication>
        <dm>
            <action impl="LWM2M_SYNCHRONIZE"/>
            <action impl="LWM2M_REBOOT"/>
            <action impl="LWM2M_FW_UPDATE"/>
            <action impl="LWM2M_SW_UPDATE"/>
            <action impl="LWM2M_SW_UNINSTALL"/>
            <action impl="LWM2M_SW_START"/>
            <action impl="LWM2M_SW_STOP"/>
            <action impl="LWM2M_OBSERVE"/>
            <action impl="LWM2M_CONFIGURE_HEARTBEAT"/>
            <action impl="LWM2M_AIRPRIME_BUNDLE_INSTALL"/>
            <action impl="LWM2M_LEGATO_SYSTEM_UPDATE"/>
        </dm>
        <include>
            <file name="oma.cp"/>
            <file name="swir.cp"/>
        </include>
    </capabilities>
    <application-manager use="LWM2M_AIRPRIME_FW"/>
</app:application>
```

[Next page](https://mangoh.discourse.group/t/install-application-from-airvantage/1002.md?page=2)
