MICRIUM YWireless-RX65N Manuel utilisateur

!
!
!
Page 1
!
!
!
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 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
oThe router can be secured with an SSID and a password but could not contain
other authentication like an additional web authentication as often found in hotels
or public places.
Laptop/desktop prerequisite
Software tools required on the computer:
§IAR Embedded Workbench for RX (EWRX) compiler and debugger.
§Micriµm µC/Probe, a data visualization tool for embedded target variables.
§Google Chrome for access to the webpages displaying the data generated and required
by the embedded target.

!
!
!
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.
Since then it has grown to over 50 different services and an estimated third of the Internet is
hosted on, or interacts with, AWS in some fashion.
The main focus of this guide is AWS IoT, the IoT platform launched in October 2015. More
details on AWS IoT are provided in the next section.
1-2. AWS IoT
This graphic shows the architecture of AWS IoT and how data flows through it. To fully
understand how messages are passed into AWS IoT, we need to break it into two parts:
security and protocol. Beyond how messages are passed into AWS IoT will be covered in later
sections of this guide.

!
!
!
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. This is different than a normal TLS/SSL connection you
would have on a web page where you see an icon similar to this
A normal web page SSL connection is one-way where the server you’re connecting to
presents you with a certificate that has been signed by a Certificate Authority. Your
browser has a list of acceptable Certificate Authorities and checks the certificate
presented by the server against this list. If it matches the browser decides this is a
trustworthy connection and accepts the certificate.
A mutually authenticated TLS connection takes the above a step further. In our
connection with AWS IoT, we will be presented with a certificate from AWS so we can
decide if we want to trust AWS similar to your browser received a certificate from a
server. But our IoT device also has to present AWS IoT with a certificate so AWS IoT can
decide if they want to trust this device. The certificate is also used as a sort of
username/password for access control.
1-2-2. Protocol
AWS IoT messages are sent primarily via the message protocol Message Queue
Telemetry Transport (MQTT). This guide will not get into the details on the MQTT
protocol, but more information on the protocol can be found at http://www.mqtt.org.
The MQTT protocol sits right above TCP, is extremely lightweight and is ideal for small
embedded devices.
While it will not be covered in this guide, data can also be sent to AWS IoT via
Websockets and HTTP. Both of those protocols are much heavier than MQTT and not
practical for an embedded device.
At this point we have enough background information to get started.

!
!
!
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 on
the desktop or via searching in the Start Menu or Windows Explorer.
Once EWRX is running, click File →Open →Workspace…and browse to the workspace file
OS3-TCPIP-WIFI.eww located at the following path:
└───Micrium
└───Examples
└───Renesas
└───YWIRELESS-RX65N
└───OS3-TCPIP-WIFI
└───IAR
The workspace will open in a window similar to the one shown in the image below:

!
!
!
Page 6
!
!
!
Micriµm
YWireless-RX65N Smart Home Gateway - Getting Started Guide
First we need to configure the WiFi parameters. Open the file app_cfg.h found under the APP
directory in IAR. Around line 132 you will find the WiFi configuration. Ensure the configuration is
as follows:
APP_CFG_WIFI_NET_SSID: Your WiFi SSID
APP_CFG_WIFI_NET_PSK: Your WiFi Password
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.
Right click on the project as shown above and select Options.

!
!
!
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 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 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
!
!
!
Micriµm
YWireless-RX65N Smart Home Gateway - Getting Started Guide
2-4. Powering and connecting the YWireless-RX65N
At this point we are just about ready to program the YWireless-RX65N with our application.
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.
USB Mini Port
E1 Connector
Manuels Porte populaires d'autres marques

LST
LST M500RFE-AS Manuel utilisateur

Kinnex
Kinnex Media Gateway Manuel utilisateur

2N Telekomunikace
2N Telekomunikace 2N StarGate Manuel utilisateur

Mitsubishi Heavy Industries
Mitsubishi Heavy Industries Superlink SC-WBGW256 Manuel utilisateur

ZyXEL Communications
ZyXEL Communications ZYWALL2 ET 2WE Manuel utilisateur

Telsey
Telsey CPVA 500 - SIP Manuel utilisateur











