-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
1/28
1
TABLE OF CONTENTS
1 Introduction .... ............................................... ............................................. ................................... 31.1 Overview of RDK Cloud Connectivity .................................................................. ......................... 31.2 How It Works ............................................................. ......................................... ....................... 31.3 Deploying A Connected Product .............................................. ............................................... ..... 41.4 Quick Start ...................................................................................... .......................................... . 5
2 Interacting with the RDK Online ...................................................................... ............................... 72.1 Verify the RDK has Cloud-Capable Firmware .................................................. ............................. 82.2 Provision the RDK for Cloud Communications.................... ............................................ .............. 82.3 Create a Portals Account .. ................................................ .............................................. .......... 122.4 Add the RDK to Your Portal ............................................................... ........................................ 152.5 Navigate in Your Portal ...... ............................................... ........................................... ............. 162.6 Interact with the RDK................................................. .............................................. ................. 192.7 Re-Enable Provisioning for an RDK ........................................ ............................................... .... 20
3 Customize the RDK Software ...................................................... .......................................... ....... 213.1 Downloading Binary Images to Flash.................. .............................................. ......................... 223.2 Memory Map................................... ................................................ ......................................... 26
4 Cloud Communication APIs ...................................... ................................................ ................... 274.1 HTTP REST API................................ ............................................ ........................................... 274.2 PROVISION API ............................................. ................................................. ........................ 274.3 JSON RPC API ........................................ ............................................... ................................. 27
CLOUD CONNECTIVITY FOR RENESAS RL78 FAMILY RDKS
USERS GUIDE
PREPARED FOR RENESAS ELECTRONICS AMERICA
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
2/28
2
REVISION HISTORYREV EDITOR DESCRIPTION APPROVAL DATE
A DCInitial Version for v1.00 Cloud Demo on
RL78G14DC 11/16/2012
B DACUpdated Version for v1.01 Cloud Demo onRL78G14
DAC 5/3/2013
This f ile contains source code, ideas, techniques, and information (the Information) w hich are Proprietary and Confidential Information ofExosite LLC. This information may not be used by or disclosed to any third party except under w ritten license, and shall be subject to thelimitations prescribed under license.
No w arranties of any nature are extended by this document. Any product and related material disclosed herein are only furnished pursuantand subject to the terms and conditions of a duly executed license or agreement to purchase or lease equipment. The only w arranties madeby Exosite, if any, w ith respect to the products described in this document are set for th in such license or agreement. Exos ite cannot acceptany financial or other responsibility that may be the result of your use of the information in this document or sof tware material, includingdirect, indirect, special or consequential damages.
Exosite may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering the subject matter in thisdocument. Except as expressly provided in any w ritten agreement from Exosite, the furnishing of this document does not give you anylicense to these patents, trademarks, copyrights, or other intellectual property.
The information contained herein is subject to change w ithout notice. Revisions may be issued to advise of such changes and/or additions.
Copyright 2012, Exosite LLC, All Rights Reserved.
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
3/28
3
1 INTRODUCTION
This section covers the following topics:
1.1 Overview of RDK Cloud Connectivity1.2 How it Works1.3 Deploying a Connected Product1.4 Quick Start
The most updated version of this document is available athttp://exosite.com/renesas.
1.1 OVERVIEW OF RDK CLOUD CONNECTIVITY
The RDK has been pre-programmed at the factory with software that includes support for cloudconnectivity. When the RDK is connected to an Internet connection through the Ethernet interface,Cloud Connected is displayed on the LCD panel (displayed only when a pushbutton switch is pressed),
indicating a connection with the cloud has been established.
Cloud connectivity for the RDK is provided by Exosite it gives your RDK a secure website dashboard at
https://renesas.exosite.com(sign up for your account athttps://renesas.exosite.com/signup). This onlinedashboard portal can be used to display data collected from your RDK, to send data to your RDK, and toconnect & manage multiple RDK systems. Software source code for the RDK (Micrium, Renesas and
others) is provided on the RDK DVD and as a download (http://exosite.com/renesas)so that you canextend it for your own connected device application.
Connect Your RDK to the Cloud
1.2 HOW IT WORKS
Cloud connected devices send and receive data over the Internet using a wired or wireless datacommunications interface on the RDK, this includes the Ethernet interface and the WiFi interface (if
WiFi module is available). Cloud-capable firmware is pre-programmed (and available for download &modification) that enables the RDK for cloud connectivity. Cloud connected devices are called Clients.
Although the Internet is used as the medium for Client communication, cloud connectivity requires acloud-based server platform that does things like: server-based authentication, storage, processing,routing of data, and application software functionality. Exosites server technologies provide a redundant
and distributed application framework that does this heavy lifting. It allows the RDK software to simplyuse an authentication key (a Client Interface Key - CIK) and a data port name (an Alias - e.g.
http://exosite.com/renesashttp://exosite.com/renesashttp://exosite.com/renesashttps://renesas.exosite.com/https://renesas.exosite.com/https://renesas.exosite.com/signuphttps://renesas.exosite.com/signuphttps://renesas.exosite.com/signuphttp://exosite.com/renesashttp://exosite.com/renesashttp://exosite.com/renesashttp://exosite.com/renesashttps://renesas.exosite.com/signuphttps://renesas.exosite.com/http://exosite.com/renesas -
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
4/28
4
my_temp) to interact with its own or other cloud -connected data. The server technologies that make thispossible are called the Data Platform (Exosites One Platform).
Real-world connected applicat ions use the Data Platform in different ways, requiring configuration of theData Platform that is beyond the scope of a single Client. This configuration is necessary for featuressuch as ownership hierarchy, data permissions, public/private sharing, processing algorithms, event &
alert conditions, Client provisioning, and data visualization. Data Platform Application Programmi ngInterfaces (APIs) are used to configure these features on the Data Platform. These APIs are calledPlatform APIs.
While automated systems interact with the Data Platform directly via the Platform APIs, human beingsneed a user interface. The online Dashboard user interface located athttps://renesas.exosite.comis
called the Portals Website. Its secure browsing connection allows human users to configure the DataPlatform and to visualize & manage connected RDK systems. Under the hood, the Portals uses thePlatform APIs, and is just one example of a user interface that can be built on top of the Data Platform for
connected applications.
Diagram of Technology Components
1.3 DEPLOYING A CONNECTED PRODUCT
The Renesas RL78 processor family is a 8-/16-bit microcontroller that boasts some of the lowest power
consumption in the industry, while stil l being powerful enough for most applications. The low power RL78processors are perfect for, but not limited to, the automotive and lighting / power control industries.
The RL78G14 comes with Wi-Fi connectivity on-board, using GainSpans low-powered wireless moduleand embedded provisioning software to allow configuration to your wireless network. In addition towireless connectivity, the GainSpan module also allows for TCP/IP/UDP/HTTP/XML connections, and can
act as either a client, or a limited access point to PCs or smart phones.
https://renesas.exosite.com/https://renesas.exosite.com/https://renesas.exosite.com/https://renesas.exosite.com/ -
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
5/28
5
Jumpstart your Connected Product Design
It is easy to create a cloud connected product by using the production-ready reference designs providedby the RDKs hardware and software. All of the building blocks from hardware schematics to cloud-capable firmware to data platform APIs are all provided and functional out of the box. Just as you can
purchase Renesas processors from your local distributor, you can also subscribe to Exosites cloudservices for your go-to-market product design.
If your product design requires cloud connectivity, contact Exosite at [email protected] learn moreabout volume pricing and white box options let us provide the infrastructure you need to quickly launchand scale your connected application.
1.4 QUICK START
The remainder of this document deals with the four general Quick Start steps below.
1) Create an account and login athttps://renesas.exosite.com/
mailto:[email protected]:[email protected]:[email protected]://renesas.exosite.com/https://renesas.exosite.com/https://renesas.exosite.com/mailto:[email protected] -
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
6/28
6
2) Add the RDK to your Portalfollow
the link on your home pagedashboard and choose your devicetype
3) Connect your RDK to the Internet
and apply power - observe data fromyour RDK in the cloud
4) Control your RDKadd a switchwidget to your dashboard and use it
to turn your LEDs on and off
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
7/28
7
2 INTERACTING WITH THE RDK ONLINE
This section covers the following topics:
2.1 Verify the RDK has Cloud-Capable Firmware2.2 Set Up your Wireless Network2.3 Provision the RDK for Cloud Communications
2.4 Create a Portals Account2.5 Link the RDK to your Portal2.6 Navigate in your Portal
2.7 Interact with the RDK2.8 Re-Enable Provisioning for an RDK
In order to interact with your RDK online, you must register for an account with the Renesas Portal athttps://renesas.exosite.com/signup. Once an account is created and your RDK is added to your Portal,
you can configure, manage and interact with your RDK. Graphical dashboards can be created fromwidgets such as line graphs, bar charts, gauges and others to visualize your data. You can also createyour own JavaScript-based widgets using Exosites custom widget engine. Events and Alerts can beconfigured based on configurable conditions that trigger alerts to defined email recipients.
Example Online Dashboard
https://renesas.exosite.com/signuphttps://renesas.exosite.com/signuphttps://renesas.exosite.com/signup -
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
8/28
8
2.1 VERIFY THE RDK HAS CLOUD-CAPABLE FIRMWARE
NOTE: If the RDK is not programmed with the factory-default software (cloud-enabled), it can bedownloaded in source-code and binary form from the resources described athttp://exosite.com/renesas .
The section below entitled Customize the RDK Software has more details on how to customize and loadbinary images into the RDK flash. This User Guide is based on Cloud Demo 1.00 that comes pre-installed on the RL78G14. Go tohttp://exosite.com/renesasand navigate to your device to find the latest
code for the Cloud Demo.
RL78G14
When starting up the RL78G14, a screen like the one shown below will be displayed on the LCD screen.
RL78G14 Startup Screen
By pressing different combinations of SW buttons at the same time and the RESET (RST) button, theboard will reboot into different modes. The switch buttons can be found to the left of the LCD screen, and
the RESET button can be found to the left of the E-ink screen.
http://exosite.com/renesashttp://exosite.com/renesashttp://exosite.com/renesashttp://exosite.com/renesashttp://exosite.com/renesashttp://exosite.com/renesashttp://exosite.com/renesashttp://exosite.com/renesas -
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
9/28
9
SW1, SW2, SW3, and RST Buttons on the RL78G14
The first time the board is plugged in and the application runs, the board will load in GainSpans WebServer interface. The Exosite Cloud Demo can be loaded by holding down the SW1 then pressing theRESET button. When the Cloud Demo first loads, it will attempt to connect to the cloud and send the
GainSpan wireless module MAC address to the cloud for authentication. Make sure that you follow thesteps in 2.2 Set Up your Wireless Network to allow your device to connect to the internet. After youcreate an account and follow the steps below (see the Create a Portals Account and subsequent
sections below), the device will receive a CIK from the cloud as a unique identifier l inking your accountand device together. After the board is provisioned successfully, it will load automatically if the board isreset without actively pressing a switch to load a different demo.
RL78G14 Cloud Demo
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
10/28
10
2.2 SET UP YOUR WIRELESS NETWORK
In order for the RDK to connect the internet, it will need to be set up to interact with your wireless network.Hold down SW2 and press RESET in order to load the GainSpan provision interface. Next, use a
notebook computer or smart phone to the RDK_xxxxxx wireless network. The xxxxxx signifies the last 6digits of your WiFi modules MAC address. After a connection is successful, enter the URL displayed onthe LCD screen (192.168.240.1/prov.html) to bring up the configuration page.
GainSpan Wireless Provision Setting
Select the Wireless and NetworkConfiguration option on the provisioning interface landing page.
GainSpan Provisioning Interface Landing page
Choose the Select an Existing Network option.
Wireless and Network Configuration Page
Choose the network that your WiFi module will use to connect to the internet. Hit Select on the networkyou will use.
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
11/28
11
Select an Existing Network Page
Configure the settings, input your Passphrase, confirm the Passphrase and press Next.
Configure Wireless and Network Settings Page
Once you have configured your wireless settings, the settings will be applied to the wireless module andyou will be shown this confirmation page. You can now close this window.
Wireless Settings Applied Confirmation Page
After the settings are applied to the wireless module, your RDK LCD screen will display a request to resetyour RDK. Hold SW1 and press reset on your RDK to load the Cloud Demo and confirm that wirelesssettings are correct.
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
12/28
12
Wireless Settings Applied to the RDK
2.3 INFORMATION ABOUT PROVISIONING
In order for the RDK to connect to the cloud, it must first be provisioned so that the Exosite serversrecognize it and can authenticate the RDK for communication. Once the RDK has been added to your
online Portal environment (see the Create a Portals Account and subsequent sections below), theprovisioning process is automatic it will happen when the RDK is first powered up AND connected to anetwork with an Internet connection. If all is well, the provisioning process takes less than one second.
The RDK software provisions itself by using the GainSpan modules MAC address as a UniversallyUnique ID (UUID) for the RDK Product Type in order to acquire a Client Interface Key (CIK). Once
provisioned with a CIK, the RDK cannot re-provision unless the MAC address owner (you) re-enablesprovisioning on the Data Platform (see below Re-Enable Provisioning). After the RDK has beenprovisioned, it can communicate with the Data Platform to send and receive data it has permissions for.
IMPORTANT NOTE: In order for your RDK to be automatically provisioned when connected to theInternet, you must first add the RDK to your online Portal environment by entering its MAC address.
See the Create a Portals Account and subsequent sections below for more information. Adding the
RDK to your online Portal environment enables the MAC address in the system for subsequentprovisioning.
IMPORTANT NOTE: If your RDK has been provisioned in the past for a different owner, and you want tore-provision it for yourself, the previous owner must delete the device from their Portal .
IMPORTANT NOTE:If you do not connect your RDK to the cloud successfully within 24 hours of adding itto your online Portals environment, the activation keys will become inact ive. You will have to re-enable
provisioning for your device in your Portal see Re-Enable Provisioning for an RDK below.
For more information about specific cloud status messages, see the section below, and for more
information about cloud status messages and for troubleshooting connection issues, go tohttp://exosite.com/renesas-faq .
RL78G14 CLOUD DEMO VERSION 1.00
http://exosite.com/renesas-faqhttp://exosite.com/renesas-faqhttp://exosite.com/renesas-faq -
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
13/28
13
Connecting Write OK! Read Retry Ledctrl Lost
Connecting- The RDK is attempting to connect to the configured wireless network. If the board gets stuck on
this page, you might need to confirm your wireless network configuration. To configure yourwireless network, follow the steps in 2.2 Set Up your Wireless Network.
Connected Write OK!- The RDK has been successfully provisioned AND has a valid Internet connection.- The Data Platform returned a 204 No Content to the device, signifying the HTTP packet sent
is valid
Read Retry- The device both reads data from the cloud and writes data to it, based off of data sources that are
automatically created when you add the device to your Portal. The RL78G14 reads data from
the led_ctrl data source, but if the data source is missing or has no data, the Read Errormessage is displayed.
Ledctrl lost- The device is not able to read from the led_ctrl data source after 6 attempts. After 6 moreattempts, the device will attempt to re-provision itself.
- If this message is displayed, go to your Data page and add an integer data source with the aliasled_ctrl to the RL78G14 device.
RL78G14 CLOUD DEMO VERSION 1.01
No SSID Connecting Add Device to
Portal
CIK Invalid Read / Write OK
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
14/28
14
No SSID- The RDK is not configured with any wireless network. To configure your wireless network, follow
the steps in 2.2 Set Up your Wireless Network.
Connecting
- The RDK is attempting to connect to the configured wireless network. If the board gets stuck onthis page, you might need to confirm your wireless network configuration. To configure yourwireless network, follow the steps in 2.2 Set Up your Wireless Network.
Add Device to Portal- The RDK can successfully connect to Exosite, but does not have a CIK stored in its memory. To
add a device to your portal, follow the steps in 1.4 Quick Start.
CIK Invalid
- The RDK has a CIK stored that is not valid anymore on Exosites Data Platform. This screen isusually seen between a reactivation attempt or briefly if the device is removed from your portal.
Read OK / Write OK- The RDK has a valid CIK and can send and receive data successfully from the cloud.- If there is just a Read but no OK, then it could mean that the led_ctrldata source has been
modified or deleted.
2.4 CREATE A PORTALS ACCOUNT
A Portals account is necessary to set up the Data Platform for interaction with the RDK. Creating a
Community Portals account is free - go tohttps://renesas.exosite.com/signupand follow the directionson the page.
Renesas Portals Community Plan Signup Page
https://renesas.exosite.com/https://renesas.exosite.com/https://renesas.exosite.com/https://renesas.exosite.com/ -
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
15/28
15
After completing the sign-up form, an activation email will be sent to the email specified in the accountcreation process. Click on the activation link to activate your account and then log in with your usernameand password.
Renesas Portals Log In Page
Immediately upon logging in, you will be redirected to your default dashboard. This default dashboard is
just one of many dashboards in your Portalthe section entit led Navigate in Your Portal covers some ofthis other functionality. The default dashboard was automatically created for you upon sign up andalready shows some information related to using the dashboard and interacting with your RDK. However,
it does not yet show data from your RDK see Add the RDK to Your Portal to link your RDK to yourPortal.
2.5 ADD THE RDK TO YOUR PORTAL
In order to link the RDK to your Portal, you must first use the Add Device wizard so that the Data
Platform knows that you are the RDKs owner. Your default dashboard shows a link to the Add Devic ewizard click the link. It can also be launched by going to the Devices menu item and clicking the linkcalled Add Device. Select device typeYRDKRL78G14 with GainSpan WiFi and follow the directions
on the screen to add your RDK (involves entering the MAC address from the WiFi module).
Add Device Wizard
Once your RDK is successfully linked/added to your Portal, it will appear in the Device list along with any
other devices that your Portal owns. By clicking on a device in the list, device information can be viewedand parameters such as the device name can be changed.
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
16/28
16
Device Information Pop-up
Because you added the YRDKRL78G14 with GainSpan WiFi type of device, the Data Platform
automatically configured a number of resources based on that device type (a generic device type has nopre-configuration associated). If your RDK is powered up and connected to the Internet, you should startto see data from it being received in your Portal. If data is not logged, ensure the RDK is showing the
correct messages per the Provision the RDK for Cloud Communication section.
2.6 NAVIGATE IN YOUR PORTAL
Your Portal has three primary areas the Management area (Home), the Account area (Account) and the
Support area (Support). These areas are always accessible as links in the upper right hand side of yourPortal. You can view and modify details about your online account (e.g. username, password, defaulthome page) in the Account area. The Support area has help information, links and contact detail s forgetting in touch with Exosite and Renesas. The main area you will be interested in, however, is the
Management area this is where you interact with the RDK.
Each page in the Management area is called a Dashboard. Some dashboards have been pre-
configured to manage how the Data Platform treats the data it is sending and receiving to and from yourRDK these dashboards are called:
Home
Data
Device
Event
Dashboards Admin
The Home Dashboard is special any custom Dashboard in your Portal can be set as the HomeDashboard by click ing the Configure button on the dashboard and checking the box Use as Portal
Home Page. Initially, the Home Dashboard has been set to an auto-generated dashboard whose name
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
17/28
17
is your users full name. The blocks on the dashboard (Graph, Getting Started, etc) are called widgetsthese widgets can be moved, edited or removed, and new ones can be added.
Example Home Dashboard
The Data Dashboard lists all sources of data in your Portal. The data sources are grouped by device and
all devices are grouped under your Portal. This is a reflection of the data hierarchy of how your datasources are stored in the Data Platform. The Data Dashboard has a link called Add Data that allowsyou to add more data sources to your Portal. To edit and view a data sources information, simply click on
any of the data sources listed this will open a pop-up called Data Information. The Data Informationpop-up shows information about the data source and also allows you to configure how the data sourcebehaves (e.g. if you want to share the data publicly, you can do that in the pop-up).
Example Data Dashboard
The Device Dashboard was used above to link the RDK to your Portal. The Device Dashboard lists alldevices that your Portal owns. By clicking on a device in the list, the Device Information pop-up is
opened - device information can be viewed and parameters such as the device name can be changed.
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
18/28
18
Example Device Dashboard
The Event Dashboard allows you to setup trigger conditions on the data sources and to assign alert
actions if the trigger condition is activated. Events are used to create the triggers, and Alerts are usedto take an action when the associated event is activated. The Add Event and Add Alert l inks open uprespective wizards where new events and alerts can be created. As in the other dashboards, clicking anitem listed in the dashboard will open a pop-up where information can be viewed and edited for the item.
Example Events & Alerts Dashboard
The Dashboards Dashboard lists custom dashboards configured for your Portal. The Home Dashboard isone such dashboard and will be listed in the dashboard list. To view and edit information about the
dashboard, c lick the Configure button. To go to the dashboard, click on the thumbnail. To add a newdashboard, c lick the link called Add Dashboard. Custom Dashboards are initialized empty you haveto go to the dashboard and click Add Widget to create visual features. As mentioned above, any of your
Custom Dashboards may be set as your home page. Additionally, custom dashboards can be sharedpublicly, allowing you to easily create a public webpage showing information from your RDK.
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
19/28
19
Example Dashboards Dashboard
Finally, the Admin Dashboard allows you to view your Portal resources and to manage Portal-wide items
such as Portal name and Portal Managers. The Portal Resource Summary block shows the resourcesthat are allocated for your Portal these numbers reflect the allocations for the Community Account.Additional resources can be added to your Portal by upgrading your account from the Account area.
Example Admin Dashboard
2.7 INTERACT WITH THE RDK
The demo projects available on the RDK DVD read and write data between the RDK and the DataPlatform. The data that is written to the cloud by the RDK can be displayed, graphed, combined, shared,
published and triggered-on. The data that is read from the cloud by the RDK can be used to controlcertain functions on the RDK, depending on the board and the software it is running.
The YRDKRL78G14 software reads from a cloud data source with the alias name led_ctrl. The softwareuses the value of this data source to turn the LEDs on the RDK on and off. To control the value of thisdata source, click the Add Widget link at the top right side of your dashboard. Select the On/Off Switch
Widget and choose the data source led_ctrl as the controlled Data Source. Your dashboard will nowshow the switch widget - the RDK LEDs can be turned on and off by clicking the switch icon.
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
20/28
20
Switch Widget for LED Control
The default Home Dashboard has an RDK Data Graph widget showing information coming from publicdata sources that were automatically added to your Portal when you signed up. The widget has a drop-down menu with the option Edit click it and select the check box beside Desired Frequency, Ping or
Temperature to add that data source to the data that is being graphed. Now the graph will show datalive from your RDK.
Edit Widget Box
2.8 RE-ENABLE PROVISIONING FOR AN RDK
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
21/28
21
In certain situations, an RDK may need to be re-provisioned. These situations include:
If an RDKs flash memory is erased
If you have not connected your RDK to a live Ethernet connection within 24 hours after adding itto your Portal
In order to re-provision an RDK, the owner must re-enable it for provisioning. The easiest way to do thisis for the owner to use the Re-Provision Device box in the device management pop-up. The device
management popup is opened by clicking on the device in the listing in the Devices dashboard.
Re-Enable Device Control
3 CUSTOMIZE THE RDK SOFTWARE
This section covers the following topics:3.1 Download Binary Images to Flash3.2 Memory Map
Software projects for the RDKs have been created as reference source code so you can re-build andextend the software that comes pre-programmed. The RL78G14 is running a No-OS (main loop)
environment which be compiled using the IAR Embedded Workbench IDE compiler (follow the download
link fromhttp://am.renesas.com/products/tools/introductory_evaluation_tools/renesas_demo_kits/yrdkrl78g14/sub/
downloads_child.jsp. You will need to create a MyRenesas account to download the IAR compiler.
An easier way to restore the original factory demo or to flash your RL78G14 with the latest Cloud Enabled
firmware is to use the Renesas Flash Programmer. You can download the file from
http://am.renesas.com/products/tools/introductory_evaluation_tools/renesas_demo_kits/yrdkrl78g14/sub/downloads_child.jsphttp://am.renesas.com/products/tools/introductory_evaluation_tools/renesas_demo_kits/yrdkrl78g14/sub/downloads_child.jsphttp://am.renesas.com/products/tools/introductory_evaluation_tools/renesas_demo_kits/yrdkrl78g14/sub/downloads_child.jsphttp://am.renesas.com/products/tools/introductory_evaluation_tools/renesas_demo_kits/yrdkrl78g14/sub/downloads_child.jsphttp://am.renesas.com/products/tools/introductory_evaluation_tools/renesas_demo_kits/yrdkrl78g14/sub/downloads_child.jsp -
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
22/28
22
http://am.renesas.com/products/tools/flash_prom_programming/rfp/downloads.jsp . Like the IARdownload, you will need to create a MyRenesas account to download this.
The Cloud Demo software project can be downloaded from Exosite athttp://exosite.com/renesas ,noaccount registration is necessary. Downloads include both source code and a pre-built binary images reference the README file in the download for more information about compiler support, version
information and dependencies.
This section assumes that you have already installed IAR and Renesas Flash Programmer onto your PC
from the RDK DVD or website download (as directed in the project README files).
IMPORTANT NOTE: RL78G14 users must register through IARs program to obtain a valid license in
order to build from source code. Detailed steps for how to set up and build source code is not covered inthis User Guide.
IMPORTANT NOTE: In order to use the Renesas Flash Programmer, your Windows system will need tohave the correct drivers installed, which can only be obtained through installation of the IAR EmbeddedWorkbench IDE compiler.
3.1 DOWNLOADING BINARY IMAGES TO FLASH
Each download package has a pre-compiled binary image in S-record format (.mot file). The easiest wayto program these images to the RDK program flash is to use the Renesas Flash Programmer as stated in
the above section.
RL78G14
To enable communications between the device and the computer, the SW5.2 switch on the board must be
set the OFF positionand the COM cable needs to be connected between your computer and device.
SW5.2 in OFF Position
Open the Renesas Flash Programmer, and create a new workspace to work in. Select the Basic modeunder Create new workspace and hit Next.
http://am.renesas.com/products/tools/flash_prom_programming/rfp/downloads.jsphttp://am.renesas.com/products/tools/flash_prom_programming/rfp/downloads.jsphttp://exosite.com/renesashttp://exosite.com/renesashttp://exosite.com/renesashttp://exosite.com/renesashttp://am.renesas.com/products/tools/flash_prom_programming/rfp/downloads.jsp -
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
23/28
23
Create New Workspace
After the workspace has been created, use the filter to search for R5F104PJ and select the device. Give
your Workspace a name and hit Next.
Create New Workspace Configuration Page
Choose the communication interface you will use for your RL78G14 and hit Next. You will want to choosethe same Tool as was displayed when your driver was installed.
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
24/28
24
Communication Interface Selection
Driver Installation Notification
When the Workspace is created, you will need to select the Browse button to choose the .mot file that
you downloaded from Exosites github page or from Renesas RL78G14 downloads page linked above.
New Workspace Page
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
25/28
25
Choose the .mot file that you downloaded. The default location that will be opened for Windows 7 isC:\Users\your_username\AppData\Local\Renesas Flash Programmer\V2.00.00\your_workspace\your_workspace
Select .mot File to Flash
Once you have selected the .mot file you wish to flash to your RDK, you will need to press the large Start
button to begin the process.
Ready to Flash
After the flash process is complete, your device is ready to connect the cloud! Make sure to follow thesteps in 2.2 Set Up your Wireless Network so your RL78G14 can connect to the internet.
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
26/28
26
Flash Complete
3.2 MEMORY MAP
The cloud-enabled software projects use various amounts of internal processor SRAM and program flash
memory. These memory areas use the default memory map options for the software environment theyuse.
All c loud-enabled software projects share one thing in common they all look at a meta structure storedin block 14 of data flash at address 0x00107000. They also expect a MAC address to be programmed at
the end of block 15 of data flash starting at address 0x00107ff2. If the MAC address is not present indata flash, the networking system will not function correctly. If the meta data structure is not present indata flash, a default meta structure will be created for the RDK. Information such as cloud server IP
address, authentication strings, and OS name are stored in the meta structure.
If your RDKs MAC address is missing from the flash. or if you need to clear a preprogrammed CIK in the
Exosite-meta block, you can use Exosites flash tool (see sect ion 2.7 for details).
-
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
27/28
27
Abb reviated Memory Map Showing Data Flash
4 CLOUD COMMUNICATION APIS
This section covers the following topics:
4.1 HTTP REST API4.2 PROVISION API4.3 JSON RPC API
Exosite provides a variety of Application Programming Interfaces to make it easy for developers toconnect devices and to create connected applications. Because the capabilities & functionality of the
connected client differ based on the use case, Exosite has created different APIs to suit different usecases. Read some high level descriptions below of a few of the APIs that RDK developers may beinterested in. Additional information, and details on other APIs, are always available online at
http://exosite.com/api.
4.1 HTTP REST API
The HTTP REST API is a lightweight API that uses HTTP verbs combined with URLs to interact with the
Data Platform. The RDK projects use HTTP POST and HTTP GET as the primary send and receive APIsfor data transfer.
4.2 PROVISION API
The Provision API allows devices that are not authenticated with the Data Platform to acquireauthentication credentials. The uCOS-III-Ex4 (YRDKRX62N) and uCOS-III-Ex7 (YRDKRX63N)Micrium projects use the Provision API to acquire credentials from the Data Platform based on the RDKs
MAC address. MAC addresses contain only uppercase letters and are non-alphanumeric (do not includecolons). If the MAC address is not valid, is not a registered RDK MAC address, or has been alreadyprovisioned, the Provision API will log and reject the RDK provisioning attempt.
4.3 JSON RPC API
http://exosite.com/apihttp://exosite.com/apihttp://exosite.com/api -
8/12/2019 Cloud Connectivity For Renesas Rl78 Family RDKs
28/28
28
Although the RDK example projects do not use the JSON RPC API, this API represents a full featuredData Platform API. In addition to read/write functionality, the JSON RPC API can add/remove/edit anyresource that the client is authenticated to access. Many developers choose to use this API when
creating additional custom applications that can work with in conjunction (or even replace) their Portalinterface to configure the Data Platform.