GithubHelp home page GithubHelp logo

skyformat99 / aws-iot-sdk-for-windows Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raspirepo/aws-iot-sdk-for-windows

0.0 2.0 0.0 704 KB

License: Apache License 2.0

C 97.09% C++ 2.61% Objective-C 0.14% CMake 0.16%

aws-iot-sdk-for-windows's Introduction

AWS IoT SDK for Windows

As of now Renesas IoT boards (Synergy Platform based) doesn't have any SDK support for AWS IoT. The goal of this project is to understand AWS IoT on Windows OS, port the code for Renesas IoT kits, Windows 10 IoT Core supporetd boards, and also to combine the open source code from MbedTLS and MQTT protocol in order to communicate with AWS IoT. This demo example can be used to verify your IoT application end to end on your developement system like windows or Mac instead of trying on hardware directly.

Requirements:

  1. Windows OS with Visual Studio 2017 Community or any other Visual Studio version.
  2. AWS IoT Account.
  3. CA Root, AWS IoT certificates and publilc/private Key file.

Step1:

Follow the instructions in AWS IoT documentation for creating and downloading the above mentioned certificates in to "certs" folder.

Step2:

Download/pull this repository to your PC, open Visual Studio file "mbedTLS.sln" under folder name "vs2017_projects". In case starup project is "mbedTLS" then change "aws_iot_mqtt_mbedtls" as startup project. You can do this by right click on "aws_iot_mqtt_mbedtls" and "set as Startup Project"

vs-startup1

Step3:

Modify the predefined aws_iot_config.h file with the corresponding certification name and AWS data center details.

// =================================================
#define AWS_IOT_MQTT_HOST              "axxxx2fiyuf.iot.us-east-1.amazonaws.com" ///< Customer     specific MQTT HOST. The same will be used for Thing Shadow
#define AWS_IOT_MQTT_PORT              8883 ///< default port for MQTT/S
#define AWS_IOT_MQTT_CLIENT_ID         "Renesas_sks7g2" ///< MQTT client ID should be unique for every device

#define AWS_IOT_MY_THING_NAME          "Renesas_sks7g2" ///< Thing Name of the Shadow this device is associated with
#define AWS_IOT_ROOT_CA_FILENAME       "..\\certs\\ca.perm" ///< Root CA file name
#define AWS_IOT_CERTIFICATE_FILENAME   "..\\certs\\000000cc5-certificate.pem.crt" < device signed certificate file name
#define AWS_IOT_PRIVATE_KEY_FILENAME   "..\\certs\\000000ccc5-private.pem.key" //Device private key filename

Step4:

Build and Run the application. If certificate file names reference mentioned in Step 3 present application will do TLS handshake sequence and then send JSon formated sensor information to AWS IoT using MQTT protocol.

aws-iot-thing-log

Step5:

To update changes to MQTT payload or thing name open awsiot_src\aws_iot_interface\subscribe_publish_sample.c

MQTT topic/thing name is in Line number 152. For example Params.pTopic = "livingroom_airquality";

To construct your own JSON payload for your application then change Line number 174.

Rebuild and Run the the application. Check the changes in AWS IoT Cpnsole Dashboard under "Test". Refer above screen shot.

The example code provided in this demo will connect AWS IoT and publish MQTT Indoor AirQuality sensor value 5 times and loop stops.

Future Work

  • Convert this Project into Raspberry PI Raspian/Windows 10 IoT core.
  • Explore and make the changes to project to support Azure/Google IoT cloud.
  • Port the code to Renesas IoT kits (Threadx RTOS, Synergy Software Platform) such as SKS7G2, S5D9 boards.
  • .....

aws-iot-sdk-for-windows's People

Contributors

raspirepo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.