Avnet AT&T Cellular IoT Kit User manual

Page 1
Copyright © 2017 Avnet, Inc. AVNET, “Reach Further,” and the AV logo are registered
trademarks of Avnet, Inc. All other brands are the property of their respective owners.
LIT# 5176-GSG-ATT-IOT_v1
AT&T Cellular IoT Kit
Getting Started Guide
Version 1.3

Page 2
Revision History
Document Version:
Version 1.3
Document Date:
11/29/2016
Prior Version History:
Version:
Date:
Comment:
1.0
2016/08/18
Initial Release
1.1
2016/08/25
URL corrections
1.2
2016/11/10
Updated URL correction for OOB demo
1.3
2016/11/29
Added firmware upgrade topic, point to AT&Ts
web-site, point to Avnet ARM mbed website.
Comments:

Page 3
Contents
Revision History ..........................................................................................................2
Introduction .................................................................................................................4
Kit Contents....................................................................................................................................5
NXT FRDM-K64F Single Board Computer (SBC)............................................................................6
WNC-Shield Board .........................................................................................................................6
IoT Kit Software..............................................................................................................................7
Cellular Shield WNC 14A2A Firmware ............................................................................................7
Creating Online Accounts............................................................................................7
Cloudconnectkits.org Account.........................................................................................................7
Jasper Account for SIM Card..........................................................................................................9
ARM mbed.org Account................................................................................................................ 11
AT&T Flow and M2X Accounts......................................................................................................11
Flow Account ................................................................................................................12
M2X Account.................................................................................................................14
Connect Flow and M2X.................................................................................................15
Assembling the AT&T IoT Kit Hardware....................................................................19
SBC Firmware.............................................................................................................................. 20
Importing, Compiling, and Programming AT&T IoT Kit Software ..............................21
Compiling .....................................................................................................................................21
Programming................................................................................................................................24
Running Example Software.......................................................................................25
Install the COM driver (Windows)..................................................................................................25
Install/Setup of Terminal Program.................................................................................................27
Running the IoT Flow and M2X Program.......................................................................................27
Getting Help and Support..........................................................................................28
Appendix A: Extending Shield Card Capabilities with External Sensors ...................29
Silicon Labs PMOD Sensor Auxiliary Board ..................................................................................29
Seeedstudio Xadow v2 GPS module.............................................................................................29
FRDM-K64F Software Modifications .............................................................................................30
Appendix B: Charting/Graphing Capabilities.............................................................31
Appendix C: M2X TRIGGERS...................................................................................33
Appendix D: Data Processing in Flow.......................................................................35
Appendix E: Avnet ARM mbed C++ Libraries and Example Programs ....................36

Page 4
Introduction
This guide provides an overview of the Avnet AT&T Cellular IoT Starter Kit hardware and
software. The guide includes steps that allow you to quickly begin using the kit. The example
software lets you take measurements using various sensors and send the values to the AT&T
M2X/Flow server. Commands, in the form of JSON strings, are sent back to the IoT Starter Kit
from the cloud and instruct the device to control on-board components such as the user LED.
The IoT Starter Kit consists of a hardware platform comprised of an NXP FRDM-K64F single-
board computer (SBC) and an Avnet Arduino-compatible WNC Cellular modem shield mounted
on top. The WNC modem sends/receives data via cellular data link back to the AT&T M2X/Flow
website. System data flow is shown below.
M2X FLOW
Data to
WNC
Module
LTE Cat1
I2C Data From HTS221
Sensor and WNC
Module

Page 5
Kit Contents
The kit contains all the elements needed to implement a complete wireless IoT solution. It
includes all the components shown and described below:
–AT&T IoT SIM Starter Pack
–Quick Start Card
–Downloadable example designs and tutorials
–Forum support via:
http://cloudconnectkits.org/forum/topic/att-cellular-iot-starter-kit
Arduino compatible WNC-Shield
NXP K64F MCU carrier board with
Arduino™ R3 expansion slot
2 LTE antennas
2 USB cables
AC power adapter to USB DC 5V

Page 6
NXT FRDM-K64F Single Board Computer (SBC)
The NXP FRDM-K64F SBC is the host development and operational platform (the controller).
The elements used by the IoT Kit are as follows:
–MK64FN1M0VLL12 MCU (120 MHz, 1 MB flash memory, 256
KB RAM, USB) which is based on a Cortex M4 ARM processor
core
–RGB LED
–The OpenSDAv2 debug circuit supporting the CMSIS-DAP
Interface to allow programming and monitoring software
–Serial port interface
–I2C interface for communicating with off-board sensors
–UART interface for communicating with the WNC-Shield card
WNC-Shield Board
Avnet has produced an Arduino Shield with 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 network.
The WNC cellular module is controlled/managed via AT
commands exchanged using a serial port connection to the
FRDM-K64F. This is referred by WNC as a Type III interface
to allow support for the 3GPP defined AT commands plus
proprietary AT commands.
The block diagram for the WNC-Shield is shown below:

Page 7
IoT Kit Software
The NXP FRDM-K64F SBC uses the ARM mBed operating software and associated
development tools. This allows all development to take place in a Web browser (e.g., Firefox,
Chrome, or Explorer) and removes the need to install tools on your PC. Once installed on the
Freedom board, the software uses various interfaces such as I2C, GPIOs, and UARTS.
At power up, the software configures the hardware and initializes the WNC-Shield card which
can take up to 60 seconds to complete.
Cellular Shield WNC 14A2A Firmware
Before assembling the kit or proceeding to the next steps, please ensure you are using the
latest WNC 14A2A firmware. Instructions for how to upgrade the firmware can be found on the
AT&T website:
https://starterkit.att.com/tutorials/cellular-shield-firmware-upgrade
Note: Please carefully read all of the instructions before performing the firmware upgrade, there
are several steps that are not intuitive.
Creating Online Accounts
There are five accounts required to use the IoT Kit:
1. Cloudconnectkits.org account for kit registration
2. Jasper account for SIM card registration
3. ARM Mbed.org account for compiling and modifying the SBC/WNC-Shield software
4. AT&T Flow account for implementing the sensor data
5. AT&T M2X account for an end-point device used by Flow. Essentially, this is the location where
sensor data is stored to and read from.
Cloudconnectkits.org Account
After obtaining the IoT Kit, it is best to register at www.cloudconnectkits.org to be aware of any
firmware/software updates as well as other information.
1. Navigate to www.cloudconnectkits.org .
2. Press the Sign In/Register button. A drop-down appears from which you can create an account.

Page 8
3. When asked for the Serial Kit Number, use the WNC Serial Number (S/N) as shown below.
4. Once registered, you are logged into the site. A confirmation email is sent to the email address you
provided. You now have access to several product support pages as shown.

Page 9
From the AT&T Cellular IoT Starter Kit page, you can view much of the kit’s design
documentation, bill of materials, and other information.
Jasper Account for SIM Card
You have a choice between purchasing a SIM Card or a complete hardware kit. Both choices
come with a data plan and the connectivity API. You must also obtain a free IoT Developer
Services account by registering at https://StarterKit.att.com.
Once registered, the IoT Developer Services account provides 300 MB of data and 300 SMS
messages.

Page 10

Page 11
ARM mbed.org Account
The software associated with the IoT Kit is located on mbed.org. If you do not have an account,
navigate to the mbed website (https://developer.mbed.org/) and follow the instructions to create
an account.
Once you have an account, you can download and modify the firmware for the kit.
AT&T Flow and M2X Accounts
To begin using the AT&T Flow and M2X accounts, you need to sign up for an AT&T IoT
Services account. This is done by going to https://m2x.att.com/signup and creating an account.

Page 12
Once you are registered, use these same credentials for your Flow account (https://flow.att.com )
and your M2X account (https://m2x.att.com ). The IoT Kit takes advantage of the fact Flow can
create the necessary M2X device and streams. To learn how to set up a device manually, go to
https://m2x.att.com/onboarding.
Flow Account
Flow can be entered by selecting Flow from the AT&T IoT Services account dropdown menu, as
shown:
Flow is a GUI-based IoT development tool based on NodeJS. It allows for data input and output
along with user defined rules for up to 100,000 data points per month free of charge. Data flows
through nodes from left to right when viewing a Flow. To learn more about Flow, see
https://flow.att.com/start.

Page 13
Note: Unlike M2X, Flow times out after a few minutes of inactivity. When this happens, simply
click the Log In button to log back in. Even when you have a fast connection, Flow is slow to
respond.
If you want to learn by creating your own Flow design from scratch, you can follow AT&T’s
instructions that were created for a recent event at:
https://att.app.box.com/s/15umqzirkrmgru2yl7utbp8x4jv0bgmg.
For the IoT Kit, we start by copying a reference design and modifying it. Each Flow design is
unique in terms of its endpoint addresses and account keys, so you need to edit these unique
parameters.
To duplicate an existing project, follow these steps:
1. On the lower left side of the Flow IDE, click Resources > Projects Library.
2. In the top middle, under Search Projects, enter Avnet Starter Kit.
3. Click Avnet Starter Kit dev.
4. Click the Fork button in the top right to create a copy of the project for your exclusive use.

Page 14
5. Hover your curser to the right of the new name and click the pencil to change the name to something
unique (e.g., Paul’s Starter Kit Dev). Then click the Fork button.
6. Once the project is Forked, click the Deploy button.
This compiles and activates your project. This step takes a minute the first time. Subsequent
deploy actions will be quicker. Now that the project is built and deployed, modifications to the
WNC-Shield software must be made for it to work properly. These changes are detailed in the
section on Compiling.
M2X Account
M2X is a time-series data store that is free for up to 10 devices. Navigate to https://m2x.att.com
or access it from within your AT&T IoT Services Account.
When we connect Flow and M2X projects, we will use Flow to create the necessary devices and
streams.

Page 15
Connect Flow and M2X
At this point, it is easiest to have two browser windows open (one for M2X and one for Flow)
because the M2X master key must be pasted into the Flow Configuration Function.
1. In M2X, click the Hello power button on the top right and select Account Settings.
2. Highlight the Master Key and copy it to the clipboard.
3. Return to Flow in your other window/tab and find the Configuration function. Notice the graphical
design has different tabs for each logical section. The Configuration function is on the Data tab.

Page 16
4. Double-click the Configuration function and a window with the JavaScript appears. Paste the key you
previously copied into the location of the current M2X-Key field and click the OK button. It may take a
while for the script to update.
5. At the bottom of the canvas (where the configuration bubble is located), click the Endpoints tab where
the Base URL field is located. Click the Copy button. The copied information is used to update two
fields: base_hostname and base_url.
The Base URL is:
https://run-west.att.io/1e464b19cdcde/774c88d68202/86694923d5bf28a/in/flow.
The first part, run-west.att.io, is the base_hostname. The base_url is, above, displayed in
green.

Page 17
6. Open the Configuration function and paste the fields where they belong. Click the OK button.
7. With the configuration updated, a blue dot appears on your function graphic. This indicates it has
changed but has not been deployed. Click the Deploy button to resolve this.

Page 18
8. Flow automatically creates a Virtual Device in M2X for you. This is a one-time operation that has to
be performed. In Flow, go to the Virtual Device tab of the canvas and find the Initialize component in
the bottom left. Click once on the solid part to the left of Initialize.
9. You can verify the component has been created in the M2X environment by returning to your M2X
window and clicking Devices. Your virtual device should appear. If you expand it by clicking the plus
sign (+), you will see the different M2X streams that have been created for it.

Page 19
Assembling the AT&T IoT Kit Hardware
The hardware is delivered as two separate boards. Use the following instructions to connect the
boards.
1. Plug the Avnet Cellular shield onto the Arduino connectors on the FRDM-K64F board.
2. Plug the supplied AT&T SIM card into the SIM socket (X3) on the shield.
3. Screw the two antennas to the shield SMAs connectors (X1, X2).
4. The cellular shield requires 5V power supplied by the included AC/DC power adapter. It is not
recommended to use a laptop USB port for this power source due to the limited power capabilities of
most USB ports. Plug a microUSB cable into the 5V USB shield power (X5) on the Cellular shield and
connect the other end of the cable to the provided AC/DC supply. LED1 illuminates light green.
5. Plug a microUSB cable into the SDA USB (J26) port on the FRDM-K64F board. Connect the other
end of the cable to a USB port on your laptop. The kit should enumerate as a standard MBED USB
drive.

Page 20
SBC Firmware
With the hardware set up, connect to a PC and ensure it enumerates as a drive (c:\MBED).
Verify the firmware is at version 0226 or higher by opening the DETAILS.TXT file located on the
MBED drive. The following shows how this information is displayed.
If the firmware is not at 0226 or higher, update it by following the instruction provided at:
https://developer.mbed.org/handbook/Firmware-FRDM-K64F.
Table of contents
Other Avnet Computer Hardware manuals