Install application from airvantage


#1

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

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

Appname is empty?
manifest.app

Any help would be greatly appreciated:+1:


#2

Yes, you need to install avcControl.


#3

Thank you for clarifying that!

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

Is my system read only or what has happened?


#4

Ok. Changed to another WP8548 module since “update” command stopped working.
App status before I try to install helloWorld from airvantage:
image after: image

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


#5

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.


#6

@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?


#7

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.


#8

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


#9

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?


#10

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

install_application.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:


#11

@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


#12

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


#13

@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:

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.


#14

Thnaks for the update @virpadte :+1:

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?


#15

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.


Ensuring reliable cell connection and retrying?
#16

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?


#17

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>

#18

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>


#19

Image of Firmware application model.

Application-Model


#20

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” 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>