simulating a device using the airvantage™ device simulator v1

40
1 Simulating a Device using the AirVantage™ Device Simulator v1.1 This standalone tutorial explains how to develop an embedded application using the AirVantage™ Configuration Tools simulator. Before you Begin Simulating the Device Before you Begin This section provides you with a starting checklist as well as with a description of the scenario serving as a basis for your embedded development. Starting Checklists End-to-End Application Description Starting Checklists Here is a list of some things to consider as you start developing your application: Table 4 - 1: Starting checklist - General Have you... If not... ...asked for a username and password to access the Developer website? ...see "Request login information to the Developer Zone" on page 4-2. ...checked the minimum PC requirements? ...see "Check minimum PC requirements" on page 4-2. ...read the required tools documentation and got familiar with their interfaces and concepts? ...see "Get familiar with the different tools interface and concepts" on page 4-2 ...read about the use case scenario? ...see "The Development Case Scenario" on page 4-10

Upload: others

Post on 23-Dec-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Simulating a Device using the AirVantage™ Device Simulator v1

Simulating a Device using the AirVantage™ Device Simulator v1.1

This standalone tutorial explains how to develop an embedded application using the

AirVantage™ Configuration Tools simulator.

Before you Begin

Simulating the Device

Before you Begin

This section provides you with a starting checklist as well as with a description of the

scenario serving as a basis for your embedded development.

Starting Checklists

End-to-End Application Description

Starting Checklists

Here is a list of some things to consider as you start developing your application:

Table 4 - 1: Starting checklist - General

Have you... If not...

...asked for a username and password to access the Developer website?

...see "Request login information to the Developer Zone" on page 4-2.

...checked the minimum PC requirements? ...see "Check minimum PC requirements" on page 4-2.

...read the required tools documentation and got familiar with their interfaces and concepts?

...see "Get familiar with the different tools interface and concepts" on page 4-2

...read about the use case scenario? ...see "The Development Case Scenario" on page 4-10

1

Page 2: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Before you Begin

REQUEST LOGIN INFORMATION TO THE DEVELOPER ZONE

The starting point of all development cases is the Developer Zone. Make sure you

safely received your username and password before you start developing

applications.

CHECK MINIMUM PC REQUIREMENTS

As minimum PC requirements, your computer must run in a Windows or Linux

environment and have Java and a compatible browser installed to be able to connect

to the AirVantage™ Operating Portal and to run the AirVantage™ Configuration

Tools used in the context of this development case.

Make sure that your PC meets the minimum following configuration:

Some graphical displays also require Flash (version 10 or later) to be installed. If this

is not the case, please update your current Flash player before trying to access the

AirVantage™ Operating Portal.

GET FAMILIAR WITH THE DIFFERENT TOOLS INTERFACE AND CONCEPTS

It is recommended that users be familiar with the AirVantage™ Operating Portal and

AirVantage™ Configuration Tools interface and concepts.

Table 4 - 2: Starting checklist - Application development specific

Have you... If not...

...been introduced to the notion of models? ...see "Learn about models" on page 4-3.

...got familiar with the AirVantage™ Configuration Tools’s simulator?

...see "Get familiar with the AirVantage™ Configuration Tools Simulator" on page 4-3.

...downloaded the AirVantage™ Configuration Tools?

...see "Download the AirVantage™ Configuration Tools" on page 4-3.

For more information on how to obtain your login information toaccess the Developer Portal, go to http://developer.sierrawireless.com.

Table 4 - 3: Minimum PC requirements

Minimum PC requirement Version

Operating System Windows 7, XP (32-bit and 64-bit)

Linux 2.6

Web Browser Windows Internet Explorer 6, 7, 8,9, Firefox 3.6, 4.0.

Linux Firefox 3.6, 4.0

Java 1.6.x

RAM 512 Mb

2 Sierra Wireless™ Developer Zone - Development Cases

Page 3: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Before you Begin

LEARN ABOUT MODELS

Three models are needed for your application to run properly:

The Manufacturer Device model is provided by the manufacturer. It sets the basis

or what the embedded modem or hardware can and cannot do.

The Customer Device model is designed to allow the developer to extend the

manufacturer model. It creates the basis for any device management capabilities

that should be used. In most cases, the customer model is just an unchanged

manufacturer model.

The Asset model is a user-defined model where the data dictionary as well as

events, commands and alarms for the embedded application are created.

Models are defined in XML format.

DOWNLOAD THE AIRVANTAGE™ CONFIGURATION TOOLS

The following procedure shows you how to download the AirVantage™

Configuration Tools.

To download the AirVantage™ Configuration Tools

1 Launch a Web browser.

2 Open the following page:

http://developer.sierrawireless.com.

3 Click on your platform: for example, AirVantage™ Configuration Tools for

Windows.

The download starts.

GET FAMILIAR WITH THE AIRVANTAGE™ CONFIGURATION TOOLS SIMULATOR

The device and asset simulator comes in the form of an XML document opened in the

AirVantage™ Configuration Tools platform’s Editor Area, including five tabs:

Simulation configuration

Data/Events generation

Simulation dashboard

Data/Commands reception

Bandwidth estimation

These tabs are described below.

SIMULATION CONFIGURATION

Displays general information on the simulation, as well as on server and simulated

device and asset settings:

For more information on the AirVantage™ Operating Portal, seethe related documentation at http://developer.sierrawireless.com.

3

Page 4: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Before you Begin

Figure 1: Simulator tabs - Simulation Configuration tab

This page also Includes a number of links:

DATA/EVENTS GENERATION

Allows you to fine-tune your simulated data and event settings.

Table 4 - 4: Simulation Configuration tab links

Link Description

[Configure connection settings] Opens the Preferences window (see Figure 16).

Device model link Opens the customer device model file in the Editor Area.

Asset model link Opens the asset model file in the Editor Area.

4 Sierra Wireless™ Developer Zone - Development Cases

Page 5: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Before you Begin

Figure 2: Simulator tabs - Data/Events Generation tab

Simulated data and events are listed in a searchable pane to the left.

Clicking on or (after having selected a data or event) allows you to either add

or remove a data or event.

Clicking on the simulated data or event in the left pane displays the simulated data’s

or event’s settings:

Figure 3: Data simulation settings

5

Page 6: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Before you Begin

Figure 4: Event simulation settings

Data and events settings are divided into three groups:

The Quick Data Sending section allows you to quickly send a data to the

AirVantage™ Operating Portal. Clicking on the [quickly send a new value of the

selected Variable] link opens a window where you can set the value to be sent and

check whether the value is valid:

Table 4 - 5: Data and Event simulation settings

Setting Description

Generation The simulated data itself. In our case, the temperature of a room. Does not apply to events (which are spontaneously generated).

You can choose the generation delay and type:

• INCREMENT: data value incrementally generated, from a min. to a max. value.

• LIST: generation based on a list of values (separated by a space or taken from a file),

• RANDOM: random generation from a min. to a max. value.

Acquisition Interval at which a data is acquired (stored in the device) before being published on the AirVantage™ Operating Portal.

You can choose the acquisition delay and type.

Publication Interval at which a data is published (pushed) on the AirVantage™ Operating Portal.

You can choose the publication delay and type.

6 Sierra Wireless™ Developer Zone - Development Cases

Page 7: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Before you Begin

Figure 5: Data quick sending

You can also quickly send an event from the Quick Event Sending section available

from event settings.

SIMULATION DASHBOARD

Allows you to start, stop and monitor your simulation.

Figure 6: Simulator tabs - Simulation Dashboard tab

The last 500 data, event, acquisition and publication logs are logged in a table, which

can be filtered using filtering buttons:

Table 4 - 6: Simulation logs table

Button Description

Hides data logs.

7

Page 8: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Before you Begin

Data-writing and other commands can be monitored in a Received DataWritings and

Commands table and their status set as Failed or Success.

DATA/COMMANDS RECEPTION

Allows you to fine-tune data and commands sent from the AirVantage™ Operating

Portal to the communication device or asset.

Figure 7: Simulator tabs - Data/Commands Reception

BANDWIDTH ESTIMATION

Allows you to estimate the bandwidth consumption resulting from your simulation.

Hides event logs.

Hides acquisition logs.

Hides publication logs

Locks the scrolling.

Clears logs.

Table 4 - 6: Simulation logs table (...)

Button Description

8 Sierra Wireless™ Developer Zone - Development Cases

Page 9: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Before you Begin

Figure 8: Simulator tabs - Bandwidth Estimation tab

Enter a period in the Simulation period field, choose a time unit (SECONDS, MINUTES,

HOURS, DAYS) and click on .

Statistics are displayed in the Messages statistics section.

End-to-End Application Description

Development cases are based on a specific end-to-end M2M application made up of

an embedded part and a server/standalone part.

This end-to-end application can be represented as follows:

9

Page 10: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Before you Begin

Figure 9: Figure 2 - 1: Development case end-to-end application

THE DEVELOPMENT CASE SCENARIO

This section describes the different elements of the development case scenario:

company and user, asset and communication device.

THE COMPANY AND USER

M2M applications are owned by companies and managed or operated by one or more

users.

In the context of these development cases, your company is called "demo_company"

(child to the Developer Program parent company) and your user "demo" (with the

Developer Program User profile).

Both company and user are automatically created when creating a user account in the

AirVantage™ Operating Portal from the developer website.

THE ASSET AND COMMUNICATION DEVICE

Your asset is a thermometer - a simulated thermometer, since no real asset is linked

to the communication device - and your communication device is either a Fastrack

Xtend or an M2MBoxPro or any other Sierra Wireless communication device.

Basically, the asset virtually senses an ambient temperature and the communication

device monitors it. The asset monitoring can be remotely turned on or off.

A threshold temperature is defined and can be remotely changed: if the monitored

value is above, an event is sent to the AirVantage™ Operating Portal.

This behavior is translated within communication devices as an embedded application

which logically links asset and communication device together and to the

AirVantage™ Operating Portal.

10 Sierra Wireless™ Developer Zone - Development Cases

Page 11: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

Asset and communication device form - together with models - the embedded part of

the M2M application.

EMBEDDED APPLICATION

The embedded application defines the way communication device and AirVantage™

Operating Portal communicate together, and data, events and commands exchanged

between them.

The embedded application developed as part of these development cases allows the

communication device to:

monitor a simulated value, the temperature, in memory and push data

periodically to the AirVantage™ Operating Portal,

receive commands from the AirVantage™ Operating Portal to set up a threshold

temperature value,

receive commands from the AirVantage™ Operating Portal to start (default

state) or stop the monitoring of the asset,

send instant alerts when the monitored value reaches the threshold (no other alert

is generated while the value remains above the threshold).

Simulating the Device

The process for developing an embedded application using the AirVantage™

Configuration Tools simulator is the following:

1 Create an Operating Portal project (see "Creating a new project in the

AirVantage™ Configuration Tools platform" on page 4-11).

2 Set new connection settings (see "Setting connection settings in the

AirVantage™ Configuration Tools platform" on page 4-14).

3 Create models and upload them to the AirVantage™ Operating Portal (see

"Creating models in the AirVantage™ Configuration Tools platform" on page 4-

18).

4 Check simulation settings and launch the simulator (see "Setting-up a

simulation in the AirVantage™ Configuration Tools platform" on page 4-32).

The following procedures show you how to do so.

CREATING A NEW PROJECT IN THE AIRVANTAGE™ CONFIGURATION TOOLS PLATFORM

The following procedure shows you how to create a new project in the AirVantage™

Configuration Tools platform.

To create a new project in the AirVantage™ Configuration Tools platform

1 Launch the AirVantage™ Configuration Tools platform.

A Workspace Launcher window opens:

11

Page 12: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

Figure 10: AirVantage™ Configuration Tools installer - Workspace Launcher

2 Choose a workspace.

3 Click on [OK].

The AirVantage™ Configuration Tools is automatically launched:

Figure 11: AirVantage™ Configuration Tools

4 Select File > New > Operating Portal Project:

12 Sierra Wireless™ Developer Zone - Development Cases

Page 13: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

Figure 12: Launching the New Project wizard

A New Project window opens:

Figure 13: New Project wizard

5 Enter a project name in the Project name field: for example, Temperature

Project.

6 If needed, change the project location by unchecking Use default location and

entering a new location in the Location field.

7 Click on [Finish].

The new project is created in the Project Explorer view:

Figure 14: Newly created project in Project Explorer view

Alternatively, you can also right-click in the Project Explorer view,select New > Project, then Configuration Tools > Projects >Operating Portal Project in the New Project wizard’s first step.

13

Page 14: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

You can now set the platform’s connection setting so that it connects to the

AirVantage™ Operating Portal using the demo user account.

SETTING CONNECTION SETTINGS IN THE AIRVANTAGE™ CONFIGURATION TOOLS PLATFORM

The following procedure shows you how to set new connection settings in the

AirVantage™ Configuration Tools platform.

To set new connection settings in the AirVantage™ Configuration Tools platform

1 In the Models Explorer view, click on the [Server connection settings] link:

Figure 15: Launching server connection settings preferences

The Preferences window opens on the Operating Portal section:

14 Sierra Wireless™ Developer Zone - Development Cases

Page 15: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

Figure 16: AirVantage™ Configuration Tools - Preferences window

The m2mop.net connection configuration is selected by default.

2 Click on [Edit]. The Edition window opens:

Figure 17: Connection setting edition window

15

Page 16: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

3 Enter a username in the Username field: for example, demo.

4 Enter a password in the Password field.

5 Test by clicking on [Test credentials]:

Figure 18: Testing credentials

A green check and confirmation message appears, indicating that the user

exists in the AirVantage™ Operating Portal. You can also check that your

company and groups exist in the portal:

6 Enter a company path in the Company path field: for example, /Developer

Program/demo_company.

7 Enter a device group and asset group name in the Device Group name and

Asset Group name respectively: for example, demo_company.

8 Test by clicking on [Check Company and Groups]:

Figure 19: Testing company and group

9 Click on [OK].

An Edit Connection Settings Configuration window opens, asking you for a

replacement of the existing configuration setting of creation of a new one based

on the username (<username>@<serverURL>):

Figure 20: Edit Connection Settings Configuration

10 Click on [Yes] to create a new configuration setting.

16 Sierra Wireless™ Developer Zone - Development Cases

Page 17: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

11 Click on [Set as default].

The [email protected] configuration setting is set as default:

Figure 21: New default configuration setting

12 Click on [OK].

The Models Explorer now displays a [email protected] server setting in the

Server settings expandable pane:

Figure 22: Models Explorer with newly set configuration setting

You can now create your models.

17

Page 18: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

CREATING MODELS IN THE AIRVANTAGE™ CONFIGURATION TOOLS PLATFORM

Three models are needed (see "Learn about models" on page 4-3):

a Manufacturer Device model, provided by Sierra Wireless™ and to be uploaded

from the AirVantage™ Operating Portal to the AirVantage™ Configuration

Tools platform,

a Customer Device model, linked to the Manufacturer Device model,

an Asset model, defining the monitored and controlled variables as well as

commands and events of your embedded application to be created using the the

AirVantage™ Configuration Tools platform.

The following procedures show you how to import and create models in the

AirVantage™ Configuration Tools platform.

To import a model in the AirVantage™ Configuration Tools platform

1 Select the type of model you want to download in the Model type drop-down

menu of the Search criteria expandable pane (Models Explorer view): for

example, Manufacturer.

Figure 23: Selecting manufacturer models

2 Click on [Search].

All available manufacturer models are displayed:

18 Sierra Wireless™ Developer Zone - Development Cases

Page 19: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

Figure 24: Manufacturer model search - Result table

3 Double-click on the required asset model: for example, FSU10.

An Import model window opens, displaying the previously created project:

Figure 25: Import model window

4 Select the model and click [OK].

The model is downloaded and added to the project. It now appears in the

Project Explorer. An "M" in the model icon ( ) indicates that it is a

manufacturer model:

19

Page 20: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

f

Figure 26: Newly added manufacturer model in Project Explorer

You can now create your customer device and asset models to meet the needs of your

embedded application.

To create models in the AirVantage™ Configuration Tools

1 Double-click on the manufacturer model with which you want to associate your

customer model, in the Project Explorer (see "To import a model in the

AirVantage™ Configuration Tools platform" on page 4-18): for example,

FSU10.

The manufacturer model opens in the Editor Area:

Figure 27: Manufacturer model in Editor Area

2 Click on the [Create a Customer Model] link.

A New Customer Model window opens:

20 Sierra Wireless™ Developer Zone - Development Cases

Page 21: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

Figure 28: New Customer Model window

3 Select the project: for exmaple, Temperature Project.

4 Enter a name in the File name field: for example,

TemperatureCustomerModel.xml.

5 Click on [Next], then on [Finish].

The model is created in the project. It now appears in the Project Explorer. A

"C" in the model icon ( ) indicates that it is a manufacturer model:

Figure 29: Newly created customer model in Project Explorer

The model automatically opens in the Editor Area:

21

Page 22: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

Figure 30: Customer model in Editor Area

You can now create your asset model containing the variables, commands and

events of your embedded application.

6 Click on the new asset model icon in the tool bar:

Figure 31: Creating a new asset model

A New Asset Model window opens:

22 Sierra Wireless™ Developer Zone - Development Cases

Page 23: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

Figure 32: New Asset Model window

7 Select the project: for example, Temperature Project.

8 Enter a name in the File name field: for example, TemperatureAsset.xml.

9 Click on [Finish].

The model is created in the project. It now appears in the Project Explorer. A

"A" in the model icon ( ) indicates that it is a asset model:

Figure 33: Newly created asset model in Project Explorer

The model automatically opens in the Editor Area:

23

Page 24: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

Figure 34: Asset model in Editor Area

We will now create and set the data, commands and events required by the

embedded application, starting with data.

The data to be created are defined as follows:

10 Select the Data tab at the bottom of the asset model in the Editor Area.

11 Click on [Add Variable]:

Table 4 - 7: Asset model variables

Variable TypeAccess Right

Unit Definition

Temperature int RW C Monitored variable representing the temperature read on the thermometer.

ThresholdTemperature int RW C Controlled variable representing the threshold temperature. When exceeded, a Temperature Exceeded event is sent to the AirVantage™ Operating Portal.

UpdateRate int RW s. Controlled variable representing the interval at which data the Temperature variable is sent to the AirVantage™ Operating Portal.

OperatingState int RW - Controlled variable used to indicate the operating state or your asset, if the monitored value (temperature) exceeds or is below the threshold temperature for instance.

MonitorActive boolean RW - Controlled variable indicating whether the asset is monitored (when true) or not (when false).

24 Sierra Wireless™ Developer Zone - Development Cases

Page 25: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

Figure 35: Adding a variable to the asset model

A new variable appears in the Variables section. The variable properties are

displayed in the Variable Properties section.

The first variable to be defined is the monitored temperature: Temperature.

12 Enter a path in the Path field: for example /monitor, as the temperature is a

monitored variable.

13 Enter a name in the Name field: for example, Temperature.

14 Select a type in the Type drop-down menu: for example, int.

15 Select an access right in the Access Right drop-down menu: for example, RW.

16 Enter a label in the Label field: for example, Temperature Reading.

17 Enter a unit in the Unit field: for example, C for Celsius degrees.

18 Save your changes by pressing Ctrl + S.

The Temperature variable is now created and properly defined in the

TemperatureAsset.xml asset model.

We will now create and set the second variable, ThresholdTemperature.

19 Click on the Add a new variable icon .

20 Repeat steps 12 to 18 to define the variable as follows:

• Name: ThresholdTemperature,

25

Page 26: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

• Path: /control, as the temperature threshold variable can be controlled,

• Type: int,

• Access right: RW,

• Label: Threshold,

• Unit: C.

21 Create as many variables as needed, for example by referring to the Table

"Asset model variables" on page 4-24.

22 Save your changes by pressing Ctrl + S.

Defined variables appear in the Variables section:

Figure 36: Asset model variables

Variables are now created, the next step consists in creating events. In the

context of this development case, only one event must be created,

Temperature Exceeded.

23 Select the Events tab.

24 Click on the [Add event] link or icon.

A new event appears in the Events section. The event properties appear in the

Event Properties section:

26 Sierra Wireless™ Developer Zone - Development Cases

Page 27: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

Figure 37: Adding an event to the asset model

25 Select the event in the Event selection window which opens: for example

Temperature Exceeded.

26 Select a level in the Level drop-down menu: for example, CRITICAL.

27 Check the Ackowledgeable checkbox if you want to create an ackowledgeable

event.

28 Check the Alarm checkbox if you want the event to raise an e-mail or sms

alarm.

29 Save your changes by pressing Ctrl + S.

The event is now created.

30 If you checked the Alarm checkbox, select the Alarms tab.

31 Click on the [Add Alarm] link or icon.

A new alarm appears in the Alarms section. The alarm properties appear in the

Alarm properties section:

27

Page 28: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

Figure 38: Adding an alarm to the asset model

This tab allows you to associate an alarm with one or several events, choose the

alarm type (e-mail or SMS) and create the textual content to be sent with the

alarm.

32 Select EMAIL in the Type drop-down menu. Alarm types are indicated by a

specific icon ( for SMS or for e-mail) in the event list.

33 Click on in the Specfic Events section to associate the alarm with a specific

event.

34 Select the event in the Event selection window which opens: for example

Temperature Exceeded.

35 Click on [OK]. The event is added to the Specific Events table.

36 Select the Content tab.

The properties pane is reconfigured so that you can create a subject and a

textual content to be sent by e-mail with the alarm:

28 Sierra Wireless™ Developer Zone - Development Cases

Page 29: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

Figure 39: Alarm subject and content

37 Enter a subject in the Subject field: for example Temperature Exceeded.

38 Enter a message in the Message field.

The alarm is now created. We will now create operating states for your asset, via

the OperatingState variable.

Operating states are used to represent visually the state of your asset while

monitoring it (for example, red when the monitored temperature is "too hot").

39 Select the Operating States tab.

40 Click on the [Add OperatingState] link or icon.

A new operating state appears in the Operating States section. The operating

state properties appear in the Operating State Properties section:

29

Page 30: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

Figure 40: Adding an operating state to the asset model

The operating state of your asset is represented by the OperatingState

variable.

41 Click on the button to the right of the Variable field.

42 Select the operating state variable in the Variable selection window which

opens: for example, OperatingState.

30 Sierra Wireless™ Developer Zone - Development Cases

Page 31: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

Figure 41: Choosing an operating state variable

43 Enter a Label in the Label field: for example, Below Threshold.

44 Choose the color representing the state being defined in the Color drop-down

menu: for example green.

45 Set the variable value corresponding to this state in the Variable Value field:

for example, 0.

46 Click on the [Add OperatingState] link or icon and repeat steps 43 to 45 to

set the second operating state:

• Label: Too Hot.

• Color: red.

• Variable value: 1.

47 Save your changes by pressing Ctrl + S.

Operating states are now created and set. The final step consists in uploading

the model to the AirVantage™ Operating Portal.

48 Switch back to the Overview tab.

49 Click on the [Upload model to the OperatingPortal] link:

Figure 42: Uploading model to the AirVantage™ Operating Portal

31

Page 32: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

SETTING-UP A SIMULATION IN THE AIRVANTAGE™ CONFIGURATION TOOLS PLATFORM

The following section shows you how to simulate an embedded application using the

AirVantage™ Configuration Tools platform.

To set simulation settings and launch the simulation

1 Assuming that the AirVantage™ Configuration Tools platform is launched,

and that all needed models are present in the Temperature Project project,

open your asset model (TemperatureAsset.xml).

The asset model file opens in the platform’s Editor Area:

Figure 43: Asset model page

2 Click on [Simulate Asset].

The New Device Simulation wizard is automatically launched.

32 Sierra Wireless™ Developer Zone - Development Cases

Page 33: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

Figure 44: New Device Simulation wizard - Step 1 (Simulation naming and model selection)

The wizard’s first step allows you to name your simulation, select a customer device

model and choose whether to launch a device or an asset simulation. The Asset

model field is set by default to the previously imported asset model,

TemperatureAsset.xml.

3 Enter a simulation name in the Simulation name field: for example,

TemperatureSimulation.

4 Click on to the right of the Device model field to choose a customer

device model.

A Customer model selection window displaying previously imported customer

device models opens:

33

Page 34: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

Figure 45: Customer model selection window

5 Select the customer device model: for example,

TemperatureCustomerModel.xml.

6 Click on [OK].

7 Click on [Next]. The step dedicated to simulated variables and events appears:

Figure 46: New Device Simulation wizard - Step 1 (Variable and Event selection)

This step lists all variables either monitored or controlled from the

AirVantage™ Operating Portal as well as events sent from the device. We will

34 Sierra Wireless™ Developer Zone - Development Cases

Page 35: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

now select the simulated variable (temperature) and event.

8 Click on the monitored variable and event while keeping the Ctrl key pressed.

Both are highlighted in blue in the window:

Figure 47: Selected variable and event

9 Click on [Finish].

The TemperatureSimulation-simulation.xml simulation configuration

page opens in the platform’s Editor Area:

Figure 48: Simulation Configuration page

Device and asset names are set by default to simu-device1 and sim-asset1

respectively. You can change names to make simulated devices and assets more

readily identifiable in the AirVantage™ Operating Portal’s Asset Management

module (see Figure 51).

35

Page 36: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

10 Check that the device groupe path is correct in the Device group path field.

11 Enter a simulated device name in the DeviceID field: for example,

demo_device1.

12 Check that the asset groupe path is correct in the Asset group path field.

13 Enter a simulated asset name in the AssetID field: for example, demo_asset1.

We will now set simulated data and event parameters.

14 Select the Data/Events Generation tab.

15 Select the simulated data in the left pane: /monitor - Temperature: int.

The page is reconfigured to display the simulated data settings.

16 Change the generation settings so that simulated data are randomly generated

every 5 seconds with values between 100 and 350 °F, acquired and published

every 10 seconds by:

a Selecting SECONDS in the Time unit drop-down menu.

b Entering 5 in the Delay field.

c Selecting RANDOM in the Type drop-down menu.

d Entering 100 in the Min value field.

e Entering 350 in the Max value field.

f Entering 10 in the Acquisition delay field.

g Entering 10 in the Publication delay field.

Figure 49: Setting data generation, acquisition and publication parameters

The DeviceID needs to be unique in the AirVantage™ OperatingPortal. You can for example use the following format :<userlogin>_device<number>.

The AssetD needs to be unique in the AirVantage™ OperatingPortal. You can for example use the following format :<userlogin>_asset<number>.

36 Sierra Wireless™ Developer Zone - Development Cases

Page 37: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

17 Select the simulated event in the left pane: Temperature exceeded.

The page is reconfigured to display the simulated event settings.

18 Check that time unit, acquisition and publication delays meet your needs. You

can leave default values unchanged.

We can now start the simulation.

19 Select the Simulation Dashboard tab.

20 Click on the [Start] button .

A message appears, offering you the option to save your changes or to continue

without saving.

21 Click on [Yes] to save your changes.

The simulation starts. After 5 seconds, the first simulated data is generated,

then published 5 seconds later. It is timestamped according to the Serialization

parameter set in data settings.

New data and events are published every 10 seconds and 30 seconds

respectively:

Figure 50: Simulated data and events

You can stop the simulation anytime by clicking on the [Stop] button .

Simulated data and events are pushed ("published") to the AirVantage™

Operating Portal every 10 seconds and 30 seconds respectively.

You can now log in to the AirVantage™ Operating Portal and access the Asset

Management module’s Events and Data tabs to check that simulated data and

events are properly logged.

22 Log in to the AirVantage™ Operating Portal with the demo user.

23 Open the Asset Management module.

The module opens on the Asset tab:

37

Page 38: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

Figure 51: Simulated device in Asset tab

The simulated asset created in the simulator (TemperatureAsset-asset1)

appears in the asset table of the demo user.

24 Select the Data tab.

Simulated data appear in a data row:

Figure 52: Simulated data in Data tab

25 Click on the line to open a Parameter History Temperature window:

38 Sierra Wireless™ Developer Zone - Development Cases

Page 39: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1"Simulating the Device

Figure 53: Parameter history window

26 Select the Events tab.

Simulated events appear in a data row.

39

Page 40: Simulating a Device using the AirVantage™ Device Simulator v1

"Simulating a Device using the AirVantage™ Device Simulator v1.1" Simulating the Device

40 Sierra Wireless™ Developer Zone - Development Cases