This document described AirVantage Application Model.
This document explains how to write an application model used to declare the capabilities of an application to AirVantage.
In order to use an application in AirVantage, an application package must be generated and deployed on the Cloud.
An application is a package (a simple zip file) which contains an application model (the Contract) and binaries for remote update (full binary, delta and/or reverse delta).
You can find sample in the last section .
An application package is the set of resources required to declare an application and upgrade it for a given version.
To release an application in AirVantage, you need to provide a zip file with:
Want know more about application management ? See Application Management User Guide .
You can refer to AirVantage user guide to learn more about what an Application means in AirVantage and how it is used: The embedded Application model .
An application model is an XML file defining the communication contract between AirVantage and an embedded application:
The application model is divided in multiple blocks:
Block | Description |
---|---|
Header | Identify the application |
Capabilities |
Define the capabilities supported by the application. That means how the application can communicate, the data, event and commands the application handle with, the device management action allowed. More information about this section here . |
Binaries | Define the software images as binary files to be used to update the application. |
Application Manager | Define the application manager in charge of the life cycle of this application. |
Example:
<app:application xmlns:app="http://www.sierrawireless.com/airvantage/application/1.0" type="{APPLICATION_TYPE}" name="{APPLICATION_NAME}" revision="{APPLICATION_REV}">
<capabilities>
<communication>
<protocol comm-id="SERIAL" type="M3DA">
<parameter name="authentication" value="{SECURITY_TYPE}"/>
<parameter name="cipher" value="{CIPHER}"/>
</protocol>
</communication>
<data>
<encoding type="M3DA">
<asset default-label="my Asset" id="theasset">
<setting default-label="value 1" path="one" />
<setting default-label="value 2" path="two" />
<setting default-label="value 3333" path="3333" />
<command path="simpleCmd" default-label="some testing command">
<parameter id="p1" type="string"></parameter>
</command>
<command path="complexCmd" default-label="some testing command">
<parameter id="param1" type="string"></parameter>
<parameter id="param2" default-value="2000" type="int"></parameter>
</command>
<command path="open" default-label="Open the door" >
<parameter id="openP1" type="int"></parameter>
</command>
<command path="slam" default-label="Slam the door" >
<parameter id="slamP1" type="int" optional="true" ></parameter>
</command>
<command path="close" default-label="Close the door" />
<setting default-label="value 4" path="four" type="int" />
</asset>
<asset default-label="The second asset" id="theasset2">
<setting default-label="node 1" path="nodeOne" />
<setting default-label="node 2" path="nodeTwo" />
</asset>
</encoding>
</data>
<dm>
<action impl="MIHINI_DM_REBOOT" />
<action impl="MIHINI_APPCON_INSTALL"/>
<action impl="MIHINI_ASSET_INSTALL"/>
<action impl="MIHINI_APPCON_START"/>
<action impl="MIHINI_APPCON_STOP"/>
<action impl="MIHINI_APPCON_UNINSTALL"/>
<action impl="MIHINI_DM_RESET"/>
</dm>
</capabilities>
<application-manager use="MIHINI_APPCON" />
<binaries>
<binary file="binary.tar"/>
</binaries>
</app:application>
Identify the application with the following attributes:
The name and type must be unique in AirVantage.
The Revision must be strictly consistent with the revision number declared in the dwl.
Best Practices:
Define the capabilities supported by the application.
Action | Icon in the system details toolbar |
---|---|
Reboot |
|
Application install |
|
Application un-install |
|
Application Start |
|
Application Stop |
|
Reset factory default |
|
Wakeup |
|
AT command | |
Firmware upgrade |
|
Synchronize |
|
Configure Heartbeat |
|
<include>
<file name="myDataModel.cp"/>
</include>
Define the software images as binary files to be used to update the application.
Optional and can be multiples. The files have to be provided in the application package (.zip file). The images provided can have the following formats:
The binary node can have the following specific parameters:
Name | Default value | Comments |
---|---|---|
file |
|
Required |
type | FULL | Can be FULL or DELTA. |
reverse | false | Define if the binary go back to a previous version or to a next version. |
revision |
|
Specify the revision. If reverse is false, the revision defines the source version where the binary can be applied. if reverse is true, the revision defines the final version. |
Example for an application model for version 1.0.0:
<binaries>
<binary file="my_file.bin"/>
<!-- delta to upgrade from version 0.9 to version 1.0.0 -->
<binary file="my_delta.tar" type="DELTA" revision="0.9"/>
<!-- Delta to downgrade from version 1.0 to version 0.9 -->
<binary file="my_delta2.tar" type="DELTA" revision="0.9" reverse="true"/>
</binaries>
In case your application is using AirVantage Agent (deprecated) or Legato, you have to define the application manager in charge of the life cycle of this application: install, upgrade, start, stop, uninstall.
Optional, if defined, must be one of the Application Manager supported by AirVantage:
MIHINI_APPCON
)SOFT_IDS
)ALEOS_LINUX
)MQTT_SW
)LWM2M_SW
)Example:
<application-manager use="LWM2M_SW" />
Available Device management actions break down by Application Manager and Protocol
Application manager | READYAGENT_APPCON | SOFT_IDS | MIHINI_APPCON | MQTT_SW | LWM2M_SW |
---|---|---|---|---|---|
Protocol | AWTDA2_HTTP | OMADM_HTTP | M3DA_TCP | MQTT | LWM2M |
Install | READYAGENT_APPCON_INSTALL | MIHINI_APPCON_INSTALL | MQTT_SW_INSTALL | LWM2M_SW_UPDATE | |
Uninstall | READYAGENT_APPCON_INSTALL | MIHINI_APPCON_INSTALL | MQTT_SW_UNINSTALL | LWM2M_SW_UNINSTALL | |
Start | READYAGENT_APPCON_START | MIHINI_APPCON_START | LWM2M_SW_START | ||
Stop | READYAGENT_APPCON_STOP | MIHINI_APPCON_STOP | LWM2M_SW_STOP | ||
WakeUp | READYAGENT_DM_CONNECT | ||||
Reboot | READYAGENT_DM_REBOOT | MIHINI_DM_REBOOT | LWM2M_REBOOT | ||
Synchronize | READYAGENT_DM_SYNCHRONIZE | MIHINI_DM_SYNCHRONIZE | LWM2M_SYNCHRONIZE | ||
Configure | READYAGENT_CONFIGURE_HEARTBEAT | MIHINI_CONFIGURE_HEARTBEAT | LWM2M_CONFIGURE_HEARTBEAT | ||
Reset to factory default | MIHINI_DM_RESET | LWM2M_RESET |
<protocol comm-id="SERIAL" type="MQTT">
</protocol>
<protocol comm-id="IMEI" type="AWTDA2" >
<parameter name="sms-binary" value="false" />
</protocol>
sms-binary must always be at false
.
<protocol comm-id="IMEI" type="M3DA" >
<parameter name="authentication" value="HMAC-MD5" />
<parameter name="cipher" value="aes-ctr-128" />
</protocol>
Note: Here the following list you can define for encryption and authentication:
AUTHENTICATION_TYPE
= hmac-md5
or hmac-sha1
or none
(if you select none for authentication, you must select none for encryption).ENCRYPTION_TYPE
= aes-cbc-128
or aes-cbc-256
or aes-ctr-128
or aes-ctr-256
or none.