Renesas SIMPLE DEMO Quick Start Manual
Renesas SIMPLE DEMO Quick Start Manual

Renesas SIMPLE DEMO Quick Start Manual

Wi-fi mqtt client

Advertisement

Quick Links

Wi-Fi MQTT Client Simple Demo
Quick Start Guide of MQTT Client Simple Demo
Introduction
This quick start guide describes the setup and use of MQTT client running on DA16200 Wi-Fi module. This guide
mainly focuses on describing how to make Wi-Fi module as MQTT client by AT command for connecting MQTT
broker, and how to publish a message to MQTT server. Meanwhile, a simplest button pressed operation will be
recorded by MQTT server through publishing a message by MQTT client.
Through this guide and related demo, you can easily start your development on DA16200, a Wi-Fi module, using AT
command and EK-RA6M4, an evaluation kit for RA6M4 MCU group.
Target Device
EK-RA6M4 (R7FA6M4AF3CFB)
DA16200 PMOD
Contents
1.
Kit Contents .................................................................................................................... 2
1.1
Hardware components ............................................................................................................... 2
1.2
Software components ................................................................................................................. 2
2.
Features .......................................................................................................................... 3
3.
Set Up the Demo ............................................................................................................. 3
3.1
Prerequisite.................................................................................................................................. 3
3.2
Connect the solution kit ............................................................................................................. 7
3.3
Debug and download code to EK-RA6M4 ................................................................................ 7
3.4
Run the solution ........................................................................................................................ 10
4.
Reference Documents .................................................................................................. 13
Rev.1.00
Mar, 2022
SIMPLE DEMO
Rev.1.00
Mar, 2022
Page 1 of 13

Advertisement

Table of Contents
loading

Summary of Contents for Renesas SIMPLE DEMO

  • Page 1: Table Of Contents

    Wi-Fi MQTT Client Simple Demo Rev.1.00 Mar, 2022 Quick Start Guide of MQTT Client Simple Demo Introduction This quick start guide describes the setup and use of MQTT client running on DA16200 Wi-Fi module. This guide mainly focuses on describing how to make Wi-Fi module as MQTT client by AT command for connecting MQTT broker, and how to publish a message to MQTT server.
  • Page 2: Kit Contents

    DA16200 Wi-Fi MQTT Client Simple Demo Kit Contents To set up this demo, the following components are needed. Hardware components • EK-RA6M4 • DA16200 PMOD (US159-DA16200MEVZ) • Micro USB cable • A UART-USB bridge cable (if possible and optional for AT command observation)
  • Page 3: Features

    Open Windows Settings, click Network & Internet, go to WLAN. Set it to ON, click “show available networks” and select “Renesas Test Router” as an example. Here a password of “12345678” is assigned to this router. Step 2. Confirm the IP address of PC which is distributed by Wi-Fi Router.
  • Page 4 PowerShell window here” from the pop-up menu. Input “./mosquitto_passwd -c pwfile.example admin”. This command is to add an account named admin. Input password twice to confirm this setting, then the count is created successfully. Here use “Renesas” as the password. Rev.1.00...
  • Page 5 DA16200 Wi-Fi MQTT Client Simple Demo File of “pwfile.example” can be opened for confirming this setting. Close this PowerShell window means the setting has been finished. Reopen a PowerShell window following the previous step, input command “.\mosquitto -c .\mosquitto.conf -v” to run this tool using mosquitto.conf as a configuration file, while enabling detailed log mode.
  • Page 6 DA16200 Wi-Fi MQTT Client Simple Demo After click “Connect” button, Mosquitto receives connecting command and displays that a new connection from smartphone has been established. Click “Subscribe” tab, input “button” in topic blank, which is designed by sample code, click “subscribe” to subscribe to message based on this topic.
  • Page 7: Connect The Solution Kit

    Debug and download code to EK-RA6M4 The EK-RA6M4 features a SEGGER J-Link On-Board debugger, using Renesas S124 Debug MCU and SEGGER J- Link® firmware to provide the on-board debug functionality, so all the customer needs for debugging is a Micro USB cable.
  • Page 8 DA16200 Wi-Fi MQTT Client Simple Demo Compile the project to get the object file which can be downloaded to the chip. Then use debug function to test the sample code. Note: about how to use e2studio and import the project, you can refer to “5. Customizing the Quick Start Example Project”...
  • Page 9 DA16200 Wi-Fi MQTT Client Simple Demo Unzip “Download_Tool.zip” file, replace the file of the same name under JLink folder with this file. Back to Download_Tool folder and click “bmp.bat” file to program MCU. This folder combines the version of J-Link v7.52a in JLink folder, involving all files at software installation and realizing all J-Link operations.
  • Page 10: Run The Solution

    DA16200 Wi-Fi MQTT Client Simple Demo After programming, J-Link operation interface will exit automatically. (Note: If you want the latest SEGGER J-Link version, please download from link below: https://www.segger.com/downloads/jlink) Run the solution Step 1. Restart the system by pressing RESET button (S3) on EK-RA6M4 or powering off and on the system, causing the program to run again.
  • Page 11 DA16200 Wi-Fi MQTT Client Simple Demo J-Link RTT Viewer serves as a tool to monitor the state of the system, especially the current stage of Wi-Fi and MQTT operation. After MQTT connection finished, Green Led on EK-RA6M4 lights. Press S1 on EK-RA6M4 publishes a message of “button is pressed” with topic of button to MQTT Server, any subscribers subscribing this topic will receive this information, smartphones are no exception.
  • Page 12 DA16200 Wi-Fi MQTT Client Simple Demo The subscribed message from MQTT Server displays on MQTTool on smartphone. Meanwhile, the Blue Led on EK-RA6M4 turns on and off by turns when button is pressed. If you want to observe AT Command, use a UART to USB bridge and connect RXD of UART part to P410 pin on EK- RA6M4 board, open serial tool such as Tera Term, and set the baud rate to 115200.
  • Page 13: Reference Documents

    DA16200 Wi-Fi MQTT Client Simple Demo Reference Documents Renesas RA6M4 MCU RA6M4 - 200MHz Arm® Cortex®-M33 TrustZone®, High Integration with Ethernet and OctaSPI | Renesas EK-RA6M4 EK-RA6M4 - Evaluation Kit for RA6M4 MCU Group | Renesas DA16200 DA16200 | Dialog (dialog-semiconductor.com) DA16200MOD DA16200 Modules | Dialog (dialog-semiconductor.com)
  • Page 14 Revision History Description Rev. Date Page Summary — 1.00 Feb. 22, 2022 First edition issued...
  • Page 15 Unit Products The following usage notes are applicable to all Micro processing unit and Microcontroller unit products from Renesas. For detailed usage notes on the products covered by this document, refer to the relevant sections of the document as well as any technical updates that have been issued for the products.
  • Page 16 Renesas Electronics disclaims any and all liability for any damages or losses incurred by you or any third parties arising from the use of any Renesas Electronics product that is inconsistent with any Renesas Electronics data sheet, user’s manual or other Renesas Electronics document.
  • Page 17 Renesas' products are provided only subject to Renesas' Terms and Conditions of Sale or other applicable terms agreed to in writing. No use of any Renesas resources expands or otherwise alters any applicable warranties or warranty disclaimers for these products.

Table of Contents