Synergy MQTT/TLS Google Cloud Connectivity Solution

Synergy MQTT/TLS Google Cloud Connectivity Solution

Application Note Renesas Synergy™ Platform Synergy MQTT/TLS Google Cloud Connectivity Solution Introduction This application note describes the IoT Cloud connectivity solution in general and introduces you briefly to the IoT Cloud provider, Google Cloud. It covers the Synergy MQTT/TLS module, its features, and operational flow sequence (Initialization/Data flow). The application example provided in the package uses Google Cloud IoT Core. The detailed steps in this document show first-time Google Cloud IoT Core users how to configure the Google Cloud IoT Core platform to run this application example demonstration. This application note enables you to effectively use the Synergy MQTT/TLS modules in your own design. Upon completion of this guide, you will be able to add the MQTT/TLS module to your own design, configure it correctly for the target application, and write code using the included application example code as a reference and efficient starting point. References to more detailed API descriptions, and other application projects that demonstrate more advanced uses of the module, are in the Synergy Software Package (SSP) User’s Manual (see Next Steps section) and serve as valuable resources in creating more complex designs. Currently, the Synergy MQTT/TLS Connectivity solution is implemented and tested using Google Cloud IoT Core on AE-CLOUD1 and AE-CLOUD2 kit. Support for other Synergy kits and IoT Cloud providers will be provided in upcoming releases. Required Resources To build and run the MQTT/TLS application example, you need: Development tools and software • e2 studio ISDE v7.3.0 or later or IAR Embedded Workbench® for Renesas Synergy™ v8.23.3 or later, available at www.renesas.com/synergy/e2studio • Synergy Software Package (SSP) 1.6.2 or later (www.renesas.com/synergy/ssp) • Synergy Standalone Configurator (SSC) 7.3.0 or later (www.renesas.com/synergy/ssc) • SEGGER J-link® USB driver (www.renesas.com/synergy/jlinksynergy) Hardware • Renesas Synergy™ AE-CLOUD1 kit (www.renesas.com/synergy/ae-cloud1), which includes a Wi-Fi board and, AE-CLOUD2 kit (www.renesas.com/synergy/ae-cloud2), which includes a Pillar board, Wi-Fi board, BG96 Cellular shield. Note: A CAT-M1, NB-IoT, or EGPRS SIM card should be procured separately for cellular functionality. • Renesas Synergy™ Application Example kit PMOD based Wi-Fi Module (www.renesas.com/synergy/kits/ae-wifi1). • PC running Windows® 7 or 10; the Tera Term console, or similar application, and an installed web browser (Google Chrome, Internet Explorer, Microsoft Edge, Mozilla Firefox, or Safari). • Micro USB cables • Ethernet cable Prerequisites and Intended Audience This application note assumes that you have some experience with the Renesas e2 studio ISDE and Synergy Software Package (SSP). Before you perform the procedures in this application note, follow the procedure in the SSP User Manual to build and run the Blinky project. Doing so enables you to become familiar with e2 studio and SSP and validates that the debug connection to your board functions properly. In addition, this application note assumes that you have some knowledge of MQTT/TLS and its communication protocols. The intended audience is users who want to develop applications with MQTT/TLS modules using Renesas Synergy™ S5 or S7 MCU Series. R11AN0335EU0105 Rev.1.05 Page 1 of 41 Nov.01.19 Renesas Synergy™ Platform Synergy MQTT/TLS Google Cloud Connectivity Solution Contents 1. Introduction to Cloud Connectivity ........................................................................................... 4 1.1 Overview .................................................................................................................................................. 4 1.2 Major Components .................................................................................................................................. 4 1.3 Cloud Provider Overview ......................................................................................................................... 5 1.3.1 Google Cloud IoT Core Overview ......................................................................................................... 5 1.4 MQTT Protocol Overview ........................................................................................................................ 7 1.5 TLS Protocol Overview ............................................................................................................................ 8 1.5.1 Device Certificates and Keys ................................................................................................................ 8 1.5.2 Device Security Recommendations ...................................................................................................... 9 2. Synergy MQTT/TLS Cloud Solution ......................................................................................... 9 2.1 MQTT Client Overview ............................................................................................................................ 9 2.2 Design Considerations .......................................................................................................................... 10 2.2.1 Supported Features ............................................................................................................................. 10 2.2.2 Operational Flow Sequence ................................................................................................................ 10 2.3 TLS Session Overview .......................................................................................................................... 11 2.3.1 Design Considerations ........................................................................................................................ 11 2.3.2 Supported Features ............................................................................................................................. 11 2.3.3 Operational Flow Sequence ................................................................................................................ 12 3. MQTT/TLS Application Example ............................................................................................ 14 3.1 Application Overview ............................................................................................................................. 14 3.2 Software Architecture Overview ............................................................................................................ 15 3.2.1 Console Thread ................................................................................................................................... 16 3.2.2 MQTT Thread ...................................................................................................................................... 16 3.2.3 MQTT Rx Thread................................................................................................................................. 16 3.3 IoT Cloud Configuration (GCloud) ......................................................................................................... 16 3.3.1 Creating a Device on Google Cloud IoT Core ..................................................................................... 17 3.3.2 Generate Device Key and Certificate .................................................................................................. 20 3.3.3 Add Public Key to the Google Cloud IoT Core .................................................................................... 21 4. Running the MQTT/TLS Application ...................................................................................... 22 4.1 Importing, Building, and Loading the Project ........................................................................................ 22 4.2 Manually Adding the Board Support Package for AE-CLOUD1/AE-CLOUD2 Kit ................................ 22 4.3 Powering up the Board .......................................................................................................................... 22 4.4 Connect to Google IoT Cloud ................................................................................................................ 23 4.4.1 Configuration Wizard Menu ................................................................................................................. 24 4.4.2 Dump the Previous Configuration ....................................................................................................... 33 4.4.3 Demo Start/Stop Command ................................................................................................................ 34 4.5 Verifying the Demo ................................................................................................................................ 35 4.5.1 Running the Synergy Cloud Connectivity Demonstration ................................................................... 35 R11AN0335EU0105 Rev.1.05 Page 2 of 41 Nov.01.19 Renesas Synergy™ Platform Synergy MQTT/TLS Google Cloud Connectivity Solution 4.5.2 Monitoring MQTT Messages on Google Cloud Platform .................................................................... 35 4.5.3 Publishing the MQTT Message from Google Cloud Platform ............................................................. 37 4.5.4 Stopping the Synergy Cloud Connectivity Demonstration .................................................................. 38 4.6 Customizing the Demo Delays .............................................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    42 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us