For more information on the DragonConnect project, including how it is deployed and configured, visit the DragonConnect Project Page.
The DragonConnect project demonstrates recording events originating from the DragonBoard™ and managing an LED. The events are generated by pressing the volume up and volume down keys on the DragonBoard™. When one of the buttons is pressed, a client application written using the Amazon IoT C SDK for embedded platforms uses MQTT to transfer the event to an Amazon data center where it is stored in a DynamoDB table.
The LED is managed through the General Purpose IO (GPIO) of the DragonBoard™ and uses AWS IoT Device Shadows.
The functionality of DragonConnect and how the application is configured is detailed. The documentation includes information on how to execute the client and visit the dashboard.
Your DragonBoard™ must properly configured to connect to the internet and have Debian installed.
Prerequisite: These instructions are based on a clean install of the 16.09 version of Debian from the 96Boards site.
Please have the following information available:
- Amazon Account Number - (https://console.aws.amazon.com/billing/home#/account)
- Stage - Amazon API Gateway deploys to a stage, so it must be specified, By default 'dev' is used. (http://arrowelectronics.github.io/aws-iot-dragonconnect-c/admin/api.html)
- S3 Identifier - S3 is used to host the client, it would be best to give it something unique. By default the last 5 characters of the machine id is used. (http://arrowelectronics.github.io/aws-iot-dragonconnect-c/admin/dashboard.html)
After the setup has completed, there are a few urls that are provided. Please make note of them: AWS Endpoint, AWS API Gateway, and Dashboard
- Log into the AWS management console
- Select the Identity & Access Management service
- From the navigation bar click the 'Users' link then click the 'Create New Users' button
- Enter name (i.e. IoTtester) and click the 'Create' button
- Click the 'Show User Security Credentials' link. Either copy or download credentials then click 'Close'
- Click the new user's name to bring up 'Summary' then select the 'Permissions' tab
- Click 'Attach Policy' and add the following (Note that less restrictive permission may work but have not been tested):
- AWSLambdaFullAccess
- IAMFullAccess
- AmazonDynamoDBFullAccess
- AmazonAPIGatewayAdministrator
- AWSIoTFullAccess
Install needed dependencies. Login as user:password == linaro:linaro, open a terminal window, and execute the following:
$ sudo apt-get update
$ sudo apt-get -y install python-pip libperl-dev libgtk2.0-dev
$ sudo apt-get -y install python-dev python-yaml
$ sudo apt-get -y install groff less
$ pip install awscli
Verify the awscli installed correctly by executing $ aws help
from the terminal command line and seeing that help is invoked.
Still logged in as linaro, perform the following steps from the terminal window
- Create the working directory:
$ mkdir -p /home/linaro/Documents/arrow
- Navigate to the working directory and clone the git repository
$ cd /home/linaro/Documents/arrow
$ git clone https://github.com/ArrowElectronics/aws-iot-dragonconnect-c.git
- Log in as root to execute the remaining steps of the demo
$ sudo su -
- Run the aws configure command
$ aws configure
AWS Access Key ID [None]: <enter Access Key Id>
AWS Secret Access Key [None]: <enter Secret Access Key>
Default region name [None]: us-east-1
Default output format [None]: <leave blank and just press enter/return>
- Run the setup script
$ cd /home/linaro/Documents/arrow/aws-iot-dragonconnect-c/scripts
$ cp -r /root/.aws /home/linaro
$ ./setup.sh
Enter your amazon account ID and s3 unique identifier when prompted.
Note: You may see warnings during this step. Continue on before attempting to debug. The libaries in node and aws continue to evolve. Chances are the demo will still work. Also note the ThingID, synonomous with Device ID that you will need to select from the DragonConnect Dashboard below.
- Start the Client
$ cd /home/linaro/Documents/arrow/aws-iot-dragonconnect-c/DragonBoard/bin
$ ./aws_demo
- Visit the DragonConnect Dashboard shown at the end of setup script
###############################################
# Build Complete
################################################
#### Access your DragonConnect AWS Endpoint here: xxxx.amazonaws.com
#### Access your DragonConnect AWS API Gateway here: https://xxx.amazonaws.com
#### Access your DragonConnect Dashboard here: <THIS ONE> http://xxxx.amazonaws.com
- In the upper right corner of the DragonConnect Dashboard click on the "Select a Thing" dropdown and select your device
Press the + / - volume buttons on the DB410c and observe the DragonConnect Dashboard Volume Change Log update dynamically.
On the DragonConnect Dashboard select on or off on the LED Control and observer the LED on the Dragonboard turn on and off.
All the settings from the install are stored scripts/.settings
$ cd scripts
$ ./uninstall.sh
This SDK is distributed under the Apache License, Version 2.0, see LICENSE.txt and NOTICE.txt for more information