Install application from airvantage


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

#21

As you can see you are missing the following in communication

             <parameter name="version" value="core=1_0-20151214,sw=1_0-20151201"/>

Adding the above line to the application model under communication / protocol will fix the problem you are seeing. As already mentioned in this ticket, the official version is 16.10. So the released application model is referring to the old lwm2m version.

If you want to use newer versions, please update your application model manually and attach your device to the new firmware application model.


#22

Hey guys,

Just want to get some clarification from this thread - have you guys been able to do a remote update on an application with Legato 17.xx?

We are just starting to look into doing the remote updates now and are hoping to learn from anyone else’s mistakes.

Thanks!

Brandon


#23

@nilsarve can you let us know if this fixed your problem.
@coastalbrandon, for 17.xx please use the right protocol version.

Our team is doing fota/sota on a daily basis and the big learning here is probably to make a video tutorial on this topic.

@Mirac lets make a video tutorial on this topic next.


#24

A video tutorial would be great!


#25

No problem, let’s discuss the topic when we meet :slight_smile:


#26

Got it working with legato 17.11 now!

  1. Downloaded the current “firmware” file unzipped and added the <parameter name="version" value="core=1_0-20151214,sw=1_0-20151201"/> line to model.app. Edited the name and revision.
  2. Zipped and uploaded to my apps. Published.
  3. Edited my device and added my new application.
  4. Rebooted my device with legato 17.11 and avcControl (with auto start)
  5. Installed my own app from airvantage. :+1:

#28

Hey @nilsarve,

I followed the steps you listed as closely as possible but I keep getting a Binary packages missing error from AirVantage when trying to upload my modified “firmware” package.


#29

The zip I downloaded was called WP8548_SWI9X15Y_07.12.09.00-SWI9X15Y_07.12.09.00.zip and contained the model.app, oma.cp and swir.cp.


#30

Thank very Much work fine with my wp8548 and legato 17.11.