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

Advertisement

Quick Links

User Manual
DA16200 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
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 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

    Software Setting Guide ....................... 11 The DA16200 ........................11 7.1.1 How to Connect with Tera Term ................11 7.1.2 How to Download a Firmware Image to the DA16200 ........12 7.1.3 Configuration items for Testing ................14 7.1.4 Stand-Alone Mode ....................15 MCU Setting ........................
  • Page 3: Figures

    Table 3: GPIO Pin Configuration ......................10 Table 4: Configuration of the Topics ....................31 Table 5: The Basic set of MCU to DA16200 ..................31 Table 6: TLS certificate from MCU to DA16200 .................. 32 Table 7: The PIN MUX from MCU to DA16200 ................... 33 Table 8: Configuration Data from MCU to DA16200 ................
  • Page 4: Abstract

    IoT applications and solutions. This guide introduces the DA16200 AT-Command for Azure-IoT and describes how to use the DA16200 EVB and STM32 Nucleo-64 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 Azure-Iot

    DA16200 Getting Started with AT-Command for Azure-IoT What is AT-Command for Azure-IoT The AT-Command interface for Azure-IoT is a solution developed for the DA16200 Wi-Fi device and modules that provides connectivity between an MCU and a Mobile phone through an Azure-IoT server using the AT-Command interface.
  • Page 6: Demonstration Hardware Description

    Additionally, two other connections are required between the MCU and the DA16200: GPIO from the MCU to the DA16200 to wake up the DA16200 from DPM mode. GPIO from the DA16200 to the MCU which wakes up the MCU if it is in sleep mode. Figure 2: Hardware Configuration...
  • Page 7: Configuring The Hardware

    Default UART Pin Connection The DA16200 EVK uses GPIOA_4 for UART1 TX and GPIOA_5 for UART1 RX by default. The RX, TX and GND signals of the External Host and the DA16200 must be connected as shown in Figure User Manual Revision 1.0...
  • Page 8: Figure 3: Default Uart Hw Connection

    Figure 3: Default UART HW Connection 6.1.1.2 User UART Pin Connection Sample for the DA16200 EVK If required, an AT+CMD can be used to change the pin connection for UART1 in accordance with the Pin Mux Configuration as shown in Error! Reference source not found.
  • Page 9: Da16200 Wake Up Connection

    DPM mode, the External Host must wake up the DA16200 before sending or receiving data. The External Host can trigger a wakeup event by connecting a GPIO pin to the RTC_WAKE_UP pin of DA16200 EVK. A wakeup event is triggered when the GPIO Pin transitions from Low to High and then back to Low.
  • Page 10: Figure 7: User Example For External Host Wake Up Pin Hw Connection

    UM-WI-060 DA16200 Getting Started with AT-Command for Azure-IoT For example, to use GPIOC_6 of the DA16200 EVK for the External Host wake up pin, set the GPIO port and the GPIO pin using the following AT+CMDs: AT+AZU SET APP_MCU_WKAEUP_PORT GPIO_UNIT_C...
  • Page 11: Software Setting Guide

    Software Setting Guide The DA16200 A serial communication tool such as “Tera Term” is required to connect the laptop/PC to the DA16200 to download the firmware images and monitor the debug logs. Tera Term is available for download from: https://ttssh2.osdn.jp/ 7.1.1...
  • Page 12: How To Download A Firmware Image To The Da16200

    UM-WI-060 DA16200 Getting Started with AT-Command for Azure-IoT 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 13: Figure 11: Reset Button

    = "Dialog_DA16200" ..., ap_config_param->ssid_name PW = 1234567890 PW = 1234567890 completed apps_reboot_ap_mode IPADDR_CUSTOMER..apps_reboot_ap_mode customer_dhcpd_flag == DHCPD_CUSTOMER..The DA16200 is now ready to enter the Azure-IoT Configuration Settings. User Manual Revision 1.0 10-Aug-2022 CFR0012 13 of 39 © 2022 Renesas Electronics...
  • Page 14: Configuration Items For Testing

    UM-WI-060 DA16200 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 15: Stand-Alone Mode

    DA16200 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 16: Mcu Setting

    UM-WI-060 DA16200 Getting Started with AT-Command for Azure-IoT Note that the example script only supports initial value setting, To fully verify the operation of the AT Commands, an MCU should be used for interacting with the server and application. MCU Setting Requirements: CubeIDE, Free IDE for referencing, and testing MCU source code.
  • Page 17: Figure 13: Device Id(Thingname), Primary Key, Hostname And Primary Connection String In Mcu Source Code

    UM-WI-060 DA16200 Getting Started with AT-Command for Azure-IoT Figure 13: Device ID(THINGNAME), Primary Key, Hostname and Primary connection string in MCU Source Code 4. Select project > Build all to build (see Figure 14). Figure 14: Build Project Note 3 When connecting to the STM32 MCU for the first time, follow steps 5-7 to set upthe Debug Configuration.
  • Page 18: Figure 15: Debug Configurations Menu

    UM-WI-060 DA16200 Getting Started with AT-Command for Azure-IoT Figure 15: Debug Configurations Menu 6. Selecting the debug tab will open the window shown in Figure 16. Change the configuration as shown and then select the “Apply” and “Debug” buttons. Figure 16: Set Debug Configurations User Manual Revision 1.0...
  • Page 19: Figure 17: Set Perspective Switch

    8. When clicking the “Debug” icon on the Tool bar, the MCU image will be downloaded to the device. 9. The following shows the console output of the DA16200 after a factory mode reset. System Mode : Soft-AP (1) >>> DHCP Server Started >>>...
  • Page 20 UM-WI-060 DA16200 Getting Started with AT-Command for Azure-IoT 10. The following shows the console output of the DA16200 when setting the Azure IoT configuration via AT-Commands from an MCU. ======================================================= argc num = 2 argv[0]: AT+AZU argv[1]: SET APP_BOARD_FEATURE EVK...
  • Page 21 UM-WI-060 DA16200 Getting Started with AT-Command for Azure-IoT 11. The following shows the console output of the DA16200 after the SoftAP has been configured and it is waiting to be provisioned by the mobile application. Soft-AP is Ready (d4:3d:39:11:5e:73) [http_server_task] HTTP-Server Start!!
  • Page 22: Mobile App

    Mobile App Overview To install the mobile application, search for “DA16200” on the Google Pay Store or Apple App Store. Wi-Fi interface provisioning can be done using Soft AP mode (DA16200). To provision Wi-Fi devices using the mobile app, mobile network data must be set to off on the mobile phone and Wi-Fi and Bluetooth Low Energy must be enabled.
  • Page 23: Open Door

    UM-WI-060 DA16200 Getting Started with AT-Command for Azure-IoT Open Door A block diagram of the open door operation is shown in Figure Figure 18: Block Diagram for Opening a Door The Android App open door operation along with the Azure IoT console output showing the device twin state is shown in Figure 19.
  • Page 24: Figure 20: Device Twin When Door Is Opened

    Figure 20: Device Twin when door is opened The console log of the DA16200 when the open door operation is completed is 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 25: Close Door

    UM-WI-060 DA16200 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 showing the device...
  • Page 26: Figure 23: Device Twin When Door Is Closed

    DA16200 Getting Started with AT-Command for Azure-IoT Figure 23: Device Twin when door is closed The console output of the DA16200 once the door close operation has been completed is shown below: Info: [deviceMethodCallback:565] : method_name: AppControl, Command payload : 18, "0 app_door close"...
  • Page 27: Ota Update Of The Mcu Firmware

    Azure 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 depending 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’.
  • Page 28: Figure 24: Android Application Screenshots

    UM-WI-060 DA16200 Getting Started with AT-Command for Azure-IoT Figure 25: Android Application Screenshots User Manual Revision 1.0 10-Aug-2022 CFR0012 28 of 39 © 2022 Renesas Electronics...
  • Page 29: Appendix A Azure Iot At-Command List

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

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

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

    Set the period to check a beacon frame from the AP TIM_WAKE_UP Default value is set to10 EX) AT+AZU=SET APP_THINGNAME AssignedDeviceID AT+AZU=SET APP_HOSTNAME azure-atcmd-iothub.azure-devices.net A.3.2 TLS certificate Table 6: TLS certificate from MCU to DA16200 Start Code Sub Code Type End Code Root CA Self-Signed, well known...
  • Page 33: Pin Mux

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

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

    UM-WI-060 DA16200 Getting Started with AT-Command for Azure-IoT Head Main Description Used by the MCU to set a CFG parameter in the DA16200.The value must be the same format as defined by the CFG setting. MCU_DATA Parameters: [number] [name] [value]...
  • Page 36 UM-WI-060 DA16200 Getting Started with AT-Command for Azure-IoT Status Value Parameters Start STA Not defined yet Done STA Sent when entering sleep mode for DPM MCUOTA Sent when start MCU OTA process. EX) +AZUIOT STATUS 15 User Manual Revision 1.0...
  • Page 37: Revision History

    UM-WI-060 DA16200 Getting Started with AT-Command for Azure-IoT Revision History Revision Date Description 10-Aug-2022 First Release User Manual Revision 1.0 10-Aug-2022 CFR0012 37 of 39 © 2022 Renesas Electronics...
  • Page 38 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 39 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.

Table of Contents