Renesas DA16200 User Manual
Hide thumbs Also See for DA16200:
Table of Contents

Advertisement

Quick Links

User Manual
DA16200 DA16600 Getting
Started with AWS® IoT Using AT-
Command
UM-WI-038

Abstract

This document introduces the AT-Command interface for AWS® IoT through a demonstration of the
AWS® IoT reference design and the AWS® IoT Android/iOS mobile applications.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DA16200 and is the answer not in the manual?

Questions and answers

Summary of Contents for Renesas DA16200

  • Page 1: Abstract

    User Manual DA16200 DA16600 Getting Started with AWS® IoT Using AT- Command UM-WI-038 Abstract This document introduces the AT-Command interface for AWS® IoT through a demonstration of the AWS® IoT reference design and the AWS® IoT Android/iOS mobile applications.
  • Page 2: Table Of Contents

    Software Configuration ....................... 12 The DA16200 (DA16600)....................12 7.1.1 How to Connect with Tera Term ................12 7.1.2 How to Download a Firmware Image to the DA16200 (DA16600) ...... 13 7.1.3 Thing Name for Testing ..................15 7.1.4 Stand-Alone Mode ....................16 MCU Setting ........................
  • Page 3: Figures

    Table 4: GPIO Pin Configuration ......................10 Table 5: Configuration of the Topics ....................32 Table 6: The Basic Set of MCU to DA16200 (DA16600) ..............32 Table 7: TLS from MCU to DA16200 (DA16600) ................33 Table 8: PIN MUX from MCU to DA16200 (DA16600) ............... 34 Table 9: Configuration Data from MCU to DA16200 (DA16600) ............
  • Page 4: Abstract

    IoT applications and solutions. This guide introduces the DA16200 (DA16600) AT-Commands for AWS-IoT and describes how to use the DA16200 (DA16600) EVB and EK- RA6M4 board to set up a hardware development environment, install the necessary software, and download and run an example application.
  • Page 5: What Is At-Command For Aws-Iot

    DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command What is AT-Command for AWS-IoT AT-Command for AWS-IoT is a solution developed for the DA16200 (DA16600) Wi-Fi device and modules that provides connectivity between a MCU and a Mobile phone through an AWS-IoT server using AT-Command interfaces.
  • Page 6: Hardware Configuration

    GPIO from the MCU to the DA16200 (DA16600) to wake up the DA16200 (DA16600) from DPM mode. GPIO from the DA16200 (DA16600) to the MCU to wake up the MCU if it is in sleep mode. Figure 2: Hardware Configuration...
  • Page 7: How To Configure Hardware

    The DA16200 EVK uses GPIOA_4 for UART1 TX and GPIOA_5 for UART1 RX by default. The DA16600 EVK uses GPIOC_6 for UART2 TX and GPIOC_7 for UART2 RX by default. The RX, TX and GND signals of the External Host and the DA16200 (DA16600) must be connected as shown in...
  • Page 8: Figure 3: Default Uart Hw Connection

    UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Figure 3: Default UART HW Connection 6.1.1.2 User UART Pin Connection Sample for the DA16200 EVK If needed, AT-CMD can be used to change the pin connection to UART1 in accordance with the Pin...
  • Page 9: Da16200 (Da16600) Wake Up Connection

    (DA16600) before sending or receiving data. The External Host can trigger a wakeup event by connecting a GPIO pin to the RTC_WAKE_UP2 pin of DA16200 (DA16600) EVK. A wakeup event is triggered when the GPIO pin transitions from Low to High and then back to Low.
  • Page 10: Figure 6: Hw Connection Of Default Wake Up Pin

    6.1.3.2 External Host Wake Up Pin Configuration Example for DA16200 EVK On the DA16200 EVK, GPIOA_0~ GPIOA_11 and GPIOC_6 ~ GPIOC_8 can be used as an External Host wake up pin. To avoid duplication, assign the External Host wake up pin to an available GPIO pin.
  • Page 11 UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Port PIN Mux GPIO GPIOA_7 PIN_EMUX GPIOA_8 GPIOA_9 PIN_FMUX GPIOA_10 GPIOA_11 GPIO_UNIT_C PIN_UMUX GPIOC_6 GPIOC_7 GPIOC_8 User Manual Revision 1.3 23-Mar-2023 CFR0012 11 of 40 © 2023 Renesas Electronics...
  • Page 12: Software Configuration

    DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Software Configuration The DA16200 (DA16600) A serial communication tool such as Tera Term is required to connect the laptop/PC to the DA16200 (DA16600) to download the firmware images and monitor the debug logs. Tera Term link is https://ttssh2.osdn.jp/...
  • Page 13: How To Download A Firmware Image To The Da16200 (Da16600)

    UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command 3. After connecting to the DA16200 with Tera Term, check for the command prompt as shown below ****************************************************** DA16200 SDK Information * --------------------------------------------------- * - CPU Type : Cortex-M4 (120MHz) * - OS Type : FreeRTOS 10.4.3...
  • Page 14: Figure 11: Reset Button

    PW = 1234567890 PW = 1234567890 completed apps_reboot_ap_mode IPADDR_CUSTOMER..apps_reboot_ap_mode customer_dhcpd_flag == DHCPD_CUSTOMER..The DA16200 (DA16600) is now ready to enter the AWS-IoT Configuration Settings. User Manual Revision 1.3 23-Mar-2023 CFR0012 14 of 40 © 2023 Renesas Electronics...
  • Page 15: Thing Name For Testing

    The required Thing name can be requested from a Field Application Engineering (FAE). For more information to create and set up an AWS IoT own server, see the DA16200 AWS IoT Server Setup [1]. Set the Thing name in the MCU source code or set it in the provided scripts.
  • Page 16: Stand-Alone Mode

    UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command For MCU source code can be found in the following file: \MCU\RA6M4\Src\atcmd\at_cmd.c. #define MAX_RETRY_SEND_COUNT /* AWS features, configurations, and certification keys */ const char* cmd_set_cfg[MAX_CFG_NUM] = #if (AWS_USE_FLEET_PROV == 1) "\r\nAT+"PLATFORM"...
  • Page 17: Figure 12: E2Studio Project File

    UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Figure 12: e2studio Project File 2. Use the Thing name received from the FAE to test without setting up a server. 3. Change the Thing name to the received name (see Figure 13).
  • Page 18: Figure 14: Build Project

    UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Figure 14: Build Project Note 3 When connecting to the RA6M4 MCU for the first time or changing the configuration, follow the step 5 to set up the FSP Configuration.
  • Page 19 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command 6. When clicking the Debug icon on the Tool bar, the MCU image will be downloaded to the device. 7. The following shows the console output of the DA16200 (DA16600) after a factory mode reset. Soft-AP is Ready (d4:3d:39:10:d5:07) >>>...
  • Page 20 UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command 9. The following shows the console output of the DA16200 (DA16600) after the SoftAP has been configured and it is waiting to be provisioned by the mobile application. Soft-AP is Ready (d4:3d:39:10:d5:07) >>>...
  • Page 21: Mobile App

    DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Mobile App Overview To install the mobile application, search for DA16200 or DA16600 on the Google Pay Store or Apple App Store. Wi-Fi interface provisioning can be done either using SoftAP mode (DA16200) or Bluetooth Low Energy mode (DA16600).
  • Page 22: Open Door

    UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Open Door The block diagram of Open Door is shown in Figure Figure 16: Block Diagram of Opening a Door The results of Open Door executed in Android App can be found in AWS IoT shadow server. See...
  • Page 23: Figure 18: Shadow State When Door Opened

    UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Figure 18: Shadow State When Door Opened User Manual Revision 1.3 23-Mar-2023 CFR0012 23 of 40 © 2023 Renesas Electronics...
  • Page 24: Close Door

    "doorStat": "opened" – "temperature": 28 – "battery": 63 ○ The console log of the DA16200 after the open door operation has been completed is as below. Count : 0, cmdNum = 4 mqtttype = 1 index(=3) matched data type(shadow) = 0...
  • Page 25: Figure 19: Block Diagram Of Closing A Door

    UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Figure 19: Block Diagram of Closing a Door The results of Close Door executed in Android App can be found in AWS IoT shadow server. See Figure Figure 20: Close Door in the App...
  • Page 26: Figure 21: Shadow State When Door Is Closed

    "doorStat": "closed" – "temperature": 41 – "battery": 76 ○ The console log of the DA16200 after the close door operation has been completed is as below. Count : 0, cmdNum = 4 mqtttype = 1 index(=3) matched data type(shadow) = 0...
  • Page 27: Ota Update Of Mcu Firmware

    AWS server to update the MCU firmware through the DA16200. Note, the DA16200 detects whether the firmware image is for the MCU or for the DA16200 (DA16600) based on the prefix of the firmware image name. If the firmware image is for the MCU, then the firmware image name must be prefixed with “mcu”, for example,...
  • Page 28: Figure 23: Android Application

    UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Figure 23: Android Application The following pictograms explain various UI items: Name of Thing Connection status with AWS server Connection status with device MQTT publish/subscribe Reported item of AWS IoT Shadow Topic &...
  • Page 29 UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Request update shadow button OTA update button Door control button Door status Window control button Window status User Manual Revision 1.3 23-Mar-2023 CFR0012 29 of 40 © 2023 Renesas Electronics...
  • Page 30: Appendix A List Of At-Commands For Aws Iot

    A.1.1 Setting Mode After uploading the image and rebooting, the DA16200 (DA16600) enters the setting mode. In this mode, all AWS IoT settings can be configured using the SET command and a specific topic can be configured using the CFG command. For proper operation of AWS IoT, the TLS certificate keys must be set.
  • Page 31: Communication Mode

    DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Figure 25: Provisioning Mode A.1.3 Communication Mode The DA16200 (DA16600) Communication Mode is used by the MCU to communicate (send and receive) topic values with an AWS server (See Figure 26).
  • Page 32: At-Cmd List

    1: String 1: shadow Figure 27: Communication between MCU and Phone AT-CMD List A.3.1 Basic Set Table 6: The Basic Set of MCU to DA16200 (DA16600) Head Main Parameters Set the device thing name. APP_THINGNAME Used to choose a device by its thing name during provisioning...
  • Page 33: Tls

    Head Main Parameters Set sleep mode 1 – not connected sleep. DA16200 (DA16600) will wake up only by RTC_PWR_KEY. SLEEP_MODE 2 – not connected sleep. DA16200 (DA16600) will wake up by RTC. 3 - connected sleep. The connection is retained even during DPM.
  • Page 34: Pin Mux

    UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Start Code Sub Code Type End Code EX) send "\x1b“ over UART send "C0,-----BEGIN CERTIFICATE-----\n“ "MIIDQTCCAimgAwIBAgITBmyfz5m/jAo ….. over UART send “\x03” A.3.3 PIN MUX Table 8: PIN MUX from MCU to DA16200 (DA16600)
  • Page 35: Configuring Data As Topics

    The previous values in NVRAM will be kept. AT+AWS= Gets the current Azure IoT status. GET_STATUS The MCU can read the current status from the DA16200 (DA16600) at any time. RESTART Reboots the device keeping the current mode and status User Manual Revision 1.3...
  • Page 36: Command - Da16200 (Da16600) To Mcu

    UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Head Main Description Used by the MCU to set a CFG parameter in the DA16200 (DA16600).The value must be the same format as defined by the CFG setting. MCU_DATA Parameters:...
  • Page 37 UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Status Value Parameters It needs to go to AP mode by MCU send” RESET_TO_AP” command Start STA Not defined yet Done STA Sent when entering sleep mode for DPM MCUOTA...
  • Page 38: Revision History

    UM-WI-038 DA16200 DA16600 Getting Started with AWS® IoT Using AT-Command Revision History Revision Date Description ● Added Fleet Provisioning 23-Mar-2023 ● Added MCU OTA ● Support AWS IoT SDK v3.2.6.0 or later ● Changed DA16x00 to DA16200 (DA16600) ● Changed MCU from STM32 to RA6M4...
  • Page 39 RoHS Compliance Renesas Electronics’ suppliers certify that its products are in compliance with the requirements of Directive 2011/65/EU of the European Parliament on the restriction of the use of certain hazardous substances in electrical and electronic equipment. RoHS certificates from our suppliers are available on request.
  • Page 40 Renesas disclaims responsibility for, and you will fully indemnify Renesas and its representatives against, any claims, damages, costs, losses, or liabilities arising out of your use of these resources. Renesas' products are provided only subject to Renesas' Terms and Conditions of Sale or other applicable terms agreed to in writing.

This manual is also suitable for:

Da16600

Table of Contents