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

Advertisement

Quick Links

User Manual
DA16200 DA16600 Getting
Started with AT-Command for
Azure® IoT
UM-WI-060

Abstract

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

Advertisement

Table of Contents
loading

Summary of Contents for Renesas DA16200

  • Page 1: Abstract

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

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT Contents Abstract............................. 1 Contents............................ 2 Figures ............................3 Tables............................3 Abstract ..........................4 Terms and Definitions ......................4 References .......................... 4 What is AT-Command for Azure-IoT ..................5 Release Package ......................... 6 Demonstration Hardware Description .................
  • Page 3: Figures

    Table 6: TLS Certif icate f rom MCU to DA16200/DA16600............. 34 Table 7: PIN MUX f rom MCU to DA16200/DA16600 ..............35 Table 8: Conf iguration Data f rom MCU to DA16200/DA16600 ............36 Table 9: Command f rom MCU to DA16200/DA16600 ..............36 Table 10: Command f rom DA16200/DA16600 to MCU ..............
  • Page 4: Abstract

    IoT applications and solutions. This guide introduces the DA16200/DA16600 AT- Command f or Azure-IoT and describes how to use the DA16200/DA16600 EVB and EK-RA6M4 board to set up a hardware development environment, install the necessary sof tware, and download and run an example application.
  • Page 5: What Is At-Command For Azure-Iot

    DA16200 DA16600 Getting Started with AT -Command for Azure® IoT What is AT-Command for Azure-IoT The AT-Command interf ace f or Azure-IoT is a solution developed f or the DA16200/DA16600 Wi-Fi device and modules that provides connectivity between an MCU and a Mobile phone through an Azure-IoT server using the AT-Command interf ace.
  • Page 6: Release Package

    ○ \DA16200 or \DA16600 – Firmware images f or the DA16200/DA16600 Wi-Fi devices – Tera Term script f or downloading the f irmware images to a DA16200/DA16600 Wi-Fi device ○ \DA16200\script (\DA16600\script) – Tera Term script which demonstrates how to use AT-Command f or AWS IoT using a personal computer and the DA16200/DA16600 EVK\doc –...
  • Page 7: Demonstration Hardware Description

    GPIO f rom the MCU to the DA16200/DA16600 to wake up the DA16200/DA16600 f rom DPM mode. GPIO f rom the DA16200/DA16600 to the MCU which wakes up the MCU if it is in sleep mode. Figure 2: Hardware Configuration...
  • Page 8: Configuring Hardware

    Default UART Pin Connection The DA16200 EVK uses GPIOA_4 f or UART1 TX and GPIOA_5 f or UART1 RX by def ault. The DA16600 EVK uses GPIOC_6 f or UART2 TX and GPIOC_7 f or UART2 RX by def ault.
  • Page 9: Figure 3: Default Uart Hw Connection

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT 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 f or UART1 in accordance with the Pin Mux Conf iguration as shown in Figure 4.
  • Page 10: Da16200/Da16600 Wake Up Connection

    In a low power scenario, the External Host may be in sleep mode to save power. In this case, the DA16200/DA16600 requires a connection to the External Host to trigger a wake up f rom sleep mode. This connection is not required if the External Host is not using sleep mode.
  • Page 11: Figure 6: Default Wake Up Pin Hw Connection

    Table 3 shows the GPIO pin conf iguration inf ormation. For example, to use GPIOC_6 of the DA16200 EVK f or the External Host wake up pin, set the GPIO port and the GPIO pin using the f ollowing AT+CMDs:...
  • Page 12 UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT Port PIN Mux GPIO GPIOA_4 PIN_CMUX GPIOA_5 GPIOA_6 PIN_DMUX GPIOA_7 GPIOA_8 PIN_EMUX GPIOA_9 GPIOA_10 PIN_FMUX GPIOA_11 GPIO_UNIT_C GPIOC_6 PIN_UMUX GPIOC_7 GPIOC_8 User Manual Revision 1.1 31-Jul-2023 CFR0012 12 of 40...
  • Page 13: Software Setting Guide

    DA16200 DA16600 Getting Started with AT -Command for Azure® IoT Software Setup DA16200/DA16600 A serial communication tool such as “Tera Term” is required f or connecting the desktop to the DA16200/DA16600 to download the f irmware images and monitor the debug logs. To download Tera Term, visit https://ttssh2.osdn.jp/. 7.1.1...
  • Page 14: How To Download Firmware Image To Da16200/Da16600

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT 3. Af ter connecting to the DA16200 with Tera Term, check f or the command prompt as shown below. ****************************************************** DA16200 SDK Information * --------------------------------------------------- * - CPU Type...
  • Page 15: 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 Azure-IoT Conf iguration Settings. User Manual Revision 1.1 31-Jul-2023 CFR0012 15 of 40 © 2023 Renesas Electronics...
  • Page 16: Configuration Items For Testing

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT Soft-AP is Ready (d4:3d:39:11:5e:73) >>> UART1 : Clock=80000000, BaudRate=115200 >>> UART1 : DMA Enabled ... [reg_user_atcmd_help_cb] Start AZURE AT Command [UART ready notification] [http_server_task] HTTP-Server Start!! =========================================== [ AZURE-IOT AT-COMMAND ] [ azure_twin_dpm_auto_start] AZURE_IOT on Station Mode for "DA16200"...
  • Page 17: Stand-Alone Mode

    DA16200 DA16600 Getting Started with AT -Command for Azure® IoT ;In order to use this script on DA16200, the console should be prompt ;after setting the DA16200 to STA mode, SNTP client enable, and no DPM mode in easy setup through the console.
  • Page 18: Mcu Setting

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT MCU Setting To set MCU, require E2studio, Free IDE f or ref erencing, and MCU source code f or testing. E2stduio link: e² studio | Renesas Procedure 1. Af ter installing e2studio, import the project f ile at \MCU\RA6M4\ (see Figure 12).
  • Page 19: Figure 13: Fsp Configuration

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT Figure 13: FSP Configuration 3. Use the “device id" (thingname), “primary key”, “hostname”, and “primary connection string” received f rom the FAE to test without setting up a server.
  • Page 20: Figure 15: Build Project

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT Figure 15: Build Project 6. Select Debug Configurations to set the connection to the RA6M4 MCU (see Figure 16). Figure 16: Debug Configurations User Manual Revision 1.1 31-Jul-2023 CFR0012 20 of 40 ©...
  • Page 21: Figure 17: Set Debug Configurations

    8. When clicking the Debug icon on the Tool bar, the MCU image will be downloaded to the device. 9. The f ollowing shows the console output of the DA16200/DA16600 af ter a f actory mode reset. System Mode : Soft-AP (1) >>>...
  • Page 22 UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT 10. The f ollowing shows the console output of the DA16200/DA16600 when setting the Azure IoT conf iguration through AT-Commands f rom an MCU. ======================================================= argc num = 2...
  • Page 23 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT 11. The f ollowing shows the console output of the DA16200/DA16600 af ter the Sof t AP has been conf igured and it is waiting to be provisioned by the mobile application.
  • Page 24: Mobile App

    Mobile App Overview To install the mobile application, search f or “DA16200” on the Google Pay Store or Apple App Store. Wi-Fi interf ace provisioning can be done using Sof t AP mode (DA16200/DA16600). To provision Wi- Fi devices using the mobile app , mobile network data should be set to off on the mobile phone and Wi-Fi and Bluetooth Low Energy should be enabled.
  • Page 25: Figure 19: Open Door In The App

    Figure 20: Device Twin When Door is Opened The console log of the DA16200/DA16600 af ter the door is opened as below. Info: [deviceMethodCallback:565] : method_name: AppControl, Command payload : 17, "0 app_door open" dynamic subscription command ("app_door") send "SERVER_DATA 0 app_door open"...
  • Page 26 UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT ======================================================= argc num = 2 argv[0]: AT+AZU argv[1]: CMD MCU_DATA 2 battery 75 3 temperature 40 4 doorState true 7 openMethod app ======================================================= board feature : EVK topicCount : 4...
  • Page 27: Close Door

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT Close Door A block diagram of the close door operation is shown in Figure Figure 21: Block Diagram for Closing a Door The Android App close door operation along with the Azure IoT console output displaying the device twin state is shown in Figure 22.
  • Page 28: Figure 23: Device Twin When Door Is Closed

    DA16200 DA16600 Getting Started with AT -Command for Azure® IoT Figure 23: Device Twin When Door is Closed The console output of the DA16200/DA16600 af ter the door is closed is shown below: Info: [deviceMethodCallback:565] : method_name: AppControl, Command payload : 18, "0 app_door close"...
  • Page 29: Ota Update Of Mcu Firmware

    Note that the DA16200/DA16600 detects whether the f irmware image is f or the MCU or f or the DA16200/DA16600 depending on the pref ix of the f irmware image name. If the f irmware image is f or the MCU, then the f irmware image name should be pref ixed with “mcu”. e.g., mcu_f irmware_20220101.img.
  • Page 30: Figure 25: Android Application Screenshots

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT Figure 25: Android Application Screenshots User Manual Revision 1.1 31-Jul-2023 CFR0012 30 of 40 © 2023 Renesas Electronics...
  • Page 31: Appendix A Azure Iot At-Command List

    A.1.1 Setting Mode Af ter uploading a f irmware image and rebooting, the DA16200/DA16600 enters setting mode. In this mode, all Azure IoT settings can be conf igured using the “SET” command and a specif ic topic can be conf igured using the “CFG” command. For proper operation of Azure IoT, the TLS certif icate keys should be set.
  • Page 32: Communication Mode

    DA16200 DA16600 Getting Started with AT -Command for Azure® IoT Figure 27: Provisioning Mode A.1.3 Communication Mode The DA16200/DA16600 Communicating Mode is used by the MCU to communicate (send and receive) topic values with an Azure server (See Figure 28).
  • Page 33: How To Report Topic And Update Device Twin

    Table ○ The MCU pushes the topics in Table 4 to the DA16200/DA16600 using AT-CMD The DA16200/DA16600 f acilitates the communication between the MCU and the phone as shown in Figure Table 4: Configuration of Topics Number Name Value Type...
  • Page 34: Tls Certificate

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT Head Main Parameters APP_HOSTNAME Set the Azure server hostname . APP_IOTHUB_CONN_STRING Set the IoT Hub connection string. Set the DPM sleep mode 1 - not used SLEEP_MODE 2 - not used 3 - connected sleep.
  • Page 35: Pin Mux

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT A.3.3 PIN MUX Table 7: PIN MUX from MCU to DA16200/DA16600 Head Main Parameters AMUX_UART1d /* UART1(RXD, TXD) */ NV_PIN_AMUX AMUX_GPIO /* GPIOA [1:0] BMUX_UART1d /* UART1(RXD, TXD) */...
  • Page 36: Configuration Data As Topics

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT A.3.4 Configuration Data as Topics Table 8: Configuration Data from MCU to DA16200/DA16600 Head Main Parameters ● number: index to identify the saved topic Increase by 1 when setting a new topic Max value is 10 (total supported topics is 10) ●...
  • Page 37: Command - Da16200/Da16600 To Mcu

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT Head Main Description Parameters: [number] [name] [value] Ex) AT+AZU=CMD FACTORY_RESET AT+AZU=CMD MCU_DATA 1 mcu_door opened Command – DA16200/DA16600 to MCU A.3.6 Table 10: Command from DA16200/DA16600 to MCU Head...
  • Page 38: Revision History

    UM-WI-060 DA16200 DA16600 Getting Started with AT -Command for Azure® IoT Revision History Revision Date Description 31-Jul-2023 Reference MCU change 10-Aug-2022 First Release User Manual Revision 1.1 31-Jul-2023 CFR0012 38 of 40 © 2023 Renesas Electronics...
  • 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 claim s, damages, costs, losses, or liabilities arising out of your use of these resources. Renesas' products are provided only subject to Renesas' Terms and Con ditions of Sale or other applicable terms agreed to in writing.

This manual is also suitable for:

Da16600

Table of Contents