All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Installing a Legato application remotely using AirVantage

API info is here: swi_airvantage.h

This page explains how to build, create your application, configure the AirVantage platform and deploy your application remotely on your device.

In this example, we use the sample "helloWorld" as the application with a WP7 as the target. If you're using an AR7 module, substitute ar7 where appropriate.

Build the application

First, make sure that Legato is built locally for WP7, then :

Legato $ bin/legs
Legato $ cd apps/sample/helloWorld
Legato $ mkapp -t wp7 helloWorld.adef

Create application package for AirVantage

Compress application package

Put helloWorld.wp7 inside a tar archive (this is required by the AirVantage platform) :

Legato $ tar cvpf helloWorld.wp7.tar helloWorld.wp7 

Create application model

Create application model following this example:

<?xml version="1.0" encoding="ASCII"?>
<app:application xmlns:app="https://www.sierrawireless.com/airvantage/application/1.0" name="HelloWorld_jsmith" revision="1.0" type="HelloWorld_jsmith">
  <application-manager use="MIHINI_APPCON"/>
  <binaries>
    <binary file="helloWorld.wp7.tar"/>
  </binaries>
</app:application>

Some explanations on model fields:

  • type field will be the identifier of the application on the device (the APPNAME to interact with supervisor).
  • name field is used on AirVantage UI

Some advices and rules to create the model:

  • To ease the creation of this model, it is advised to set type and name fields with the same value.
  • Make sure that field type is set with unique value: you can add your AirVantage username in it to ensure the value will be unique.
  • Make sure that fields name and revision form a unique value pair.
  • Make sure that the field binary file contains the name of the resulting tar file. (see previous step Compress application package )
  • Save the file as .app file

Create AirVantage application package

Create a zip archive containing appmodel.app and helloWorld.wp7.tar, call it myapp.zip for example

zip myapp.zip appmodel.app helloWorld.wp7.tar 

Using AirVantage Platform

In this part, we assume that you already created your device on the platform using the section Connect to AirVantage

Upload application

Upload myapp.zip using this documentation: https://doc.airvantage.net/display/USERGUIDE/Develop+Activity : "My Apps" Section -> action Release (and select publish)

Create application installation job

You need to create the application install job on the platform: on the "Monitor" view for your system, use the "More" menu, and select "Install application" and then select the application you just uploaded,released and published in previous step.

Receive application on the AirVantage agent

Make the agent to connect

Once the command is sent from the platform you need to connect the agent to the platform:

$ telnet 192.168.1.2 2000
 > :agent.srvcon.connect()  # wait a moment
= "ok"

(When you interact with AirVantage, monitor the logs in the same time)

Check Success Status

If the installation was successful, you should find helloWorld in the installed applications:

$ telnet 192.168.1.2 2000
 > a=require 'agent.appcon'
 > :a.list()
{ "helloWorld" }
 > :a.status("helloWorld")
"running"

In the same way, if the installation was successful, you should find helloWorld in the application list on the Monitor view of your device on AirVantage.

Going further

Start, stop, uninstall jobs can be created using corresponding UI buttons on the "Monitor" view for your system, in the "Applications" section, next to the application name you choose.


AirVantage documentation

https://doc.airvantage.net/display/USERGUIDE/Getting+Started


Copyright (C) Sierra Wireless, Inc. 2014. All rights reserved. Use of this work is subject to license.