1. INTRODUCTION
Scope
This document describes how to use ME910G1 IoT wireless module as an Azure IoT plug and play device. Azure Plug and Play(PnP) simplifies IoT by allowing solution developers to integrate IoT devices without writing any device code. Using Plug and Play, device manufacturers will provide a device capability model(DCM) of their device to cloud developers to be integrated quickly into IoT Central or any solution built on the Azure IoT platform. The ME910G1 model uses its own device capability model to demonstrate its properties and interface capabilities.
Overview
The following are the features implemented.
1 Azure IoT plug and play device. 2 Telemetry data for signal strength info. 3 Cloud to device messages i.e. LED turn on/off, diagnostic Ping. 4 Azure device connection configuration resides on a “.CFG” file on
m2mb Module File System.
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 2 of 15 2020-05-14
2. GETTING STARTED
Prerequisites
1. ME910G1 IoT wireless module
2. Azure Account
3. Azure IoT Hub Instance
4. Azure IoT Hub Device Provisioning Service
5. Cellular Network connectivity
6. Get latest application code for Azure PnP
7. Azure IoT device explorer
8. Telit TATC console or Tera Term Application
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 3 of 15 2020-05-14
3. PREPARE THE ME910G1/ME310G1 EVALUATION BOARD
Hardware setup
The following picture represents ME910G1 IoT wireless module (in TLB card format) used for plug and play application, on top of the Telit EVB Common Evaluation board.
Figure 1: ME910G1 IoT wireless module.
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 4 of 15 2020-05-14
Make sure you order both the Telit EVB evaluation board, plus the ME910G1 TLB. Contact our sales representative to see if you qualify for a free kit here: https://contact.telit.com/nbiot
For further information please visit:
- https://www.telit.com/m2m-iot-products/cellular-modules/standard-industrial-grade/xe910-family/#ME910C1-downloads and download the Quick start guide and the Linux USB Drivers user guide
- https://www.telit.com/m2m-iot-products/cellular-modules/standard-industrial-grade/xe910-family/#ME910G1-downloads for further information regarding the specifics of ME910G1
Software setup
3.2.1. Set up the module
As a prerequisite you need LTE-M or 2G connectivity to establish a connection to Azure IoT services.
For further information:
- on how to setup a connection please visit https://www.telit.com/m2m-iot-products/cellular-modules/standard-industrial-grade/xe910-family/#ME910C1-downloads and download the Quick start guide and the Linux USB Drivers user guide.
- for an overview of AppZone applications and software architecture https://www.telit.com/developer-zone/iot-app-zone/iot-app-zone-developer-resources/ and browse the AppZone C m2mb User Guide
The Quick start guide, section 4 will give you information on how to setup the connectivity.
The Linux USB Driver user guide will explain how to connect the module and how to flash it with the latest Telit base firmware
3.2.2. Download and extract the binary
Azure PnP application is built as an AppZone Application to be installed on the ME910G1
Note:-As presented on the AppZone C m2mb User Guide, ME910G1 software consists of a firmware on top of which it is possible to run custom AppZone applications. It is assumed that ME910G1 base firmware is preprogrammed and is compatible with the AppZone application. For further info on the compatible version, please check the binary package readme file.
Download the application package (link in the prerequisites, .zip file) and extract it. Check the readme.md file, the log file, the m2mapz.bin file are present.
3.2.3. Connect to ME910G1 module via Serial port
Check the device manager for the port connection, as seen in the following figure:
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 5 of 15 2020-05-14
Open TATC tool (in the Telit download Zone) and connect to the USB of the target module and go to the tab M2M_AppZone as shown below:
Alternatively open a Tera Term session and connect to the COM port you identified
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 6 of 15 2020-05-14
3.2.4. Install Azure PnP AppZone application
Use the file browser, go to the folder where the application file m2mapz.bin is
located and right click on the bin file and take note of the file size in bytes, as seen in the following figure (Windows):
Issue the AT command AT#M2MCHDIR=”MOD”. This will move to the MOD
directory of the file system (like the DOS “chdir” command).
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 7 of 15 2020-05-14
Issue AT#M2MWRITE=<file name>, <size>, <permission>
After executing AT#M2MWRITE command, a >>> prompt will be displayed:
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 8 of 15 2020-05-14
Click the transfer button highlighted in red in the following figure and select the AppZone application to upload to the target module. Click Open button and the transfer will start.
The transfer pop-up will appear
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 9 of 15 2020-05-14
3.2.5. Run Application
Now, AppZone application must be set to start at the next start-up: issue AT#M2MRUN=2, <filename>, in the example is AT#M2MRUN=2,m2mapz.bin:
Reboot with at#reboot
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 10 of 15 2020-05-14
4. INTEGRATION WITH IOT CENTRAL
Setup
Make sure you have an IoT Central Application configured
Go to https://apps.azureiotcentral.com/myapps and select the newly created IoT Central application
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 11 of 15 2020-05-14
Create a device template based on IoT Plug and Play
Now select Device templates and “use a preconfigured device template”. Browse for ME910G1 device and select it.
Create a new device for enrollment
Go to Devices and create a new device based on the ME910G1 device template.
Click on the device and go to “connect”
Edit, or take note of: - ID Scope
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 12 of 15 2020-05-14
- Device ID - Primary Key (ensure that connect method is Shared Access Signature)
Prepare your configuration file
The configuration file is a text file which contains the following information:
#M2M context info
pdp_context_cid=1
pdp_profile_name=YOUR_PDP_PROFILE_NAME
pdp_apn_name=YOUR_IOT_APN
#Azure PnP connection parameters
security_key=YOUR_AZURE_KEY
registration_id=YOUR_AZURE_DEVICE_ID
scope_id=YOUR_AZURE_SCOPE_ID
Following is the description of the above confguration:
Configuration ID Description
pdp_context_cid (PDP Context Identifier) numeric parameter which specifies a PDP context definition
pdp_profile_name Profile Name for specific context identifier
pdp_apn_name APN Name for specific context identifier
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 13 of 15 2020-05-14
security_key Symmetric key (used enrollment on the Device Provisioning Service)
registration_id The registration device ID is used to uniquely identify a device in the Device Provisioning Service.
scope_id The ID scope is assigned to a Device Provisioning Service
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 14 of 15 2020-05-14
Upload the configuration and start the application
Edit the configuration file on your PC and call it ms_az_pnp.cfg.
Upload the configuration file into /mod/ folder as specified in §3.2.2
Enable the connection and restart
Activate the PDP connection on CID 1 (Azure always uses Context-ID 1 ).
Caution or Warning – Make sure that the MS Windows(R) Operating System is not managing the cellular connectivity.
To avoid the above warning, while performing cellular connection ensure below selections:
On the open Terminal session (see §3.2.2) issue the command
AT#REBOOT
After the boot sequence completes, the device is ready to connect to Azure IoT services.
Perform analytics on IoT Central application
The device will start sending telemetry data, and it is possible to analyze it
ME910G1 Azure IoT Plug and Play Getting started
Rev 1 Page 15 of 15 2020-05-14
Send commands through IoT Central application
The device can execute commands as specified in the interface.
Following figure presents an example for the “led on” and the diagnostic ping command.