at&t iot starter kit quick start guide - amazon s3...feb 13, 2018  · at&t iot starter kit...

16
AT&T IoT Starter Kit Quick Start Guide 1 AT&T IOT STARTER KIT QUICK START GUIDE Document revision 2.1 (Feb 13, 2018) ABSTRACT This quick start guide provides a tutorial for running the AT&T IoT Starter Kit out-of-box demo. After completing these steps, your kit will publish temperature and humidity to an Amazon Web Services (AWS) page each time a button is pressed. This demo is intended to be a simple introduction to the IoT Starter Kit and does not require any experience programming microcontrollers or the cloud. Additionally, the user isn't required to set up an AWS account for this tutorial. Time Required: This tutorial requires 20-30 minutes to complete. WINDOWS 8/10 WARNING The AT&T Starter Kits covered by this guide include the NXP Freedom microcontroller development board (FRDM-K64F). This board is supported by the ARM mbed software platform and tools. Unfortunately, the Storage Services features found in Windows 8 and Windows 10 may corrupt the mbed PC interface port found on this board. (Mac and Linux users are not affected by this problem.) ARM recommends that you either use Windows 7 or disable the Windows Storage Services feature while using this board. Once the firmware for the board and bootloader are updated to the latest version (v0243 or later), you should be able to use Windows 8 or 10 with the Storage Services feature enabled. See the following blog post from ARM for further details: https://os.mbed.com/blog/entry/DAPLink-bootloader-update/

Upload: others

Post on 27-May-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

AT&T IoT Starter Kit Quick Start Guide 1

AT&T IOT STARTER KIT QUICK START GUIDE Document revision 2.1 (Feb 13, 2018)

ABSTRACT

This quick start guide provides a tutorial for running the AT&T IoT Starter Kit out-of-box demo. After completing these steps, your kit will publish temperature and humidity to an Amazon Web Services (AWS) page each time a button is pressed.

This demo is intended to be a simple introduction to the IoT Starter Kit and does not require any experience programming microcontrollers or the cloud. Additionally, the user isn't required to set up an AWS account for this tutorial.

Time Required: This tutorial requires 20-30 minutes to complete.

WINDOWS 8/10 WARNING

The AT&T Starter Kits covered by this guide include the NXP Freedom microcontroller development board (FRDM-K64F). This board is supported by the ARM mbed software platform and tools.

Unfortunately, the Storage Services features found in Windows 8 and Windows 10 may corrupt the mbed PC interface port found on this board. (Mac and Linux users are not affected by this problem.)

ARM recommends that you either use Windows 7 or disable the Windows Storage Services feature while using this board. Once the firmware for the board and bootloader are updated to the latest version (v0243 or later), you should be able to use Windows 8 or 10 with the Storage Services feature enabled. See the following blog post from ARM for further details:

https://os.mbed.com/blog/entry/DAPLink-bootloader-update/

AT&T IoT Starter Kit Quick Start Guide 2

CONTENTS

Abstract ........................................................................................................................................... 1

Windows 8/10 Warning .............................................................................................................. 1

How the Quick Start Application Works ......................................................................................... 3

Starter Kits....................................................................................................................................... 4

Requirements / Downloads ............................................................................................................ 5

Computer ................................................................................................................................ 5

Hardware (These items are found in the IoT Starter Kits) .................................................... 5

Software .................................................................................................................................. 5

Related Tutorials (for further study): .......................................................................................... 5

Step-By-Step Instructions ............................................................................................................... 6

Part I. Assemble the IoT Starter Kit Hardware ............................................................................ 6

Construct the demo hardware................................................................................................ 6

Setup (i.e. provision) your SIM card ....................................................................................... 8

Part II. Program the NXP FRDM-K64F board............................................................................... 9

Download the Out-of-Box binary program to your computer ............................................... 9

Write the binary program to the NXP FRDM-K64F ................................................................. 9

Part III. Establish Serial Connection to Your PC ........................................................................ 10

For Windows, Verify Serial COM Port Setting ...................................................................... 10

Install a serial terminal program (If you don’t have one) ..................................................... 10

Configure Serial Terminal and Enable the Connection ......................................................... 11

Part IV: Open the Amazon (AWS) S3 Demo Website................................................................ 13

conclusion and Next Steps ............................................................................................................ 14

Appendix ....................................................................................................................................... 15

Disable storage services (for Windows 8/10 machines only) ................................................... 15

AT&T IoT Starter Kit Quick Start Guide 3

HOW THE QUICK START APPLICATION WORKS

We often think of IoT as a combination of three elements: Device, Connectivity, and Cloud. With that in mind, here’s a diagram of this Quick Start:

IOT DEVICE:

For this example, the IoT Starter Kit you have chosen acts as the hardware IoT device for your system. The code (provided for you) running on the IoT Starter Kit’s microcontroller board reads the temperature and humidity each time you press the user button and sends it over the AT&T cellular network via the Starter Kit’s Cellular Modem board.

The IoT Starter Kit includes the NXP Freedom microcontroller board (FRDM-K64F) which is based on the ARM Cortex-M4F CPU. This microcontroller is supported by ARM’s mbed toolset, but we don’t need to discuss these details in this guide since the binary code has already been written for you.

CONNECTIVITY

For connectivity, the IoT Starter Kits include a Cellular Modem board along with an IoT SIM card (Subscriber Identity Module). After registering your SIM card and plugging it into the Cellular Modem board, you can communicate over AT&T’s LTE cellular network.

Each SIM card contains a unique ICCID serial number (Integrated Circuit Card Identifier). Before you can communicate over the cellular network, you will need to “provision” (i.e. register) your SIM card by logging into the AT&T IoT Marketplace and entering the ICCID number printed on your SIM. Once this is done, AT&T network will be able to recognize your device.

CLOUD

The cloud side is represented by an AWS (Amazon Web Services) dashboard. After entering your ICCID number in the dashboard and clicking a button, your latest temperature and humidity data will be displayed.

As with the device programming, the cloud-side AWS application has already been written and is provided for you by pointing your browser to the URL provided towards the end of this guide.

AT&T IoT Starter Kit Quick Start Guide 4

STARTER KITS

This Quick Start Guide describes how to use the following kit:

• AT&T IoT Starter Kit Powered by AWS

The AWS (Amazon Web Services) version of the kit includes the same hardware found in the original Starter Kit, but also includes a micro SD memory card which can be used with the associated connector found on the FRDM-K64F board. The micro SD card is a convenient place to store the certificate strings required when communicating with AWS.

Note that at this time, the binary FRDM-K64F program for this demo does not reliably connect to the LTE-M network. We only recommend that you run this demo using the Cellular Shield with LTE firmware.

AT&T IoT Starter Kit Quick Start Guide 5

REQUIREMENTS / DOWNLOADS

The following hardware and software are required to complete the firmware upgrade process.

COMPUTER

Computer with either Windows 7/8/10, Mac, or Linux operating system The computer will be used to write a file to FRDM-K64F; view serial data transmit from the FRDM-K64F via the USB port, and view the AWS dashboard in an Internet browser

HARDWARE (THESE ITEMS ARE FOUND IN THE IOT STARTER KITS) (These items are pictured on page 6.)

NXP Freedom Microcontroller board (FRDM-K64F)

IoT Starter Kit Cellular Shield

IoT Starter Kit Cellular Shield Power Supply (A/C to 5V USB adaptor)

Two Micro USB 2.0 Cables

One (or two) antennas, depending upon which kit you purchased

SOFTWARE

Later steps in this tutorial will describe how to install and use these files and programs.

All Users

Download: ATT_AWS_IoT_Kit_quickstart_demo.bin

Windows Users only (Mac & Linux natively contain the required drivers and serial terminal)

Download: mbedWinSerial_16466.exe

The mbed serial port works by default on Mac and Linux, but Windows needs a driver.

Download: Your favorite serial terminal (e.g. RealTerm, Putty, Tera Term and Termite)

You can skip downloading a serial terminal if you already have one installed. See the Windows Serial Configuration mbed page for more information.

RELATED TUTORIALS (FOR FURTHER STUDY):

• For further info about the FRDM-K64F development board see the FRDM-K64F mbed page.

• For further information about the Avnet Cellular Shield, see the Getting Started with the AT&T IoT Starter Kit

AT&T IoT Starter Kit Quick Start Guide 6

STEP-BY-STEP INSTRUCTIONS

PART I. ASSEMBLE THE IOT STARTER KIT HARDWARE

Some assembly is required to connect the various boards and items from the kit. Here is a picture of the kit contents. Note that picture below is missing the microSD memory card that is also found in the AT&T IoT Starter Kit Powered by AWS.

CONSTRUCT THE DEMO HARDWARE

1. Plug the Cellular Shield onto the Arduino connectors on the FRDM-K64F board.

AT&T IoT Starter Kit Quick Start Guide 7

2. Insert the micro-SIM card into the Cellular Shield.

Pop the supplied AT&T micro-SIM card from the plastic holder and plug it into the SIM socket (X3) on the Cellular Shield board. (Do not insert a Nano-SIM into the socket as it may get stuck and ruin the socket.)

Extracting and Inserting micro-SIM card

3. Write down the 20-digit ICCID number printed on the SIM card.

ICCID: _____________________________________________________________________

You will need this number later to provision your SIM card in the next step.

Additionally, you will enter this number into the Amazon (AWS) dashboard application so that it can display the data transmitted from your specific kit. The quick start binary program running on FRDM-K64F board reads this number directly from the SIM card and sends it to the Amazon cloud along with the temperature and humidity data.

4. Connect the antenna(s).

Connect antennas to both the "Primary" connector (X1) and "Diversity" (X2) connector provided on the Cellular Shield.

AT&T IoT Starter Kit Quick Start Guide 8

5. The Cellular Shield requires 5V power supplied by the included AC/DC power adapter.

Do not use a laptop or PC USB port to power the Cellular Shield since it requires more power than most computers provide. Instead, connect the 5V USB power connector (X5) on the Cellular Shield to the provided AC/DC power supply using one of the micro-USB cables. LED1 on the Cellular Shield will illuminate green when powered.

Note that the other USB port on the Cellular Shield will not be used during this lab exercise. You will use this if you ever need to update the firmware on this board.

6. Connect the NXP FRDM-K64F board to your computer.

Plug a micro-USB cable into the SDA USB (J26) port on the FRDM-K64F board. Then connect the other end of the cable to a USB port on your PC/laptop. The kit should enumerate as a standard MBED USB drive. CAUTION - Windows 8/10 may corrupt the MBED USB drive interface. (See Appendix for more details.)

SETUP (I.E. PROVISION) YOUR SIM CARD

7. Create an AT&T account and provision (i.e. register) your SIM card.

Go to https://marketplace.att.com/activate to activate your SIM card. Sign in if you already have an account or go ahead and create one. This is where you will manage your SIM cards.

Follow the directions on the Marketplace website to authorize your SIM card. Note that you will need the 20-digit number from step 3.

5V/DC USB Power Connector

Power LED

AT&T IoT Starter Kit Quick Start Guide 9

PART II. PROGRAM THE NXP FRDM-K64F BOARD

DOWNLOAD THE OUT-OF-BOX BINARY PROGRAM TO YOUR COMPUTER

8. Download the Quick Start binary.

If you have not already downloaded the quick start binary named “ATT_AWS_IoT_Kit_quickstart_demo.bin” go ahead and do so now (link). If the file downloads as a ZIP file, unzip it to extract the binary file.

WRITE THE BINARY PROGRAM TO THE NXP FRDM-K64F

9. Verify the Starter Kit is connected to your computer and shows up as "MBED" USB drive.

As mentioned in Step 6, the FRDM-K64F shows up on your PC as an MBED USB drive when plugged into the USB port.

10. Copy the binary (.bin) to the MBED drive.

Using Drag-and-drop or Copy-and-paste, the "copy" should initiate the binary program being written into Flash memory on the FRDM target microcontroller.

AT&T IoT Starter Kit Quick Start Guide 10

PART III. ESTABLISH SERIAL CONNECTION TO YOUR PC

To view information generated by the NXP Freedom microcontroller (FRDM-K64F) program, we will connect the board to our computer using serial port communication. This connection requires four things (see the step-by-step instructions to follow):

o A serial hardware connection. In this case, the serial data will be sent across the USB cable that you already connected between the K64F board and your computer.

o Your computer must have the necessary serial driver. This is standard for Mac and Linux, but Windows users may need to install it.

o Your computer needs a serial terminal program.

o The serial connection must be configured with the correct parameters.

FOR WINDOWS, VERIFY SERIAL COM PORT SETTING

11. Write down Windows COM Port number.

Windows computers randomly assign a communications (COM) port number the first time you connect a device. You can figure out which port number is used by Windows by running the Device Manager.

a. Open the "Run" dialog by jointly pressing the Windows+R (+R) keys for "Run" b. Type devmgmt.msc and hit Enter c. Write down the COM port number for future reference: ___________

INSTALL A SERIAL TERMINAL PROGRAM (IF YOU DON’T HAVE ONE)

12. Windows users should verify they have a serial terminal or install one.

Windows computers do not normally include a serial terminal application. You will need to download and install one on your computer. This tutorial uses RealTerm, but other favorites include Putty, Tera Term, and Termite.

AT&T IoT Starter Kit Quick Start Guide 11

CONFIGURE SERIAL TERMINAL AND ENABLE THE CONNECTION

13. Configure the settings for your serial terminal application. These include:

a. COM port number (that you figured out a couple of steps previously). b. The remaining serial connection parameters are (115200:N:8:1).

14. Reset the K64F board and view the serial terminal.

After connecting to the serial port, press the RESET button on the FRDM board and then…

After pressing Reset the terminal should print out the following information:

Note that if the cellular modem doesn’t connect within 60 seconds, you may need to push reset button again. In rare cases, it may take a few resets for it to connect.

AT&T IoT Starter Kit Quick Start Guide 12

15. After “Ready to Publish is displayed, press the SW3 button.

After it prints “READY TO PUBLISH” to the serial terminal, press the SW3 button next to the LED in the corner of the K64F board. The LED on the FRDM board should turn RED and the temperature and humidity information should be "printed" to the serial terminal.

More importantly, the temperature and humidity – along with your SIM card’s ICCID number – will be transmitted to the Amazon cloud. The transmission will conclude by printing "Update Sent" to the serial terminal.

AT&T IoT Starter Kit Quick Start Guide 13

PART IV: OPEN THE AMAZON (AWS) S3 DEMO WEBSITE

To view your data in the cloud, connect to an Amazon (AWS) dashboard over the AT&T LTE or LTE-M cellular network.

16. Go to the Amazon dashboard to view the data published from your Starter Kit.

After pushing the SW3 button, and verifying “Update sent” in the serial terminal, click the following link to go to the demo website:

https://s3-us-west-2.amazonaws.com/attiotkitbucket/index.html

17. Enter your 20-digit ICCID number (without spaces or dashes).

This number is on the SIM card and on the larger plastic card the SIM card came from. You should have written this down in Step 3.

18. Click on the GET SHADOW button and view the data sent from your kit.

After clicking the "Get Shadow" button, the Sync Status on the AWS dashboard should display "Success" and the information should reflect the last status sent from the IoT Kit.

AT&T IoT Starter Kit Quick Start Guide 14

CONCLUSION AND NEXT STEPS

After completing this Quick Start Guide, you should have learned and executed the following skills:

• Assembled the starter kit components • Created an account at the AT&T IoT Marketplace and registered your SIM card • Downloaded a binary program to the MBED interface on the FRDM-K64F board • Viewed status information from the FRDM-K64F connected to your computer using a

serial terminal application • Opening a URL to view your data on a dashboard

While this fun exercise gives us a good way to try out the AT&T IoT Starter Kit, we haven’t yet learned any details specific to programming and using the Starter Kit hardware or the Cloud. Here are a few additional tutorials that can help you begin learning and customizing your Starter Kit and Cloud experience:

• Getting Started with the AT&T IoT Starter Kit

Will take you through the process of modifying and compiling the mbed C program running on the FRDM-K64F board. Additionally, on the Cloud side, you will set up and use the AT&T IoT Platform – consisting of the AT&T Flow and M2X services.

• Getting Started with the IoT Starter Kit Powered by AWS

This tutorial guide takes you one step further into using Amazon’s Web Services. After setting up your own AWS account, you will generate the required security certificates and save them to a micro-SD card, placing the card into your FRDM-K64F board. Once connected to your own AWS account, you can (install and) use Python to interact with your IoT Starter Kit.

AT&T IoT Starter Kit Quick Start Guide 15

APPENDIX

DISABLE STORAGE SERVICES (FOR WINDOWS 8/10 MACHINES ONLY)

The following steps will disable Storage Services for your Windows 8 or Windows 10 machine.

1) Open the Services console.

a) Open the "Run" dialog pressing the Windows Logo Key and then pressing the R key (+R)

b) Type services.msc and hit OK

2) Once the Services console opens, double-click the item from the list named Storage Service.

AT&T IoT Starter Kit Quick Start Guide 16

3) With Storage Service Properties open, click the button named Stop.

The same procedure can be used to turn Storage Services back on when you have finished working with the NXP board.

Note: Please refer to the blog posted by ARM for more details:

https://os.mbed.com/blog/entry/DAPLink-bootloader-update/