<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html data-context="Build Apps" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<title>Create and Install Bundles  - Legato Docs</title>
<meta content="legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development" name="description"/>
<meta content="legato, iot" name="keywords"/>
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/>
<meta content="19.11.6" name="legato-version"/>
<link href="resources/images/legato.ico" rel="shortcut icon"/>
<link href="resources/images/legato.ico" rel="icon" type="image/x-icon"/>
<link href="resources/images/legato.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="resources/images/legato.ico" rel="apple-touch-icon" type="image/x-icon"/>
<link href="resources/css/style.css" media="screen" rel="stylesheet" type="text/css"/>
<link href="resources/css/font-awesome.css" rel="stylesheet" type="text/css"/>
<!--[if IE]>
    <script src="resources/js/html5shiv.js"></script>
    <script src="resources/js/respond.js"></script>
  <![endif]-->
<script src="https://code.jquery.com/jquery-2.2.3.min.js"></script>
<script src="resources/js/main.js"></script>
<script src="tocs/Build_Apps_API_Guides.json"></script>
</head>
<body>
<noscript>
<input class="modal-closing-trick" id="modal-closing-trick" type="checkbox"/>
<div id="nojs">
<label for="modal-closing-trick">
<span>You seem to not have Javascript <a href="http://enable-javascript.com">enabled</a>, so site functionality like the search and navigation tree won't work.</span>
</label>
</div>
</noscript>
<div class="wrapper">
<div class="fa fa-bars documentation" id="menu-trigger"></div>
<div id="top">
<header>
<nav>
<a class="navlink" href="/">Introduction</a><a class="navlink selected" href="buildAppsMain.html">Build Apps</a><a class="navlink" href="buildPlatformMain.html">Build Platform</a><a class="navlink" href="aboutMain.html">About</a>
</nav>
</header>
</div>
<div class="white" id="menudocumentation">
<header>
<a href="/"> <img alt="Back to Legato Homepage" id="logo" src="resources/images/legato_logo.png"/></a>
<h2>/ Build Apps</h2>
<nav class="secondary">
<a href="getStarted.html">Get Started</a><a href="concepts.html">Concepts</a><a class="link-selected" href="apiGuidesMain.html">API Guides</a><a href="tools.html">Tools</a><a href="howToMain.html">How To</a><a href="experimentalMain.html">Experimental Features</a>
</nav>
<nav class="ui-front">
<i class="fa fa-search" id="search-icon"></i>
<input id="searchbox" placeholder="Search"/>
</nav>
</header>
</div>
<div id="resizable">
<div id="left">
<div id="tree1"></div>
</div>
</div>
<div class="content">
<div class="header">
<div class="headertitle">
<h1 class="title">Create and Install Bundles </h1> </div>
</div><div class="contents">
<div class="textblock"><p>Build and update system and App or System bundles and upload them to AirVantage to deploy on your target.</p>
<h1><a class="anchor" id="avInstall"></a>
Create App or System Bundle</h1>
<p>AirVantage supports installing App or System bundles over the air to remote targets. The bundle must be created and then packaged by the <a class="el" href="toolsHost_av-pack.html">av-pack</a> tool.</p>
<p><code>Av-pack</code> creates a manifest xml file for AirVantage with the binary image ready to upload to the AirVantage server.</p>
<p>Example of building an application for deployment through AirVantage: </p><pre class="fragment">$ mkapp -t wp85 helloWorld.adef
$ av-pack -u helloWorld.wp85.update -b _build_helloWorld/wp85 -t abcCo.jsmith.helloWorld
</pre><p><a class="el" href="buildToolsmkapp.html">mkapp</a> builds the <code>helloWorld</code> app for the <code>wp85</code> target. The update pack file <code>helloWorld.wp85.update</code> and the AirVantage manifest file <code>manifest.app</code> are generated.</p>
<p>The <code>manifest.app</code> file is generated under the builds working directory (e.g., <code></code>./_build_helloWorld/wp85 ).</p>
<p><a class="el" href="toolsHost_av-pack.html">av-pack</a> packs these two files together and sets the apps <b>type</b> to <code>abcCo.jsmith.helloWorld</code>.</p>
<p>Example of building a system for deployment through AirVantage:</p>
<pre class="fragment">$ mksys -t wp85 mySystem.sdef
$ av-pack -u mySystem.wp85.update -b build/wp85 -t abcCo.jsmith.mySystem
</pre><p><a class="el" href="buildToolsmksys.html">mksys</a> builds the <code>mySystem</code> system for the <code>wp85</code> target. The update pack file <code>mySystem.wp85.update</code> and the AirVantage manifest file <code>manifest.sys</code> are generated.</p>
<h2><a class="anchor" id="avInstallAppType"></a>
Setting an App Type</h2>
<p>The App's type must be a globally-unique app type identifier, <b>unique</b> among <b>all</b> <b>Apps</b> in <b>all</b> <b>companies</b> <b>anywhere</b> on AirVantage.</p>
<p>Best Practices in uniquely naming type identifiers:</p><ul>
<li>Include a unique identifier for your company name to prevent naming conflicts with other companies in the world.</li>
<li>For developers Apps, include the developer's name to prevent conflicts with other developers in the same company.</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>If no type is specified the type defaults to: <code>appName-legato-application</code>.</dd></dl>
<p>The output for this sample is <code>helloWorld.zip</code>. and is located in the build root.</p>
<h2><a class="anchor" id="avInstallAppSigs"></a>
App Signature Checks</h2>
<p>If your target device has been configured for App signature checks or to accept only encrypted Apps, you must use your signing/encryption tool to sign the <code></code>.update file and then pack it with <code>av-pack</code>. Don't sign or encrypt the <code>manifest.app</code> file, or the final <code></code>.zip file, as AirVantage won't be able to read them.</p>
<pre class="fragment">$ mkapp -t wp85 helloWorld.adef
$ cat helloWorld.wp85.update | myAppSigner &gt; helloWorld.wp85.signed
$ av-pack -f helloWorld.wp85.signed abcCo.jsmith.helloWorld _build_helloWorld/wp85
</pre><h1><a class="anchor" id="avInstallCreateInstJob"></a>
Create Installation job</h1>
<p>To install your App on a remote target, you must first upload your app to AirVantage and then Create an App install job to install the App on the remote target.</p>
<p>Upload your App:</p><ul>
<li>Click "Develop"</li>
<li>Choose "My Apps"</li>
<li>Click on the "Release" Button, this will guide you through uploading the zip file you made with <code>av-pack</code>.</li>
<li>Once the zip file has been uploaded click "Publish"</li>
</ul>
<p>Create the App install job:</p><ul>
<li>In your system 'Monitor' view</li>
<li>"More" menu</li>
<li>Choose "Install Application" and select the zip file created in the previous step.</li>
</ul>
<p>AirVantage will then queue the App to be installed on your Target.</p>
<h1><a class="anchor" id="avInstallRcvAgent"></a>
Receive App on AirVantage Agent</h1>
<p>This requires either:</p><ul>
<li>creating an <code>avc</code> control App using the LWM2M AVC API that accepts the download and installation. See <a class="el" href="c_le_avc.html">AirVantage Connector API</a> API for details.</li>
<li>using AT commands to download and install the update. For information on AT Commands download the AT Command Reference from your module provider. (e.g., <a href="https://source.sierrawireless.com/resources/airprime/software/airprime_wpx5xx_wp76xx_wp77xx_at_command_reference/">AirPrime WPX5XX/WP76XX AT Command Reference</a> ).</li>
</ul>
<h2><a class="anchor" id="avInstallUploadStatus"></a>
Check Success Status on AirVantage</h2>
<p>If the installation was successful, you should find <code>helloWorld</code> in the installed Apps and on the targets' "Monitor" view App list in the AirVantage UI.</p>
<h2><a class="anchor" id="avInstallUpload_CustomSystem"></a>
Uploading a 17.05 Legato System Bundle</h2>
<p>If you have upgraded to 17.05 and wish to sync your Legato System with AirVantage, the target and revision number need to be updated in the App model before it is uploaded to the AirVantage Server.</p>
<p>Once you've built your legato system, you need to extract the model.app from the zip file and update name="&lt;target&gt;_&lt;legatoVersion&gt;" and revision="&lt;legatoVersion&gt;" with the target and version that matches your Legato System. (e.g., if version = "abc" then update model.app to name="WP8548_17.05.0_abc" and revision="17.05.0_abc")</p>
<pre class="fragment">$ cat build/&lt;target&gt;/system/staging/version             # displays the version number
</pre><p>In the legato_model.zip, extract model.app; modify the name="&lt;target&gt;_&lt;legatoVersion&gt;" and revision="&lt;legatoVersion&gt;" to match the version number in the build.</p>
<pre class="fragment">$ unzip -d . legato_model.zip model.app
$ vi model.app                          # edit the two fields
$ zip -ur legato_model.zip model.app
</pre><p>Once legato_model.zip has been updated, upload to the AirVantage server and publish the model.</p>
<p>Sync the AirVantage Server with your target and this will link to your new App model.</p>
<p class="copyright">Copyright (C) Sierra Wireless Inc. </p>
</div></div>
<br clear="left"/>
</div>
</div>
<link href="resources/css/jqtree.css" rel="stylesheet" type="text/css"/>
<script src="resources/js/tree.jquery.js" type="text/javascript"></script>
<script src="resources/js/jquery.cookie.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<link href="resources/css/perfect-scrollbar.min.css" rel="stylesheet"/>
<script src="resources/js/perfect-scrollbar.jquery.min.js"></script>
</body>
</html>
