Avnet AT&T IoT Starter Kit Getting Started Manual

Version 1.3
o STM32L4 Discovery Kit IoT Node o Avnet M14A2A WNC Cellular Shield o AT&T Flow Designer
© 2018 Avnet. All rights reserved. All trademarks and registered trademarks are the property of their respective owners. All specifications are subject to change without notice. NOTICE OF DISCLAIMER: Avnet is providing this design, code, or information "as is." By providing the design, code, or information as one possible implementation of this
feature, application, or standard, Avnet makes no representation that this implementation is free from any claims of infringement. You are responsible for obtaining any rights you may require for your implementation. Avnet expressly disclaims any warranty whatsoever with respect to the adequacy of the implementation, including but not limited to
any warranties or representations that this implementation is free from claims of infringement and any implied warranties of merchantability or fitness for a particular purpose.
Page 1
Document Control
Version
Date
Comment
Draft 0.1
12/22/2017
Initial Draft
Draft 0.2
01/15/2018
Added:
- Support forums
- Keil download and licensing instructions
- Missing diagrams
Draft 0.3
01/17/2018
Typo corrections
1.0
02/22/2018
First release
- Updated Kit name and Avnet shield name
- Updated and added missing figures
1.1
03/07/2018
Formatted to Avnet document template
1.2
03/14/2018
Keil MDK installation and licensing section updated
1.3
06/11/2018
- References to starterkit.att.com now corrected to marketplace.att.com/quickstart
- Procedure added for configuring the cloned AT&T Flow project
- Installation of STM32L475VGT device to Keil tools added
- Renumbered all procedure steps for easier reference
- Appendix B SIM Management section added
Document Version: 1.3 Document Date: 06/11/2018 Document Author: Peter Fenn Document Classification: Public Document Distribution: Public
Prior Version History
Page 2
Contents
Introduction ................................................................................................................. 5
Starter Kit Contents ..................................................................................................... 5
STMicroelectronics STM32L4 Discovery Kit IoT Node ................................................ 7
Avnet M14A2A LTE Cellular Shield ............................................................................. 8
WNC Module Firmware ............................................................................................... 9
ARM Keil IDE .............................................................................................................. 9
Keil Software Download .............................................................................................. 9
Install Keil License..................................................................................................... 10
Use Pack Installer to Add STM32L475VGT to the Keil Tools .................................... 12
Create Online Accounts ............................................................................................ 13
Register Cloudconnectkits.org Account (Avnet) ........................................................ 13
Register an AT&T Account and Activate the AT&T SIM ............................................ 13
Clone the AT&T Flow Designer Project ..................................................................... 13
Register a PubNub Account ...................................................................................... 18
Create a PubNub Application .................................................................................... 19
Connect AT&T Flow to PubNub ................................................................................ 21
Register a Freeboard.io Account ............................................................................... 22
Link Freeboard.io to PubNub .................................................................................... 22
Assemble the AT&T IoT Kit Hardware ....................................................................... 23
Download and Configure the Example Application ................................................... 24
Verify the Dashboard Visualization............................................................................ 28
Appendix A – WNC Module Firmware Update .......................................................... 29
Appendix B – SIM Management ................................................................................ 31
Page 3
Figures
Figure 1 - AT&T IoT Starter Kit (LTE-M, STM32L4) Data Flow .................................................................... 5
Figure 2 - AT&T IoT Starter Kit (LTE-M, STM32L4) Contents ...................................................................... 6
Figure 3 - STM32L4 Discovery Kit IoT Node ................................................................................................ 7
Figure 4 - Avnet WNC M14A2A Cellular Shield ............................................................................................ 8
Figure 5 - The AT&T IOT Starter Kit Two Board Assembly .......................................................................... 8
Figure 6 - Block Diagram of Assembled System .......................................................................................... 9
Figure 7 - Screenshot of KEIL Software Download Page ........................................................................... 10
Figure 8 - Key Steps In the License Management Dialog .......................................................................... 11
Figure 9 - Keil PSN Label On The Quick Start Card ................................................................................... 11
Figure 10 – How To Launch Flow From AT&T Menu ................................................................................. 14
Figure 11 - Accessing AT&T Flow Community Projects ............................................................................. 14
Figure 12 - Search for Avnet STM32L4 IoT Kit Project .............................................................................. 15
Figure 13 - Forking the Avnet STM32L4 IoT Kit Project ............................................................................. 15
Figure 14 - Deploying the Project ............................................................................................................... 16
Figure 15 - Project Deployment in Progress ............................................................................................... 16
Figure 16 - Steps to Update the Host Name and URL ............................................................................... 17
Figure 17 - Pubnub Landing Page .............................................................................................................. 18
Figure 18 - Accessing the Pubnub Registration Page ................................................................................ 18
Figure 19 - The Pubnub Registration Form ................................................................................................ 18
Figure 20 - Create a New Pubnub App ....................................................................................................... 19
Figure 21 - Name the Pubnub App ............................................................................................................. 19
Figure 22 - Opening the Pubnub App ......................................................................................................... 19
Figure 23 - The Pubnub App Keys .............................................................................................................. 20
Figure 24 - Pubnub related nodes in AT&T Flow ........................................................................................ 21
Figure 25 - Adding the Pubnub Keys to Flow ............................................................................................. 21
Figure 26 - A Fully Assembled Kit ............................................................................................................... 23
Figure 27 - Locating the Reference Design Project Files ........................................................................... 24
Figure 28 - Customizing the Device ID and End Point Address in main.c .................................................. 24
Figure 29 - Accessing Flow Endpoint Information ...................................................................................... 25
Figure 30 - Opening the FlowStreamClient.h Header File .......................................................................... 25
Figure 31 - Saving Files in Keil ................................................................................................................... 26
Figure 32 - Build the Keil Project ................................................................................................................ 26
Figure 33 - Keil Build Output After a Successful Project Build ................................................................... 26
Figure 34 - Flash the MCU on the STM32L4 Discovery Kit IoT Node ........................................................ 27
Figure 35 - Keil Output Showing Successful Flashing of MCU ................................................................... 27
Figure 36 - Dashboard Showing Data Published to the Cloud from IoT Starter Kit.................................... 28
Figure 37 - WNC M14A2A Module Firmware Query – LTE Cat-1 Firmware .............................................. 29
Figure 38 - WNC M14A2A Module Firmware Query – LTE-M (Cat-M1) Firmware .................................... 30
Page 4
Introduction
This guide provides an overview of the AT&T IoT Starter Kit (LTE-M, STM32L4) hardware and software and includes the key steps to quickly begin using this kit.
The IoT Starter Kit consists of a hardware platform comprised of a STMicroelectronics STM32L4 Discovery Kit IoT Node board plus an Avnet Arduino-compatible WNC M14A2A Cellular modem shield, stacked onto it. The modem sends/receives data via cellular data link back to the AT&T M2X/Flow website.
The example software provided lets you take measurements using a variety of sensors on the STM32L4 Discovery IoT board and send these values to a Freeboard.io dashboard via PubNub and the AT&T FLOW server.
The Firmware is developed and compiled using the ARM Keil MDK tools. Once installed on the STM32L4 microcontroller, the application software uses several interfaces such as
I2C, GPIO, and UART to communicate with the various sensors on the IoT board and the cellular modem. Periodically, data is read from the sensors, formatted and sent to the cloud via the cellular modem. Commands, in the form of JSON strings, can be sent back to the IoT Starter Kit from the cloud and instruct the device to control on-board components (such as the user LED for example).
System data flow is shown below.
FIGURE 1 - AT&T IOT STARTER KIT (LTE-M, STM32L4) DATA FLOW
Starter Kit Contents
The kit contains all the elements needed to implement a complete wireless IoT solution. It includes all the components shown and described on the next page…
Page 5
FIGURE 2 - AT&T IOT STARTER KIT (LTE-M, STM32L4) CONTENTS
STMicroelectronics STM32L4 Discovery Kit IoT Node  Avnet WNC M14A2A Cellular Shield  AT&T Starter SIM  1 LTE Blade Antenna  2 micro USB cables  5V DC power adapter to power Avnet WNC M14A2A Cellular Shield  Quick Start Card  Downloadable example designs and tutorials available at:
http://cloudconnectkits.org/product/att-stm32-iot-starter-kit
Forum support available via the following sites:
Avnet WNC M14A2A Cellular Shield, Reference Design and AT&T related questions:
http://cloudconnectkits.org/forum
STM32L475 board, ST-LINK, STM32 software libraries, etc:
https://community.st.com/community/stm32-community
Keil MDK tool questions:
http://www.keil.com/forum
Page 6
STMicroelectronics STM32L4 Discovery Kit IoT Node
The STM32L4 Discovery Kit IoT Node is the host development and operational platform. It features:
An STM32L475VG microcontroller (80 MHz, 1MB Flash, 128kB SRAM)  64-Mbit Quad-SPI Flash memory
Bluetooth® V4.1 module  Sub-GHz low-power-programmable RF module  Wi-Fi® module Inventek ISM43362-M3G-L44 (802.11 b/g/n compliant)  Dynamic NFC tag  2 digital omnidirectional microphones (MP34DT01)  Capacitive digital sensor for relative humidity and temperature (HTS221)  High-performance 3-axis magnetometer (LIS3MDL)  3D accelerometer and 3D gyroscope (LSM6DSL)  260-1260 hPa absolute digital output barometer (LPS22HB)  Time-of-Flight and gesture-detection sensor (VL53L0X)  2 push-buttons (user and reset)  USB OTG FS with Micro-AB connector  On-board ST-LINK/V2-1 debugger/programmer
More information on the STM32 series of microcontrollers from STMicroelectronics can be found at:
https://www.st.com/stm32
FIGURE 3 - STM32L4 DISCOVERY KIT IOT NODE
Page 7
Avnet M14A2A LTE Cellular Shield
The Avnet-designed Arduino Shield is based on a Wistron NeWeb Corporation (WNC) M14A2A cellular module. This module contains all necessary protocol stack functionality needed to establish and maintain a data connection in an LTE-M network. The WNC cellular module is controlled/managed via AT commands exchanged using a serial port connection to the STM32L4 Discovery Kit IoT Node. This is referred by WNC as a Type III interface to allow support for the 3GPP defined AT commands plus proprietary AT commands.
FIGURE 4 - AVNET WNC M14A2A CELLULAR SHIELD
FIGURE 5 - THE AT&T IOT STARTER KIT TWO BOARD ASSEMBLY
Page 8
The system-level block diagram for this version of AT&T IoT Starter Kit is shown below:
FIGURE 6 - BLOCK DIAGRAM OF ASSEMBLED SYSTEM
WNC Module Firmware
The WNC M14A2A module has been factory programmed with IMA3 firmware for LTE Cat-M1 operation.
If there is a need to check this firmware version or reprogram the module, please refer to Appendix-A at the end of this document
ARM Keil IDE
The firmware for the STM32L4 Discovery Kit IoT Node is developed, compiled and debugged using Arm® Keil MDK, a full-featured IDE with advanced debugging capabilities and CMSIS library support for thousands of Arm® Cortex-M devices. More detail about this professional IDE is available at:
http://www2.keil.com/mdk5
Keil Software Download
Download the Keil tools as follows:
1. Go to: https://www.keil.com/demo/eval/arm.htm
2. Provide the information requested in the form there and click Submit
3. Follow the instructions on the page which follows that, to download and install the Keil tools…
Page 9
FIGURE 7 - SCREENSHOT OF KEIL SOFTWARE DOWNLOAD PAGE
Install Keil License
After installing the Keil tools, a license needs to be installed. This IoT Starter kit includes a Product Serial Number (PSN) for a 90-day license for the Keil tools.
The key steps in this licensing procedure are summarized below:
1. Right-click on the Keil uVision5 desktop icon and select Run as Administrator
2. Navigate to Menu / File / License Management…
3. Select the Single-Use License tab in the dialog window that appears,
4. Click the Get LIC via Internet button, then click the button OK to register the product.
This action opens the License Management page on the Keil web site.
Page 10
Loading...
+ 22 hidden pages