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.
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: Arduino compatible WNC-Shield AC power adapter to USB DC 5V 2 LTE antennas NXP K64F MCU carrier board with Arduino™...
– 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.
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.
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 8...
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.
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.
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.
Page 13
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.
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.
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.
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.
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 17...
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.
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.
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.
To create your cellular application project to run on the FRDM-K64F board, log into your mbed.org account and navigate to https://developer.mbed.org/teams/Avnet/code/Avnet_ATT_Cellular_IOT/ Select the Import this Program button. Your screen should appear as follows: After clicking the Import button, the development environment opens and the code for the FRDM-K64F board is imported.
Page 22
Prior to compiling the software, some modifications must be made to ensure it operates properly. These changes are isolated to the config_me.h file located in the Avnet_ATT_Cellular_IOT project. The parts that require updating in config_me.h are MY_SERVER_URL (1), FLOW_BASE_URL (2), and FLOW_DEVICE_NAME (3). The correct values for the defines are obtained by clicking the Climate GET cell, opening Endpoints, and obtaining the Base URL (shown below).
Page 23
Edit the config_me.h file and update each define with the correct information. To obtain the FLOW_DEVICE_NAME, navigate to the M2X page and select the Virtual Starter Kit created previously. Page 23...
The details for the Kit are displayed as shown. The FLOW_DEVICE_NAME is listed under DEVICE SERIAL. After making these modifications to the config_me.h file, click the Save button and the Compile button along the top bar. The source files are compiled and the binary programming file, Avnet_ATT_Cellular_IOT.bin, is saved to your default Download folder.
Running Example Software Install the COM driver (Windows) Prior to running the SBC software for the AT&T IoT Kit, you need to install the necessary serial port driver to allow Windows to see program output. Follow the instructions at: https://developer.mbed.org/handbook/Windows-serial-configuration. After the serial drivers have been installed, determine which COM port is being used by opening the device manager.
Install/Setup of Terminal Program You need a terminal program to monitor the output from the FRDM-K64F program. The mbed site (https://developer.mbed.org/handbook/Terminals) provides instructions for setting up a terminal on a Windows, MAC, or Linux computer. With a terminal program installed, configure the following parameters: –...
1. Unsolicited messages cannot currently be sent to the board. A response to the HTTP GET message and the subsequent M2X posting, can however be created. On the Flow canvas (Data tab), double- click the Set Board LED function. Examine how the decision for setting the LED color is made. 4.
Appendix A: Extending Shield Card Capabilities with External Sensors By default, the mbed project sends the following sensor data to Flow: – Temperature and humidity from the HTS221 device on the Cellular shield – Accelerometer X, Y and Z-axis readings from the FXOS8700CQ motion sensor on the FRDM-K64F board In addition to the above, other sensor inputs can be provided via the PMOD connector on the WNC Shield.
FRDM-K64F Software Modifications Reporting Frequency: By default, the FRDM-K64F board uploads sensor measurements to AT&T’s Flow environment every 5 seconds. You can adjust how often you want to do this by editing the SENSOR_UPDAT_INTERVAL_MS value in the config_me.h header file. The sensor measurements that are reported can be changed by altering the iSensorsToReport parameter.
Appendix B: Charting/Graphing Capabilities In the M2X screen, click Devices and click Virtual Starter Kit. In your device, you will see a number of enabled Streams on the left. Select Acceleration Z-axis. If your board is lying flat, with gravity accelerating your board downward at ≈ 1.00 g, you should see a graph similar to the one displayed.
Page 32
It is also possible to view multiple streams on one chart by clicking Charts > Add Chart. Select the streams you want to view and click the Save button. Note: With the free account, you can add a maximum of two streams. You can create graphs that use streams from different devices.
Appendix C: M2X TRIGGERS Triggers can be created in M2X devices. In the IoT Kit project, click Devices > Virtual Starter Kit > Triggers. Flow automatically creates two triggers for Hot Temp and Cold Temp. Click the edit pencil on the right. You can modify the trigger conditions.
Page 34
Click the Trigger tab to explore how Flow processes the trigger inputs and uses them for notifications. Page 34...
Appendix D: Data Processing in Flow When data is sent from the WNC-Shield sensors to Flow, it enters via a HTTP-IN GET port. From here, it goes through a number of nodes. On the Flow Data canvas, the M2X lead-in function is where data enters.
This is where the various sensor readings are processed and either sent (PUT) or posted to M2X. Appendix E: Avnet ARM mbed C++ Libraries and Example Programs All v5 mbed compatible libraries and examples may be found here: https://developer.mbed.org/teams/Avnet/...
Need help?
Do you have a question about the AT&T Cellular IoT Kit and is the answer not in the manual?
Questions and answers