Download Print this page

MICRIUM YWireless-RX65N Getting Started Manual

Smart home gateway

Advertisement

Quick Links

Micriµm
YWireless-RX65N Smart Home Gateway - Getting Started Guide
Micriµm
YWireless-RX65N Smart Home Gateway
Getting Started Guide
Introduction
There are countless resources to build an IoT system with. Embedded engineers are faced with
a large variety of protocols, cloud services, platforms, techniques and solutions to choose from.
Because most of these resources seem disjointed, we put together a complete set of resources
required to develop an IoT device and integrated in a larger system.
In order to help you compliment the knowledge you are getting in this guide, we believe that
some hands-on experience will help understanding the concepts at play.
The purpose of this getting started guide is to introduce embedded engineers to the Renesas
YWireless-RX65N Smart Home Gateway application. This application will use the following
resources:
§
The Renesas YWireless-RX65N platform.
§
The IAR Systems Embedded Workbench for RX.
§
The Micriµm µC/Probe run-time graphical live watch tool.
The Amazon Web Services IoT platform.
§
§
Micriµm embedded software.
Objectives
After completing this hands-on session, you will be able to:
§
Build an IAR project for the YWireless-RX65N and program the board.
§
Use Micrium's uC/Probe to interact with the YWireless-RX65N.
§
See your YWireless-RX65N based IoT device send data to and receive data from the
AWS IoT platform.
§
Understand what the AWS IoT platform is and how it's used.
Page 1

Advertisement

loading
Need help?

Need help?

Do you have a question about the YWireless-RX65N and is the answer not in the manual?

Questions and answers

Summary of Contents for MICRIUM YWireless-RX65N

  • Page 1 Build an IAR project for the YWireless-RX65N and program the board. § Use Micrium’s uC/Probe to interact with the YWireless-RX65N. § See your YWireless-RX65N based IoT device send data to and receive data from the AWS IoT platform. § Understand what the AWS IoT platform is and how it’s used.
  • Page 2 Micriµm YWireless-RX65N Smart Home Gateway - Getting Started Guide Setup The setup for this guide requires the following elements: § A laptop/desktop with internet connectivity. § A Renesas YWireless-RX65N board. § A Renesas E1 programmer. § A WiFi router with access to the Internet...
  • Page 3 Micriµm YWireless-RX65N Smart Home Gateway - Getting Started Guide 1. AWS Overview 1-1. Introduction Amazon Web Services (AWS) is a secure cloud services platform, offering computing power, database storage, content delivery and other functionality for developers in an on-demand cloud. It originally launched in 2006 to provide a cloud for web sites and client side applications.
  • Page 4 Micriµm YWireless-RX65N Smart Home Gateway - Getting Started Guide 1-2-1. Security Before we can even begin to discuss the protocol and message type that is sent to AWS IoT, we first need to “get in the front door”. All connections to AWS IoT require a mutually authenticated TLS connection.
  • Page 5 Micriµm YWireless-RX65N Smart Home Gateway - Getting Started Guide 2. IAR Configuration 2-1. Configuring the Smart Home Gateway application in IAR Open the IAR Systems Embedded Workbench for RX (EWRX) by clicking the shortcut the desktop or via searching in the Start Menu or Windows Explorer.
  • Page 6 2-2. Configuring IAR for E1 and uC/Probe In order to program and debug the YWireless-RX65N we need to configure it for the Renesas E1 programmer. Also, since we will be using uC/Probe at the same time as debugging we need to enable the uC/Probe plugin in IAR.
  • Page 7 Micriµm YWireless-RX65N Smart Home Gateway - Getting Started Guide Click on the Debugger category as shown above and change the Driver to E1/E20. Also make sure the Run to: box is selected and set to run to main. Page 7...
  • Page 8 Micriµm YWireless-RX65N Smart Home Gateway - Getting Started Guide Next, remain in the Debugger category and click on the Plugins tab. Scroll to the bottom of the plugins and check the uC/Probe plugin as shown above. Page 8...
  • Page 9 Micriµm YWireless-RX65N Smart Home Gateway - Getting Started Guide 2-3. Compiling the application in IAR Right click on the project again and choose Rebuild All. This will clean the project and build everything from scratch. After the build you should see Linking followed by Total number of errors: 0. If the total number of errors is not zero, scroll up in the build log to determine the error, fix the errors and attempt to build again.
  • Page 10 Before we can we must connect the power to the target and connect the E1 programmer. The YWireless-RX65N is powered by the USB mini port as shown below. You can connect the USB cable to your computer or to any USB power source, the device will not enumerate. Next connect the E1 to the programming port as shown below.
  • Page 11 In IAR click the Download and Debug button on the toolbar or select Project → Download and Debug to flash the application to the YWireless-RX65N. This will cause a window to pop up with the following: While launching the debug session, the debugger will flash the board, verify the programming, load the debug file and verify it.
  • Page 12 Yellow LED Red LED There are three LEDs used on the YWireless-RX65N to indicate the status of the board: Heartbeat LED – This is controlled in its own task. If its not blinking either the debugger has hit a breakpoint or the OS has crashed.
  • Page 13 Micriµm YWireless-RX65N Smart Home Gateway - Getting Started Guide 4. Using the Smart Home Gateway with µC/Probe µC/Probe is a graphical live watch tool that allows for run-time data visualization. µC/Probe takes advantage of the newer processor architectures allowing for reading/writing memory locations while the processor is running.
  • Page 14 Micriµm YWireless-RX65N Smart Home Gateway - Getting Started Guide 4-1. Configuring uC/Probe To download a free trial of uC/Probe use this link: https://www.micrium.com/ucprobe/trial/ Look for the µC/Probe icon on the desktop or in the start-up menu. Click File → Open to open the dashboard example file SmartHomeGateway.wspx located at the following path: └───Micrium...
  • Page 15 Micriµm YWireless-RX65N Smart Home Gateway - Getting Started Guide 4-2. Using the Smart Home Gateway dashboard Once you hit the run button, Probe will load the Smart Home Gateway dashboard as shown above. The left hand side of the dashboard allows you to control the appliance state and the temperature value.
  • Page 16 Ensure the Training/Non-Micrium Account box is not checked. Enter your YWireless-RX65N’s MAC address for the Thing ID field. You can find the Thing ID on the Probe Workspace as shown below. Do not put colons or dashes between the octets.
  • Page 17 If the heartbeat is blinking but the yellow LED remains lit, check your WiFi settings. Once the web page receives data from the YWireless-RX65N it will populate the screen with the appliances and temperature sensors as shown in the pictures below.
  • Page 18 Micriµm YWireless-RX65N Smart Home Gateway - Getting Started Guide Any local action done using µC/Probe will be reflected remotely on the webpage and any remote action done on the webpage will be reflected locally and displayed using µC/Probe. At this stage, we see that the communications between the IoT device, AWS IoT and the webpage are bidirectional.
  • Page 19 Micriµm YWireless-RX65N Smart Home Gateway - Getting Started Guide 6. MQTT in the Smart Home Gateway 6-1. MQTT Topics and Messages The MQTT protocol is based on the principle of publishing messages and subscribing to topics. A device publishes its data as a message with an associated topic. Subscribing applications need to know which device originally published each received message.
  • Page 20 The message format for controlling an appliance remotely is: {“appliance” : {“state” : “0/1”}} When the YWireless-RX65N receives a message on the command topic, it will change the appliance’s state which then forces the YWireless-RX65N to immediately publish that appliance’s new state.
  • Page 21 We hope you found this getting started guide useful. You can find additional information on AWS IoT at: https://aws.amazon.com/documentation/iot/ For more information on the Micrium software used or how to use this software with your own AWS account, contact Micrium using the form found here: https://www.micrium.com/spectrum/...