appzone c - 2.0 user guide...expressed or implied warranty of fitness for such high risk activities....

80
Mod. 0806 2017-01 Rev.6 [01.2017] APPZONE C - 2.0 User Guide 1VV0301595 Rev. 1 – 2019-07-168

Upload: others

Post on 03-Jan-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

Mod. 0806 2017-01 Rev.6

[01.

2017

]

APPZONE C - 2.0 User Guide

1VV0301595 Rev. 1 – 2019-07-168

Page 2: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 2 of 80 2019-07-16

SPECIFICATIONS ARE SUBJECT TO CHANGE WITHOUT NOTICE

NOTICES LIST

While reasonable efforts have been made to assure the accuracy of this document, Telit assumes no liability resulting from any inaccuracies or omissions in this document, or from use of the information obtained herein. The information in this document has been carefully checked and is believed to be reliable. However, no responsibility is assumed for inaccuracies or omissions. Telit reserves the right to make changes to any products described herein and reserves the right to revise this document and to make changes from time to time in content hereof with no obligation to notify any person of revisions or changes. Telit does not assume any liability arising out of the application or use of any product, software, or circuit described herein; neither does it convey license under its patent rights or the rights of others. It is possible that this publication may contain references to, or information about Telit products (machines and programs), programming, or services that are not announced in your country. Such references or information must not be construed to mean that Telit intends to announce such Telit products, programming, or services in your country.

COPYRIGHTS

This instruction manual and the Telit products described in this instruction manual may be, include or describe copyrighted Telit material, such as computer programs stored in semiconductor memories or other media. Laws in the Italy and other countries preserve for Telit and its licensors certain exclusive rights for copyrighted material, including the exclusive right to copy, reproduce in any form, distribute and make derivative works of the copyrighted material. Accordingly, any copyrighted material of Telit and its licensors contained herein or in the Telit products described in this instruction manual may not be copied, reproduced, distributed, merged or modified in any manner without the express written permission of Telit. Furthermore, the purchase of Telit products shall not be deemed to grant either directly or by implication, estoppel, or otherwise, any license under the copyrights, patents or patent applications of Telit, as arises by operation of law in the sale of a product.

COMPUTER SOFTWARE COPYRIGHTS

The Telit and 3rd Party supplied Software (SW) products described in this instruction manual may include copyrighted Telit and other 3rd Party supplied computer programs stored in semiconductor memories or other media. Laws in the Italy and other countries preserve for Telit and other 3rd Party supplied SW certain exclusive rights for copyrighted computer programs, including the exclusive right to copy or reproduce in any form the copyrighted computer program. Accordingly, any copyrighted Telit or other 3rd Party supplied SW computer programs contained in the Telit products described in this instruction manual may not be copied (reverse engineered) or reproduced in any manner without the express written permission of Telit or the 3rd Party SW supplier. Furthermore, the purchase of Telit products shall not be deemed to grant either directly or by implication, estoppel, or otherwise, any license under the copyrights, patents or patent applications of Telit or other 3rd Party supplied SW, except for the normal non-exclusive, royalty free license to use that arises by operation of law in the sale of a product.

Page 3: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 3 of 80 2019-07-16

USAGE AND DISCLOSURE RESTRICTIONS

I. License Agreements

The software described in this document is the property of Telit and its licensors. It is furnished by express license agreement only and may be used only in accordance with the terms of such an agreement.

II. Copyrighted Materials

Software and documentation are copyrighted materials. Making unauthorized copies is prohibited by law. No part of the software or documentation may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language or computer language, in any form or by any means, without prior written permission of Telit

III. High Risk Materials

Components, units, or third-party products used in the product described herein are NOT fault-tolerant and are NOT designed, manufactured, or intended for use as on-line control equipment in the following hazardous environments requiring fail-safe controls: the operation of Nuclear Facilities, Aircraft Navigation or Aircraft Communication Systems, Air Traffic Control, Life Support, or Weapons Systems (High Risk Activities"). Telit and its supplier(s) specifically disclaim any expressed or implied warranty of fitness for such High Risk Activities.

IV. Trademarks

TELIT and the Stylized T Logo are registered in Trademark Office. All other product or service names are the property of their respective owners.

V. Third Party Rights

The software may include Third Party Right software. In this case you agree to comply with all terms and conditions imposed on you in respect of such separate software. In addition to Third Party Terms, the disclaimer of warranty and limitation of liability provisions in this License shall apply to the Third Party Right software. TELIT HEREBY DISCLAIMS ANY AND ALL WARRANTIES EXPRESS OR IMPLIED FROM ANY THIRD PARTIES REGARDING ANY SEPARATE FILES, ANY THIRD PARTY MATERIALS INCLUDED IN THE SOFTWARE, ANY THIRD PARTY MATERIALS FROM WHICH THE SOFTWARE IS DERIVED (COLLECTIVELY “OTHER CODE”), AND THE USE OF ANY OR ALL THE OTHER CODE IN CONNECTION WITH THE SOFTWARE, INCLUDING (WITHOUT LIMITATION) ANY WARRANTIES OF SATISFACTORY QUALITY OR FITNESS FOR A PARTICULAR PURPOSE. NO THIRD PARTY LICENSORS OF OTHER CODE SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND WHETHER MADE UNDER CONTRACT, TORT OR OTHER LEGAL THEORY, ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE OTHER CODE OR THE EXERCISE OF ANY RIGHTS GRANTED UNDER EITHER OR BOTH THIS LICENSE AND THE LEGAL TERMS APPLICABLE TO ANY SEPARATE FILES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES

Page 4: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 4 of 80 2019-07-16

APPLICABILITY TABLE

PRODUCTS ME910C1-P2 ME910C1-WW

30.00.xx5 / M0B.xx0004

Page 5: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 5 of 80 2019-07-16

CONTENTS

NOTICES LIST ................................................................................................. 2

COPYRIGHTS .................................................................................................. 2

COMPUTER SOFTWARE COPYRIGHTS ....................................................... 2

USAGE AND DISCLOSURE RESTRICTIONS ................................................ 3 I. License Agreements ....................................................................... 3 II. Copyrighted Materials .................................................................... 3 III. High Risk Materials ........................................................................ 3 IV. Trademarks .................................................................................... 3 V. Third Party Rights ........................................................................... 3

APPLICABILITY TABLE .................................................................................. 4

CONTENTS ...................................................................................................... 5

1. INTRODUCTION ............................................................................ 9 Scope ............................................................................................. 9 Audience ........................................................................................ 9 Contact Info and Support ............................................................... 9 Icons and Text Conventions ......................................................... 10 Related Documents ...................................................................... 11

2. ABOUT APPZONE C ................................................................... 12 AppZone C overview .................................................................... 12 AppZone vs. Application Processor.............................................. 13

3. INSTALL APPZONE IDE ............................................................. 15 Hardware and Software Requirements ........................................ 15 Install the IoT AppZone C IDE ...................................................... 16 Connect the Module ..................................................................... 17 Update Versions Automatically..................................................... 18

3.4.1. Update the Software Versions ...................................................... 18 3.4.2. Update the Firmware .................................................................... 20 3.4.3. Update Manually .......................................................................... 20 3.4.4. Change Automatic Upgrade Preferences ..................................... 21 3.4.5. Migrate project after upgrading the IDE........................................ 21 3.4.6. Uninstall Updates ......................................................................... 21 3.4.7. Install an Older Version ................................................................ 22

4. GET STARTED ............................................................................ 23

Page 6: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 6 of 80 2019-07-16

Main Window ................................................................................ 23 AZ C Console ............................................................................... 24

5. CREATE APPLICATIONS ........................................................... 27 Create an Application ................................................................... 27

6. SAMPLE APPLICATIONS ........................................................... 32 Hello World ................................................................................... 32

6.1.1. Application workflow ..................................................................... 32 File System ................................................................................... 33

6.2.1. Application workflow ..................................................................... 33 Hw Timer ...................................................................................... 34

6.3.1. Application workflow ..................................................................... 34 Logging ......................................................................................... 35

6.4.1. Application workflow ..................................................................... 35 MultiTask ...................................................................................... 35

6.5.1. Application workflow ..................................................................... 35 TCP-IP .......................................................................................... 36

6.6.1. Application workflow ..................................................................... 36 TCP-SSL Client ............................................................................ 37

6.7.1. Application workflow ..................................................................... 37 Gpio .............................................................................................. 39

6.8.1. Application workflow ..................................................................... 39 I2C ................................................................................................ 40

6.9.1. Application workflow ..................................................................... 40

Page 7: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 7 of 80 2019-07-16

40 SPI ................................................................................................ 41 SMS_PDU .................................................................................... 44 UART_to_server ........................................................................... 45 UDP .............................................................................................. 46

6.13.1. Application workflow ..................................................................... 46 GNSS ........................................................................................... 47

6.14.1. Application workflow ..................................................................... 47 ATI ................................................................................................ 47

6.15.1. Application workflow, sync ........................................................... 47 6.15.2. Application workflow, async ......................................................... 48

BUILD APPLICATIONS ................................................................................. 49 Set Project Settings ...................................................................... 49 Compile the Project ...................................................................... 50

7. CUSTOMIZE APPLICATION PROJECTS ................................... 51

8. BUILD YOUR APPLICATION ...................................................... 53 Run Applications on the Module – Manual process ..................... 53

8.1.1. Connect the COM Port ................................................................. 53

Page 8: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 8 of 80 2019-07-16

8.1.2. Upload and Run the Application ................................................... 54

9. STATIC LIBRARIES .................................................................... 56 Creating an AppZoneC static library............................................. 56

10. TROUBLESHOOTING ................................................................. 60

11. APPENDIX A - AT SYNTAX ........................................................ 61 AT+M2M ....................................................................................... 61 AT#M2MWRITE ........................................................................... 62 AT#M2MLIST ............................................................................... 65 AT#M2MDEL ................................................................................ 67 AT#M2MREAD ............................................................................. 68 AT#M2MRUN ............................................................................... 69 AT#M2MMKDIR ........................................................................... 71 AT#M2MRMDIR ........................................................................... 72 M2M AT Command Examples...................................................... 74

11.9.1. AT+M2M=0 ................................................................................... 75 11.9.2. AT+M2M=1 ................................................................................... 75 11.9.3. AT+M2M=4,xx .............................................................................. 75

12. APPENDIX B - USING THE RVCT COMPILER .......................... 77

13. ACRONYMS ................................................................................ 78

14. DOCUMENT HISTORY ................................................................ 79

Page 9: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 9 of 80 2019-07-16

1. INTRODUCTION Scope

This document describes the AppZone C development environment and how to use the development environment to develop applications for Telit modules. It also provides examples using the +M2M AT commands to configure the module and manage the M2M applications uploaded into the module. The development environment is based on Eclipse IDE. For complete documentation of the Eclipse IDE, refer to Eclipse documentation at http://www.eclipse.org/.

Audience This guide is intended for users who need to develop a custom application (M2M application) and run it on a Telit’s module as an embedded application that uses the services provided by the module itself.

Contact Info and Support

For general contact, technical support services, technical questions and report documentation errors contact Telit Technical Support at:

[email protected][email protected][email protected][email protected] (for Short Range Devices)

Alternatively, use:

http://www.telit.com/support

For detailed information about where you can buy the Telit modules or for recommendations on

accessories and components visit:

http://www.telit.com

Our aim is to make this guide as helpful as possible. Keep us informed of your comments and

suggestions for improvements.

Telit appreciates feedback from the users of our information.

Page 10: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 10 of 80 2019-07-16

Icons and Text Conventions

SET section – This section provides all information related to SET functionality of involved AT command. If it has got strictly and relevant SET information, these are located at section end.

READ section – This section provides all information related to READ functionality of involved AT command. If it has got strictly and relevant READ information, these are located at section end.

TEST section – This section provides all information related to TEST functionality of involved AT command. If it has got strictly and relevant TEST information, these are located at section end.

Additional info – This section provides any kind of additional and useful information related to the AT command section as well as command exceptions or special behavior cases.

REFERENCE section – This section provides useful references (standards or normative) related to involved AT command.

EXAMPLE section – This section provides useful examples related to involved AT command.

NOTE section – This section provides all information related to involved AT commands. Each note can provide a different level of information: danger, caution/warning and tip/information.

Danger – This information MUST be followed or catastrophic equipment failure or bodily injury may occur.

Caution or Warning – Alerts the user to important points about integrating the module, if these points are not followed, the module and end user equipment may fail or malfunction.

Tip or Information – Provides advice and suggestions that may be useful when integrating the module.

All dates are in ISO 8601 format, i.e. YYYY-MM-DD.

Page 11: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 11 of 80 2019-07-16

Related Documents [1] ME910C1 HW User Guide: 1VV0301351. [2] ME910C1 AT Command Reference Guide: 80529ST10815A.

In the next pages is used the notation [x]/[y] to refer to documents of different modules. You have to see the document in accordance with the module you are using.

Page 12: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 12 of 80 2019-07-16

2. ABOUT APPZONE C AppZone C is a development environment that allows to build and run applications on Telit cellular modules. The integrated development environment and tools are based on Eclipse IDE and running on Windows and Linux.

AppZone C overview AppZone C is a software layer that provides a set of APIs (m2mb_ xxx) to access module

hardware and software features . By means of AppZone C, the user application runs on the

module CPU; this solution does not require an external application processor.

You can develop applications that can address a wide range of different use cases such as

remote monitoring and control, security and surveillance, telemetry, location services, billing, and

fleet management. The user application can access the following modem resources:

• Operating System: Signals, Semaphores, Timers, Dynamic Memory Management, etc.

• HW/SW: GPIO, I2C, UART, SPI, Keypad, File-System, RTC, etc.

• GSM/GPRS: Communication services.

• Networking: BSD socket support, SSL capabilities. Refer to document [1] for information on module hardware resources.

Figure 1 shows the high-level architecture of a module provided with the AppZone C software

layer. Use AppZone C to develop custom applications, in accordance with the AppZone layer

Figure 1: AppZone Architecture

Page 13: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 13 of 80 2019-07-16

The project default skeleton includes a single template file in the src folder. The file,

M2MB_main.c , contains the M2MB_main() function, which is the implementation of the

application main task. User can create new files and add more Tasks.

C/C++ programming languages can be used to develop the applications

AppZone vs. Application Processor The figures below show two generic examples of hardware/software configurations that point out

the differences between the use of a module providing the AppZone C Software Layer and

another not providing that feature.

Figure 2 shows a configuration where the user application is running on an external application

processor. The user application uses the cellular services and User Device #2 by means of the

“A” interface, e.g. a serial port.

Figure 2 - Module without AppZone C Layer

Figure 3 shows a configuration where the module provides the AppZone layer. In this scenario,

the user application is running on the module CPU. The user application uses the cellular

services, User Device #1, and #2 by means of AppZone APIs. The external user application

processor is not required.

Page 14: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 14 of 80 2019-07-16

Figure 3 - Module with AppZone C Layer

Page 15: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 15 of 80 2019-07-16

3. INSTALL APPZONE IDE AppZone C is part of AppZone development suite. The integrated development environment is

based on Eclipse IDE and running on Windows and Linux. The AppZone C plugin is an Eclipse

addon that provides a set of functionalities to create and manage user applications. During the

installation, AppZone C announces itself as IoT AppZone IDE.

Please check that AppZone C library version is aligned with the software version of the firmware running of the module in use

AppZone C checks for software and firmware updates. If a new version is available, AppZone C

displays a notification. You can update the software versions automatically. AppZone C also

downloads new firmware versions of the module that is connected to your PC. If you do not

enable automatic updates, you can update the software and the firmware manually at any time.

AppZone C uses the Eclipse platform to check for Software updates during startup. You can

change the automatic update configuration at any time. See Change Automatic Upgrade

Preferences for more information.

Hardware and Software Requirements To install AppZone C you must:

• Have administrator permissions

• Know which module family you will be using The following table lists the requirements for installing AppZone C:

OS Windows 7 (32bit or 64bit), Windows 8, Windows 10 RAM 1 Gb Free disk space 1250 MB free disk space

Java SE Runtime

Java™ SE Runtime Environment 32-bit Note: 64-bit is not compatible with AppZone IDE.

Page 16: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 16 of 80 2019-07-16

Install the IoT AppZone C IDE To install AppZone C on Windows: 1. Access the Telit portal: https://www.telit.com/developer-zone/iot-app-zone/iot-app-zone-

developer-resources/ 2. Click the AppZone installation file.

The installation wizard starts.

3. If the correct Java version is not installed, the wizard downloads the appropriate package and prompts the user to install it. Once it is installed, restart the installer.

4. Click Next to continue. 5. Read the license agreement. If you agree, click I Agree to continue. 6. Select AppZone C, and then click Next.

Figure 4 - IoT AppZone IDE Setup - product selection

To install more than one development environment, click Custom and select the

development environments that you want to install.

7. Choose the destination folder in which to install AppZone C. You can leave the default folder or click Browse to select a new destination folder.

Page 17: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 17 of 80 2019-07-16

Figure 5 - IoT AppZone IDE Setup - Installation location

8. Click Install to begin the installation.

The installation wizard downloads the files that are required for the development

environment that you selected.

9. Click Finish to close the AppZone C installation wizard.

Connect the Module To confirm that your module is recognized by your computer:

1. Click Start, and then click Control Panel. 2. Click Hardware and Sound. 3. Click Device Manager. 4. Expand Modems and verify that a Telit module is listed. For example:

Page 18: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 18 of 80 2019-07-16

Update Versions Automatically AppZone C checks for new versions and enables installing them.

You can update the SDK and the firmware versions:

• Update the Software Versions – update the IDE and the libraries that are used to communicate with the firmware

• Update the Firmware If you dismissed an update notification, you can check for new versions at any time:

• From the menu, select Help > Check for updates

3.4.1. Update the Software Versions If a new software version exists, AppZone C displays a notification.

To update the version: 1. Click the Updates Available notification. The Available Updates window opens.

Figure 6 - IoT AppZone IDE - Update IDE packages

2. Select the versions to install, and then click Next:

We recommend to update all versions and firmware, this will avoid inconsistencies between versions.

Page 19: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 19 of 80 2019-07-16

• AppZone C – The development libraries that are used to create, develop and build apps for the specified firmware version

• AppZone IDE Base – The AppZone SDK core library plugin

When updating the AppZone C library used in a project, user must also update the firmware. It might cause misalignments between the built application and the firmware where it will run.

The Available Updates window opens, listing the packages that will be installed.

Figure 7 - IoT AppZone IDE - Update packages list

3. Review the installed packages, and then click Next. The License Agreement window opens.

4. Read the license agreement. If you agree, select I Agree and then click Finish. The packages that you selected are downloaded.

5. After the packages are downloaded, a message opens requesting your permission to install the new packages. Click OK to install the new packages.

Page 20: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 20 of 80 2019-07-16

6. A message indicates that the new version has been installed. For the changes to take effect, click OK to restart Eclipse.

3.4.2. Update the Firmware When connecting to the board using AutoConnect, AppZone C compares the library version to

the firmware installed on the module. If the libraries have a higher version than the firmware,

AppZone C displays a message.

To update the firmware version: 1. In the Target Firmware Check window, click Download latest version. AppZone C

downloads the latest firmware. To postpone the firmware version update to a later time, view the location of the

firmware. You can use XFP at any time to flash the new firmware.

2. To flash the new firmware, click Flash Firmware. The Xfp window opens. 3. Follow the instructions in the window, based on your type of module, and then click

Program.

3.4.3. Update Manually If a software or firmware versions was detected but it was not upgraded, it is possible to upgrade

each one at any time.

Make sure that the installed version is aligned with the firmware version of the module.

To update the software versions:

1. From the menu, select Help > Install new Software. The Available Software window opens.

2. From the Work With list, select the site from which to download software versions. The list of software versions is updated.

3. Select the checkboxes next to the versions that you want to install, and then click Next. 4. Verify the version to install, and then click Next. 5. If you accept the license agreement, select I accept the terms of the license

agreements and then click Finish.

Page 21: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 21 of 80 2019-07-16

3.4.4. Change Automatic Upgrade Preferences To change the default time for updates:

1. From the menu, select Window > Preferences > Install/Update > Automatic Updates. The Preferences window opens.

2. Change your preferences, and then click OK. You can disable automatic updates, change the schedule, specify download options, and

how to handle new updates.

In some cases, Telit personnel may provide an alternative site for specified packages.

To change the site from which update packages are downloaded: 1. From the menu, select Window > Preferences > Install/Update > Available Software

Sites > Add. The Add Site window opens. 2. In the Name field, enter a name for the site so that you can identify the site later easily. 3. In the Location field, type the URL to the site that contain the new version. 4. Click OK.

3.4.5. Migrate project after upgrading the IDE From version 4.0.0 of the IDE projects from older versions of the IDE will automatically be

upgraded to the new version when you continue working on them.

3.4.6. Uninstall Updates To uninstall updates, you must uninstall AppZone C packages and then reinstall packages of a

specified version.

To uninstall updates: 1. From the menu, select Help > Installation Details. The Telit IoT AppZone IDE

Installation Details window opens 2. Select AppZone C, and then click Uninstall. 3. Restart AppZone C. 4. Install a new version.

For information on how to change the URL from which to install a new version, see

Change Automatic Upgrade Preferences.

For information on how to install the version manually, see Update Manually.

Page 22: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 22 of 80 2019-07-16

3.4.7. Install an Older Version If a SDK beta version with unique features was used, and now last official version must be

installed, it might be needed to go back to the last official version, which will have a lower

version number.

To install an older version: 1. Uninstall the AppZone C version. For details, see Uninstall Updates. 2. If required, change the URL from which to install a new version, see Change Automatic

Upgrade Preferences. 3. Install the version manually. For details, see Update Manually.

In the Help > Install new Software window it is required to clear the Contact all update sites during install to find required software option, which is located at the bottom of

the window.

Missing to clear this checkbox, will lead to an incorrect installation of the the Telit IoT IDE dependencies.

Page 23: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 23 of 80 2019-07-16

4. GET STARTED To open the development environment on Windows:

1. Click Start > Telit > AppZoneIDE > Telit - IoT AppZoneIDE. The Workspace Launcher window opens.

2. Select the workspace, and then click OK.

Note: User must have administrator privileges or the development environment will not load

Main Window The following figure describes the main sections of the AppZone C window:

Figure 8 - IoT AppZone IDE - Main Window

User can optimize the location of the panes and the views to suit the workflow.

User can rearrange the layout of the panes and the views.

The main window contains the following sections:

1. Titlebar – Displays information on the environment, the current project, and the file that is currently displayed in the workspace in the following format: AppZone C <Project name>/<File name>

Page 24: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 24 of 80 2019-07-16

2. Menu Bar – Provides options that enable you to perform the most common operations on items. Most of these options also appear in the pop-up menus when you right-click items. The menu bar also contains options related to the entire application.

3. Main Toolbar – Provides buttons for navigation and most commonly used operations. 4. Workspace – Displays the details of the file that you select in the Project Explorer pane. In

the workspace you define write and edit the code. 5. Dashboard – Keep up to date with new tools and features of the AppZone IDE 6. Outline Pane – Provides an outline of your current project. 7. Information Bar – Displays information on the file that is currently displayed in the workspace

in the following format: /<Project name>/<File name> 8. Project Explorer – Displays all files in the current project. 9. Tools Pane – Displays the following views: Properties – Displays the properties of the file that is currently selected in the Project Explorer. Problems – Displays system-generated errors, warnings, or information associated with a resource. Console – Displays a build console that enables viewing the status of the current build. AZ C Console – Enables exchanging AT Commands and files with the module and displaying the results. For more information, see AZ C Console.

AZ C Console The AZ C Console enables exchanging AT Commands and files with the module and displaying

the results. The AZ C Console enables to:

• Transfer a .bin file to the module file system (uploading)

• Read a file stored on the module file system and store it on PC (downloading)

• List files, check current directory, change directories on the module file system

• Set COM ports, Baud Rate, etc.

• Set the selected file as AppZone Application (refer to AT#M2MRUN command)

• Enter AT commands

Page 25: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 25 of 80 2019-07-16

Figure 9 - IoT AppZone IDE - AZ C Console

Page 26: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 26 of 80 2019-07-16

The AZ C Console contains the following areas (refer to Figure 9 ):

1. Display area – Displays the messages from the module, such as the AT Commands results and the connection COM result.

2. Command area – Enables entering AT commands. 3. Progress bar – Displays the progress of download and upload operations. 4. Connectivity status – Shows if the connection to the modem is active and if modem, or port is

reachable The following table describes the icons in the AZ C Console toolbar:

Icon Name Description

Connect COM port Connects to the COM port that is selected in the Settings.

Disconnect COM port Disconnects from the COM port.

Launch application on target Starts the application on the module that is connected.

AutoConnect COM Port

Automatically connects to the COM port that is defined in the Settings.

Abort transfer Stops transferring the file to the module.

File Manager Opens the File Manager, which enables viewing files in the module.

Settings Configures the settings that are used to connect to the module.

Clear Log Clears the display area.

Time Logging Enables time logging.

Filesystem Password Set or remove a password which protects the filesystem from reads and writes over the Serial port

Page 27: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 27 of 80 2019-07-16

5. CREATE APPLICATIONS This chapter describes how to create a new application.

Create an Application User can create new applications from scratch or use an example application.

To create a new application:

1. Click Start > All applications > Telit > AppZoneIDE > Telit – IoT AppZoneIDE. The Workspace Launcher window opens.

2. In the Workspace field, type the location of the workspace or click Browse.

Figure 10 - Select Workspace

3. Click OK. The AppZone C IDE opens. 4. From the menu select File > New > roject. The New Project window opens.

Page 28: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 28 of 80 2019-07-16

Figure 11 - New Telit Project

5. To create a new project, expand Telit and then select Telit Project. 6. Click Next. The Telit Project window opens.

Page 29: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 29 of 80 2019-07-16

Figure 12 - Project Wizard - Options

a. In the Project name field, type a name for the project. b. To change the default location in which the project is saved:

Clear the Use default location checkbox. In the Location field type the new location or click Browse.

c. In the Products field, select the module for which you want to develop the application. d. In the Environment field, select C. e. In the Toolchain field, select a toolchain:

GCC – Open source compiler RVCT – ARM RVCT 5.0.6 compiler that is included in the AppZone C SDK package. To buy the license, contact ARm. After you have a license, see APPENDIX B - Using the RVCT Compiler for information on how to set the license.

f. In the Firmware version field, select the firmware version of your module. If the module is connected, the SDK identifies the firmware version of the connected

module.

7. Click Next. A window enabling to select the project type opens. 8. Select the type of project that you want to create: Empty project – Create an empty project. From the Select project type list, select Empty Project.

Page 30: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 30 of 80 2019-07-16

Example template – Create a project based on an example application. From the Select project type list, select Example Template. For a description of the sample applications click the question mark help button, or see Sample Applications.

Figure 13 - Project Wizard - Sample application

9. Select the checkbox next to the example application that you want to use as a basis for your project. For information on the example applications provided with AppZone C, see Sample Applications.

Page 31: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 31 of 80 2019-07-16

Figure 14 - Main IDE

10. Click Finish. The AppZone C IDE opens. If you created a project based on example application, AppZone C IDE contains the source

files for that example.

Page 32: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 32 of 80 2019-07-16

6. SAMPLE APPLICATIONS This section describes some of the sample applications provided with the AppZone C IDE. For a

complete description on how to create a project containing the code of these examples, see

Create an Applications.

For additional examples and information, visit: https://www.telit.com/developer-zone/iot-app-

zone/iot-app-zone-developer-resources/.

Hello World The application prints “Hello World!“ to the terminal every two seconds.

6.1.1. Application workflow M2MB_main.c

• Open USB/UART/UART_AUX

• Print "Hello World!" every 2 seconds in a while loop

Page 33: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 33 of 80 2019-07-16

File System This application shows how to create and access files in the module filesystem

6.2.1. Application workflow M2MB_main.c

• Open USB/UART/UART_AUX

• Print welcome message

• Open file in write mode

• Write data in file

• Close file

• Reopen file in read mode

• Read data from file and print it

• Close file and delete it

Page 34: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 34 of 80 2019-07-16

Hw Timer This application shows how to create and manage hw timers

6.3.1. Application workflow M2MB_main.c

• Open USB/UART/UART_AUX

• Print welcome message

• Create hw timer structure

• Configure it with 100 ms timeout, periodic timer (auto fires when expires) and autostart

• Init the timer with the parameters

• Wait 10 seconds

• Stop the timer

TimerCb

• Print a message with an increasing counter

Page 35: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 35 of 80 2019-07-16

Logging The application shows an example of multi level logging system.

6.4.1. Application workflow M2MB_main.c

• Open USB/UART/UART_AUX

• Print welcome message

• Print a message with every log level

MultiTask The application shows how to create and use task functionalites

6.5.1. Application workflow M2MB_main.c

• Open USB/UART/UART_AUX

• Print welcome message

• Create the task with the provided utility (this calls public m2mb APIs)

• Send a message to the task

Page 36: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 36 of 80 2019-07-16

TCP-IP The application shows an example of TCP sockets usage.

6.6.1. Application workflow M2MB_main.c

• Open USB/UART/UART_AUX

• Print welcome message

• Create a task and start it m2m_tcp_test.c

• Initialize Network structure and check registration

• Initialize PDP structure and start PDP context

• Create socket and link it to the PDP context id

• Connect to the server

• Send data and receive response

• Close socket

• Disable PDP context

Page 37: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 37 of 80 2019-07-16

TCP-SSL Client The application shows an example of SSL usage.

6.7.1. Application workflow M2MB_main.c

• Open USB/UART/UART_AUX

• Print welcome message

• Create a task and start it m2m_ssl_test.c

• Initialize Network structure and check registration

• Initialize PDP structure and start PDP context

• Create socket and link it to the PDP context id

• Connect to the server over TCP socket

• Initialize the TLS parameters (TLS1.2) andh auth mode (server+client auth in the example)

• Create SSL context

• Read certificates files and store them

• Create secure socket and connect to the server using SSL

• Send data and receive response

• Close secure socket

• Close socket

• Delete SSL context

• Disable PDP context

The application requires the certificates to be stored in /test_ssl_certs/ folder

Page 38: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 38 of 80 2019-07-16

Page 39: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 39 of 80 2019-07-16

Gpio The application shows an example gpio usage with gpio write, read and interrupt.

6.8.1. Application workflow M2MB_main.c

• Open gpio 3 as output

• Open gpio 4 as input and set interrupt for any edge (rising and falling). A jumper is used to short gpio 3 and 4 pins.

• Toggle gpio 3 status high and low every second

• An interrupt is generated on gpio4

Page 40: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 40 of 80 2019-07-16

I2C The application shows an example I2C usage, configuring a Kionix KXTF9-4100 accelerometer

and reading the 3 Axes values

6.9.1. Application workflow M2MB_main.c

• Open I2C bus, setting SDA an SCL pins as 2 and 3 respectively

• Set registers to configure accelerometer

• Read in a loop the 6 registers carrying the 3 axes values and show the g value for each of them

Page 41: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 41 of 80 2019-07-16

SPI The application shows an example SPI usage, configuring two ST devices: a magnetometer (ST

LIS3MDL) and a gyroscope (ST L3G4200D). The application will read values from both devices

using GPIO4 and 3 (respectively) as magnetometer CS and gyro CS.

Application workflow

M2MB_main.c

• Open SPI bus, set parameters

• Configure GPIO 3 and 4 as output, set them high (idle)

• Set registers to configure magnetometer

• Read in a loop (10 iterations) the registers carrying the 3 axes values and show the gauss value for each of them. A metal object is put close to the sensor to change the read values

• Set registers to configure gyroscope

• Read in a loop (10 iterations) the registers carrying the 3 axes values and show the degrees per second value for each of them. The board is rotated to change the read values.

Page 42: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 42 of 80 2019-07-16

Page 43: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 43 of 80 2019-07-16

Page 44: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 44 of 80 2019-07-16

SMS_PDU The application shows an example of SMS usage, showing how to create a PDU from a text

message and how to decode a received message in PDU format. A SIM card and antenna must

be present.

Application workflow

M2MB_main.c

• Init sms functionality

• Create pdu from text message

• Send message to destination number

• Wait for response

• When SMS response is received, decode it and print information about it, plus the message content

Page 45: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 45 of 80 2019-07-16

UART_to_server The application shows an example of UART callback usage, showing how to send data from

UART to a connected socket. Debug messages are printed on UART AUX port.

Application workflow

M2MB_main.c

• Init socket, activate PDP context and connect to server

• Init UART, set its callback function, create tasks to handle input from UART and response from server (optional)

• Send a confirmation on UART

• Wait for data, when it is received, send it to the server

• When a response is received, print it on UART. Main UART:

Debug log on UART AUX:

Page 46: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 46 of 80 2019-07-16

UDP The application shows an example of UDP sockets usage.

6.13.1. Application workflow M2MB_main.c

• Open USB/UART/UART_AUX

• Print welcome message

• Create a task and start it m2m_udp_test.c

• Initialize Network structure and check registration

• Initialize PDP structure and start PDP context

• Create socket and link it to the PDP context id

• Send data and receive response

• Close socket

• Disable PDP context

Page 47: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 47 of 80 2019-07-16

GNSS The application shows an example of GNSS functionality.

6.14.1. Application workflow M2MB_main.c

• Init gnss, enable position report and start it.

• When a fix is available, a message will be printed by the GNSS callback function

ATI The application shows an example of ATI (AT Instance, sending AT commands from code)

functionality. The example supports both sync and async (using a callback) modes

6.15.1. Application workflow, sync M2MB_main.c

• Init AT0 (first AT instance)

• Send AT+CGMR command

• Print response.

• Release AT0 at_sync.c

• Init ati functionality and take AT0

• Send AT+CGMR command, then read response after 2 seconds, then return it

• Deinit ati, releasing AT0

Page 48: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 48 of 80 2019-07-16

6.15.2. Application workflow, async M2MB_main.c

• Init AT0 (first AT instance)

• Send AT+CGMR command

• Print response.

• Release AT0 at_async.c

• Init ati functionality and take AT0, register AT events callback

• Send AT+CGMR command, wait for response semaphore (released in callback), then read it and return it

• Deinit ati, releasing AT0

Page 49: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 49 of 80 2019-07-16

BUILD APPLICATIONS It is possible to change the project toolchain (GCC/RVCT) and the product (provided they share

the same API family) at any time in the project properties.

Set Project Settings To change the project settings:

1. In the Project pane, right-click the project and then select Properties. The Properties for project window opens.

2. Select the Product and Toolchain that you want to use for the app, and then click OK.

Figure 15 - Change Project AppZone settings

Page 50: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 50 of 80 2019-07-16

Compile the Project To compile the project: 1. Select the project and choose Release as the configuration (this is the default one) 2. Click the build button ( ) 3. See the results of the build process in the Console view. Click on its tab in the Tools pane to

bring the view forward if it is not currently visible. If it is not visible, you can open it by selecting Window > Show View > Console.

The following figure shows an example of the compilation results of the Hello World sample:

Figure 16 - AppZone project building

The application that you built is located in the Project main folder. By default, the name of the

example project application is m2mapz.bin.

Page 51: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 51 of 80 2019-07-16

7. CUSTOMIZE APPLICATION PROJECTS You can customize the project using the Makefile file, export.mk file or add environment

variables using the project properties.

For example, to change the default name of the compiled application from m2mapz.bin to a

custom name, add the TELITBIN environment variable:

Changing the name of the compiled application would affect some features, like automatic deployment. If a new name is used the manual steps need to be followed first to ensure correct configuration.

Open the Project properties.

• Add the variable TELITBIN and assign it the value COMPANY_NAME

Figure 17 - Add Environment Variables

Page 52: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 52 of 80 2019-07-16

Rebuilding the project will generate a binary with the custom name

Figure 18 - New binary name

Page 53: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 53 of 80 2019-07-16

8. BUILD YOUR APPLICATION You can build and run your application either on a connected Telit module or on Telit’s AppZone

Emulator. The emulator is installed by default during the AppZone C installation.

Run Applications on the Module – Manual process After you have built your application, connect to the module and then upload and run your

application. If you have uploaded more than one application, use the File Manager to control

which application is currently active. See Error! Reference source not found. for more

information.

8.1.1. Connect the COM Port To run the application on the module:

1. In the Tool pane, open the AZ C Console.

2. Click AutoConnect COM Port ( ). The AZ C Console starts searching for available COM Ports.

3. If the module is not connected, you can:

a. Click Settings ( ). The Settings window opens.

Figure 19 - AZ C Console Settings window

b. In the COM Port field, select the COM port to which the module is connected. Usually COM12.

c. Click OK to close the Settings window.

d. Click Connect COM Port ( ) to connect to the module. The AZ C Console displays a message if the connection succeeds.

Page 54: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 54 of 80 2019-07-16

Figure 20 - AZ C Console input field

8.1.2. Upload and Run the Application To upload the application to the module and then run the application:

1. Select the bin file of the application that you created (the default name is m2mapz.bin) and drag it to the AZ C Console.

Figure 21 - Application binary deployment

A message notifies you that the upload was successful.

Page 55: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 55 of 80 2019-07-16

Figure 22 - Deployment successful

2. To set the app as default and run it, in the AZ C Console click run application ( ). A message notifies that the application has started.

Figure 23 - Application activation successful

Page 56: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 56 of 80 2019-07-16

9. STATIC LIBRARIES The AppZone IDE allows to create static libraries which can be distributed as binaries and import

into other projects.

Creating an AppZoneC static library Users can create static libraries with the Telit Library Wizard. Product, toolchain and FW version

has to be chosen. If the library needs to be distributed for different configurations, it must be

rebuilt for each one.

Figure 24 - Creating a static library

The wizard creates an AZC static lib project with a main.c file in which the user can implement

the static library functions. The user can rename the main source file or add/remove as many

source files as needed (currently subfolders are not supported).

Page 57: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 57 of 80 2019-07-16

Figure 25 - Static library example

Static library compilation produces an archive with .azsl (AppZone Static Library) extension

which basically contains the static library file (.a) and a met

adata text file in order to check the library’s integrity as well as compatibility when linked against

projects targeted for incompatible firmware.

Page 58: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 58 of 80 2019-07-16

Figure 26 - Static library build process

The produced azsl can be simply dragged and dropped into the structure of a AppZoneC project

for developer to use it. When distributing the azsl file it is recommended to provide a header file

with the API implemented in the library, otherwise the project code can use the “extern” keyword

to access the functions.

Page 59: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 59 of 80 2019-07-16

Figure 27 - Static library usage

In case a user imports an incompatible library, the SDK will raise an error.

Figure 28 - Static library errors

Page 60: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 60 of 80 2019-07-16

10. TROUBLESHOOTING The following table lists known issues and how to solve them.

Issue Cause Solution

When accessing the

environment, the

following error

message appears:

Cannot open the

application. See the

log file null.

User does not have

administrator permissions.

!MESSAGE Error reading

configuration:

C:\ProgramData\Telit\AppZoneI

DE\eclipse\configuration\org.ecli

pse.osgi\.manager\.fileTableLock

(Access is denied)

Change the permissions of the following file: .fileTableLock

When you try to load

the application to the

module, the AZ C

Console displays the

following error:

Error in AT&K3

command

The module is not connected. Check the module is connected and is on. To verify that the module is connected in a Windows environment: 1. From the Control Panel, open

Device Manager. 2. Expand Modems. 3. Verify that a Telit modem is

displayed.

Page 61: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 61 of 80 2019-07-16

11. APPENDIX A - AT SYNTAX This chapter describes the syntax of all AT Commands dedicated to manage the M2M

applications.

User can operate the module using the AT commands. For example, enable/disable the

application. All the functionalities of AZ C Console are implemented using AT commands.

AT+M2M This command enables – disables AppZone engine execution

SIM Presence Setting saved Can be aborted MAX timeout SELINT

Not Required - No - 2

AT+M2M=<start_mode>[,<start_to>]

Set command sets the start mode and timeout

Parameter:

Name Type Default Description

<start_mode> integer 0 M2M Application execution start mode.

Values:

0 : Disable the AppZone engine from next startup, and reboot module.

1 : Enable the AppZone engine from next startup, and reboot module. <start_to> is forced to 0.

4 Enable the AppZone engine from the next startup, and reboot module. The engine will start after <start_to> seconds from boot.

<start_to> integer - AppZone engine start timeout in seconds. This is a global delay, #M2MRUN allows to set an additional delay for each application.

Values:

1..60 : Global delay in seconds

Page 62: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 62 of 80 2019-07-16

AT+M2M=?

Test command returns the ranges for parameters

Example

AT+M2M=?

+M2M: (0,1,4),(0,1-60) OK

AT+M2M?

Read command allows to read the global configuration (enable and start timeout)

Example

AT+M2M?

+M2M: 1,0 OK

AT#M2MWRITE This command allows to write files into M2M File System

SIM Presence Setting saved Can be aborted MAX timeout SELINT

Not Required - No 30 2

AT#M2MWRITE=<file_name>,<size>[,<permission>]

Set command writes the file content into M2M File System. Parameter:

Name Type Default Description

<file_name> string - Name of the file to be stored in the filesystem, including the full path

Page 63: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 63 of 80 2019-07-16

<size> integer - Size in bytes of the file to be stored in the filesystem

<permission> integer 0 file permission (optional)

Values:

0 : Nothing

1 : Executable binary (.bin)

Executable binaries will be automatically stored in /mod folder if no path is provided

The device shall prompt a five character sequence <CR><LF><greater_than><greater_than><greater_than> (IRA 13, 10, 62, 62, 62) after command line is terminated with <CR>; after that a file can be entered from TE, sized <size> bytes. The operations complete when all bytes are received. If writing ends successfully, the response is OK; otherwise, an error code is reported. Note: the file name should be passed between quotes; file names are case sensitive.

AT#M2MWRITE=?

Test command returns OK

Example

Page 64: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 64 of 80 2019-07-16

AT#M2MWRITE="/mod/m2mapz.bin",58044,1

>>> here receive the prompt; then type or send the file, sized 58044 bytes

OK

File has been stored as a binary application in the mod folder

Page 65: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 65 of 80 2019-07-16

AT#M2MLIST This command allows to list files inside a M2M File System directory

SIM Presence Setting saved Can be aborted MAX timeout SELINT

Not Required - No - 2

AT#M2MLIST

Execution command reports the list of directories names and file names of directories and files currently stored in the M2M file system in the current working directory. As a last information it reports the available free memory in the current drive. The report is in the format: [<CR><LF>#M2MLIST: <.> <CR><LF>#M2MLIST: <..>] [<CR><LF>#M2MLIST: <dir_name1>… [<CR><LF>#M2MLIST: <dir_namen>]] [<CR><LF>#M2MLIST: <file_name1>,<size1>… [<CR><LF>#M2MLIST: <file_namen>,<sizen>]] <CR><LF>#M2MLIST: free bytes: <free_mem> where: <.> current directory <..> upper directory <dir_namen> – directory name, string type delimited by < and > (max 16 chars, case sensitive) <file_namen> – file name, quoted string type (max 16 chars, case sensitive) <sizen> – size of file in bytes <free_mem> – size of available free memory in the current drive in bytes

AT#M2MLIST=<path>

Set command allows to read the files and directories for a specific path. The response will have the same format showed in the execution command

Page 66: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 66 of 80 2019-07-16

Parameter:

Name Type Default Description

<path> string - Full path to be listed

AT#M2MLIST=?

Test command returns OK

Example

AT#M2MLIST #M2MLIST: <.> #M2MLIST: <..> #M2MLIST: <dir1> #M2MLIST: "m2mapz.bin",58044 #M2MLIST: free bytes: 458752 OK AT#M2MLIST=/mod/dir1 #M2MLIST: <.> #M2MLIST: <..> #M2MLIST: free bytes: 458752

OK

Page 67: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 67 of 80 2019-07-16

AT#M2MDEL This command allows to delete files inside a M2M File System directory

SIM Presence Setting saved Can be aborted MAX timeout SELINT

Not Required - No - 2

AT#M2MDEL=<file_name>

Set command allows to delete the file for a specific path.

Parameter:

Name Type Default Description

<file_name> string - Full path of the file to be deleted

AT#M2MDEL=?

Test command returns OK

Example

AT#M2MDEL="/mod/m2mapz.bin" OK

Page 68: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 68 of 80 2019-07-16

AT#M2MREAD This command allows to read the content of a file inside a M2M File System directory

SIM Presence Setting saved Can be aborted MAX timeout SELINT

Not Required - No - 2

AT#M2MREAD=<file_name>

Set command allows to read the file from a specific path.

Parameter:

Name Type Default Description

<file_name> string - Full path of the file to be read

The device shall prompt a five character sequence <CR><LF><less_than><less_than><less_than> (IRA 13, 10, 60, 60, 60) followed by the file content. Note: the file name should be passed between quotes; file names are case sensitive. Note: If the file <file_name> is not present, an error code is reported.

AT#M2MREAD=?

Test command returns OK

Example

AT#M2MREAD="config.txt "

<<< here receive the prompt; then the file is displayed, immediately after the prompt

OK

Page 69: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 69 of 80 2019-07-16

AT#M2MRUN This command allows to manage the run permissions of the applications

SIM Presence Setting saved Can be aborted MAX timeout SELINT

Not Required - No - 2

AT#M2MRUN=<mode>[,<file_bin>[,<delay>]]

Set command allows to configure applications.

Parameter:

Name Type Default Description

<mode> integer 0 Run permission mode value

Values:

0 : Resets RUN file permission for all the applications stored in /mod directory. Effects after reboot.

1 : Sets RUN file permission for the all binary files in /mod directory. Effects after reboot.

2 : Sets RUN file permission for <file_bin> in /mod directory, and resets RUN permission for all other applications. Effects after reboot.

3 : Immediate unload of all running applications. If <file_bin> is provided, immediate unload of <file_bin> running app. Effects immediately.

4 : Immediate load of all non running apps. If <file_bin> is provided, immediate load of <file_bin> app. Start depending on timeout. Effects immediately.

5 : Immediate unload of all running applications. Immediate load of <file_bin> (if not running). Effects immediately.

<file_bin> String - Name of the binary file to be managed, without the path (optional). If provided, the <mode> configuration will be applied to <file_bin> only, otherwise to all *.bin files present in /mod folder

Page 70: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 70 of 80 2019-07-16

<delay> Integer 0 If provided, the start delay in seconds to be applied to affected applications (<file_bin> if provided, otherwise all binaries in /mod folder). If not provided, no changes on current value will be done. 0 on creation. The delay value must be considered added to AppZone engine delay at system restart.

Examples

AT#M2MRUN=1,,10

-> run flag set for all *.bin in /mod with delay of 10 seconds for all

AT#M2MRUN=1,app.bin

-> run flag set for /mod/app.bin if it exists (current delay not changed)

AT#M2MRUN=1,"app2.bin",0 -> run flag set for mod/app2.bin if it exists ( delay set to 0 )

AT#M2MRUN=0,"app2.bin",0

-> run flag UNSET for /mod/app2.bin,( delay set to 0 ), other applications untouched

AT#M2MRUN?

Read command allows to read the status of configured applications. If an application is running, it will be showed in the list with the format below AT#M2MRUN? #M2MRUN: <"app1.bin",delay1> <"app2,bin", delay2> ... OK Example

Page 71: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 71 of 80 2019-07-16

AT#M2MRUN=2,"m2mapz.bin",0

OK

**module restart**

AT#M2MRUN?

#M2MRUN: <m2mapz.bin,0>

OK

AT#M2MRUN=?

Test command returns the allowed values for parameters

Example

AT#M2MRUN=?

#M2MRUN: (0-5)(...)(1-60)

OK

AT#M2MMKDIR This command allows to create a directory inside the M2M File System

SIM Presence Setting saved Can be aborted MAX timeout SELINT

Not Required - No - 2

AT#M2MMKDIR=<directory_name>

Set command allows to create a directory in a specific path.

Parameter:

Page 72: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 72 of 80 2019-07-16

Name Type Default Description

<directory_name> string - Full path of the directory to be created

Note: the directory name should be passed between quotes; directory names are case sensitive.

AT#M2MMKDIR=?

Test command returns OK

Example

AT#M2MMKDIR="dir1"

OK

AT#M2MRMDIR This command allows to remove a directory inside the M2M File System

SIM Presence Setting saved Can be aborted MAX timeout SELINT

Not Required - No - 2

AT#M2MRMDIR=<directory_name>

Set command allows to delete a directory in a specific path.

Parameter:

Name Type Default Description

<directory_name> string - Full path of the directory to be deleted

Note: the directory name should be passed between quotes; directory names are case sensitive.

Page 73: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 73 of 80 2019-07-16

AT#M2MRMDIR=?

Test command returns OK

Example

AT#M2MRMDIR="dir1"

OK

Page 74: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 74 of 80 2019-07-16

M2M AT Command Examples After a developer has created the application logic with AppZone IDE, and deployed it into the

module, the next operation is to configure the application. For this purpose, there is a set of M2M

AT commands, allowing to manage M2M applications and to configure the start mode and

delays of single or multiple applications.

The AT commands examples described in the next chapters refer to the following scenario:

The DTE is based on a Windows-PC running a Terminal tool (for example, Telit AT Controller ,

TATC from now on) that sends AT commands and files to the module, and receives AT

commands results from it.

Figure 29 - DTE Connected to the Module

The AZ C Console is integrated with AppZone C and enables entering AT

Commands and upload/download files into/from module. It simplifies and

speeds up the activities performed with the DTE.

Module with

AppZone layer

DCE

DTE

Page 75: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 75 of 80 2019-07-16

11.9.1. AT+M2M=0 AT+M2M=0 disables the execution of AppZone engine. The run flag setup of the single

applications will not be modified. The module will be restarted by the command.

11.9.2. AT+M2M=1 AT+M2M=1 enables the execution of AppZone engine, with a global delay of 0 seconds at boot.

The engine will then start all the applications which have been previously enabled with

AT#M2MRUN command. The module will be restarted by the command.

11.9.3. AT+M2M=4,xx AT+M2M=4,xx enables the execution of AppZone engine after xx seconds from module startup.

The module will be restarted by the command. After the reboot, the module will wait xx seconds,

then start the engine. The latter will then run all the applications that have their RUN permission

set, waiting the each application’s delay before starting it. The RUN permission and single

applications delay are set using AT#M2MRUN command.

Example scenario: the module has factory-setting configuration AT+M2M=0,10 and no

application installed. Power on the module and upload the user M2M application into /mod

directory.

AT#M2MWRITE=”user_m2mapz.bin”,61684,1 >>> OK

Verify, after the uploading, the list of files stored (/mod folder showed by default).

AT#M2MLIST #M2MLIST: <.> #M2MLIST: <..> #M2MLIST: "user_m2mapz.bin",61684 user application #M2MLIST: free bytes: 6097920 OK

Use the following command to set the RUN permission for user_m2mapz.bin application and

reset RUN permission for all other application included the default M2M application. The next

command sets the application stored in /mod folder as exclusive run from next startup.

AT#M2MRUN=2,"user_m2mapz.bin",5 OK

Page 76: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 76 of 80 2019-07-16

Use the AT+M2M command with two parameters: the first one (4) sets the start mode, the

second one (30, as example) defines a time delay expressed in sec.

AT+M2M=4,30 OK

After entering this command, the following operations are executed.

1. Module reboots

2. After 30 seconds, the AppZone engine starts and checks for all enabled applications to

be executed.

3. The engine finds that “user_m2mapz.bin” has the RUN flag set, and a delay of 5

seconds.

4. The engine waits 5 seconds

5. The engine starts “user_m2mapz.bin”

Page 77: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 77 of 80 2019-07-16

12. APPENDIX B - USING THE RVCT COMPILER RVCT compiler is included in the AppZone C SDK package. To use your RVCT license set the

System Variable named ARMLMD_LICENSE_FILE in Windows settings, as reported in the

example below:

Page 78: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 78 of 80 2019-07-16

13. ACRONYMS

TTSC Telit Technical Support Centre

OMA Open Mobile Alliance

LwM2M Lightweight Machine to Machine

CoAP Constrained Application Protocol

DTLS Datagram Transport Layer Security

SMS Short Message Service

UDP User Datagram Protocol

M2M Machine to Machine

OIR Object/Instance/Resource

IoT Internet of Things

URI Uniform Resource Identifier

IETF Internet Engineering Task Force

TLS Transport Layer Security

Page 79: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office

1VV0301595 Rev. 1 Page 79 of 80 2019-07-16

14. DOCUMENT HISTORY

Revision Date Changes

0 2019-07-16 New document starting from 1VV0301335_AppZoneC-User Guide, supporting ME910 family.

1 2019-07-17 Added new sample apps description

Page 80: APPZONE C - 2.0 User Guide...expressed or implied warranty of fitness for such High Risk Activities. IV. Trademarks TELIT and the Stylized T Logo are registered in Trademark Office