Table of Contents

Advertisement

Quick Links

User Manual
DA16x00 Getting Started with AT-
Command for AWS-IoT
UM-WI-038

Abstract

The focus of this document is to easily introduce the AT-Command for AWS IoT. This is a reference
design which includes the AWS IoT Application. This reference design provides the user an
experience using the AWS IoT Android Application.

Advertisement

Table of Contents
loading

Summary of Contents for Renesas UM-WI-038

  • Page 1: Abstract

    User Manual DA16x00 Getting Started with AT- Command for AWS-IoT UM-WI-038 Abstract The focus of this document is to easily introduce the AT-Command for AWS IoT. This is a reference design which includes the AWS IoT Application. This reference design provides the user an...
  • Page 2: Table Of Contents

    PIN MUX ......................33 A.3.4 Configuration Data as Topics ................34 Command – MCU to DA16x00 ................34 A.3.5 Command – DA16x00 to MCU ................35 A.3.6 User Manual Revision 1.1 13-Jan-2022 CFR0012 2 of 39 © 2022 Renesas Electronics...
  • Page 3: Figures

    Table 9: Command of MCU to DA16x00 ..................... 34 Table 10: Command of DA16x00 to MCU ................... 35 Table 11: Status from DA16x00 to MCU ..................... 35 User Manual Revision 1.1 13-Jan-2022 CFR0012 3 of 39 © 2022 Renesas Electronics...
  • Page 4: Abstract

    UM-WI-017, DA16200 AWS IoT Server Setup, Dialog Semiconductor UM-WI-056, DA16200 DA16600 FreeRTOS Getting Started Guide, Dialog Semiconductor UM-WI-042, DA16200 Provisioning the Mobile App, Dialog Semiconductor UM-WI-044, DA16600 Provisioning the Mobile App, Dialog Semiconductor User Manual Revision 1.1 13-Jan-2022 CFR0012 4 of 39 © 2022 Renesas Electronics...
  • Page 5: What Is At-Command For Aws-Iot

    Describes the AT-Command for AWS IoT command list. ○ \MCU – Sample project based on the STM32 development environment for demonstrating how to use the AT-Command for AWS IoT User Manual Revision 1.1 13-Jan-2022 CFR0012 5 of 39 © 2022 Renesas Electronics...
  • Page 6: Demonstration Hardware Description

    GPIO from the DA16x00 to the MCU to wake up the MCU if it is in sleep mode. Figure 2: Hardware Configuration The pin connections between the DA16x00 EVK and the STM32 Nucleo-64 board are shown in Figure User Manual Revision 1.1 13-Jan-2022 CFR0012 6 of 39 © 2022 Renesas Electronics...
  • Page 7: Configuring The Hardware

    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 DA16x00 must be connected as shown in Figure User Manual Revision 1.1 13-Jan-2022 CFR0012 7 of 39 © 2022 Renesas Electronics...
  • Page 8: Figure 4: Default Uart Hw Connection

    Figure 5: User Example of Custom UART1 HW Connection Table 2: UART1 Pin Configuration PIN Mux GPIO Signal Name PIN_AMUX GPIOA_0 GPIOA_1 PIN_BMUX GPIOA_2 GPIOA_3 PIN_CMUX GPIOA_4 GPIOA_5 PIN_DMUX GPIOA_6 User Manual Revision 1.1 13-Jan-2022 CFR0012 8 of 39 © 2022 Renesas Electronics...
  • Page 9: Da16X00 Wake Up Connection

    AT+CMDs to configure the External Host wake up pin are as follows: AT+AWS SET APP_MCU_WKAEUP_PORT GPIO_UNIT_A // GPIO_A port AT+AWS SET APP_MCU_WKAEUP_PIN GPIO_PIN11 // GPIO_11 Figure 7: Default Wake Up Pin HW Connection User Manual Revision 1.1 13-Jan-2022 CFR0012 9 of 39 © 2022 Renesas Electronics...
  • Page 10: Figure 8: User Example For External Host Wake Up Pin Hw Connection

    PIN Mux GPIO GPIO_UNIT_A PIN_AMUX GPIOA_0 GPIOA_1 PIN_BMUX GPIOA_2 GPIOA_3 PIN_CMUX GPIOA_4 GPIOA_5 PIN_DMUX GPIOA_6 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.1 13-Jan-2022 CFR0012 10 of 39 © 2022 Renesas Electronics...
  • Page 11: Software Setting Guide

    1. Locate and connect the serial port on the PC. Figure 9: Tera Term 2. Select a baud-rate. The default value for DA16x00 is 230400. Figure 10: Serial Port Setup User Manual Revision 1.1 13-Jan-2022 CFR0012 11 of 39 © 2022 Renesas Electronics...
  • Page 12: How To Download A Firmware Image To The Da16X00

    1. The firmware images can be downloaded to the DA16x00 by selecting Control > Marco > da16x00_*.ttl script in the DA16x00\img\ folder. Figure 11: DA16x00 Image Download User Manual Revision 1.1 13-Jan-2022 CFR0012 12 of 39 © 2022 Renesas Electronics...
  • Page 13: Figure 12: 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..DA16x00 is now ready for AWS-IOT Configuration Setting mode. User Manual Revision 1.1 13-Jan-2022 CFR0012 13 of 39 © 2022 Renesas Electronics...
  • Page 14: Thing Name For Testing

    Set the “Thing name” in the MCU source code or set it in the provided scripts. The scripts are in the SDK at the following location: \DA16x00\script\doorlock.ttl \DA16x00\script\sensor.ttl. Figure 13: Script File for Configuration User Manual Revision 1.1 13-Jan-2022 CFR0012 14 of 39 © 2022 Renesas Electronics...
  • Page 15: Stand-Alone Mode

    CubeIDE, Free IDE for referencing, and testing MCU source code. CubeIDE link: https://www.st.com/en/development-tools/stm32cubeide.html Procedure 1. After installing CubeIDE, double-click to open the .project file at \MCU\STM_32\Stm32Cube_atcmd\ (see Figure 14). User Manual Revision 1.1 13-Jan-2022 CFR0012 15 of 39 © 2022 Renesas Electronics...
  • Page 16: Figure 14: Cubeide Project File

    3. Change the "Thing name" to the received name (see Figure 15). Figure 15: Thing Name in MCU Source Code 4. Select project > Build all to build (see Figure 16). Figure 16: Build Project User Manual Revision 1.1 13-Jan-2022 CFR0012 16 of 39 © 2022 Renesas Electronics...
  • Page 17: Figure 17: Debug Configurations Menu

    6. Selecting the debug tab will open the window shown in Figure 18. Change the configuration as shown and then select the “Apply” and “Debug” buttons. Figure 18: Set Debug Configurations User Manual Revision 1.1 13-Jan-2022 CFR0012 17 of 39 © 2022 Renesas Electronics...
  • Page 18: Figure 19: Set Perspective Switch

    Root CA: X Certificate: X Private Key: X Not ready Cert for AWS service ... invalid aws feature...can't start AWS thread...check again .. UART ready User Manual Revision 1.1 13-Jan-2022 CFR0012 18 of 39 © 2022 Renesas Electronics...
  • Page 19 = 2 argv[0]: AT+AWS argv[1]: CFG 5 temp 2 1 ======================================================= ======================================================= Att[5] number Att[5] name : temp Att[5] data type: 2 Att[5] MQTT type: 1 ======================================================= User Manual Revision 1.1 13-Jan-2022 CFR0012 19 of 39 © 2022 Renesas Electronics...
  • Page 20 [app_find_home_ap:518] (3) SK_WiFiGIGA551A / 3 / -79 / 2422 [app_find_home_ap:518] (4) SK_WiFi3801 / 3 / -94 / 2412 [app_find_home_ap:518] (5) NIS-HomeAP11N / 0 / -74 / 2447 [app_provision_TCP_server_thread] socket().. status=1 Wait Accept... User Manual Revision 1.1 13-Jan-2022 CFR0012 20 of 39 © 2022 Renesas Electronics...
  • Page 21: Mobile App

    Once provisioning is completed, mobile network data can be set back to on. For detailed information on Mobile App and Provisioning, see UM-WI-042 DA16200 Provisioning the Mobile App and UM-WI-044 DA16600 Provisioning the Mobile App User Manual Revision 1.1 13-Jan-2022 CFR0012 21 of 39 © 2022 Renesas Electronics...
  • Page 22: Open Door

    Figure 20: Block Diagram for Opening a Door The operation of the Android app and the shadow state of the AWS IOT console is shown in Figure Figure 21: Door Opening Operation User Manual Revision 1.1 13-Jan-2022 CFR0012 22 of 39 © 2022 Renesas Electronics...
  • Page 23: Figure 22: Door Opened Status On Da16X00 Console

    "battery": 66 ○ DA16x00 (Thing): The status of the device is displayed as shown in the red box in Figure Figure 22: Door Opened Status on DA16x00 Console User Manual Revision 1.1 13-Jan-2022 CFR0012 23 of 39 © 2022 Renesas Electronics...
  • Page 24: Close Door

    DA16x00 Getting Started with AT-Command for AWS-IoT Close Door The block diagram for closing the door is shown in Figure Figure 23: Block Diagram for Closing a Door User Manual Revision 1.1 13-Jan-2022 CFR0012 24 of 39 © 2022 Renesas Electronics...
  • Page 25: Figure 24: Door Closing Operation

    "doorStat": "closed" – "temp": -2 – "battery": 33 ○ DA16x00 (Thing): The status of the device is displayed as shown in the red box in Figure 25 User Manual Revision 1.1 13-Jan-2022 CFR0012 25 of 39 © 2022 Renesas Electronics...
  • Page 26: Figure 25: Door Closed Status On Da16X00 Console

    UM-WI-038 DA16x00 Getting Started with AT-Command for AWS-IoT Figure 25: Door Closed Status on DA16x00 Console User Manual Revision 1.1 13-Jan-2022 CFR0012 26 of 39 © 2022 Renesas Electronics...
  • Page 27: Android Application Ui

    The following pictograms explains 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 & Message User Manual Revision 1.1 13-Jan-2022 CFR0012 27 of 39 © 2022 Renesas Electronics...
  • Page 28 UM-WI-038 DA16x00 Getting Started with AT-Command for AWS-IoT Request update shadow button OTA update button Door control button Door status Window control button Window status User Manual Revision 1.1 13-Jan-2022 CFR0012 28 of 39 © 2022 Renesas Electronics...
  • Page 29: Appendix A Aws Iot At-Command List

    When provisioning is complete, the DA16x00 will enter communication mode automatically after rebooting (see Figure User Manual Revision 1.1 13-Jan-2022 CFR0012 29 of 39 © 2022 Renesas Electronics...
  • Page 30: Communication Mode

    The MCU pushes the topics in Table 4 to the DA16x00 using AT-CMD The DA16x00 facilitates the communication of the MCU and phone as shown in Figure User Manual Revision 1.1 13-Jan-2022 CFR0012 30 of 39 © 2022 Renesas Electronics...
  • Page 31: At-Cmd List

    2 is wake up mode by set timer 3 is DPM mode for communication between phone and IOT device USE_DPM If Sleep mode is 3, it will be activated User Manual Revision 1.1 13-Jan-2022 CFR0012 31 of 39 © 2022 Renesas Electronics...
  • Page 32: Tls

    Signed by certificate private key Use certificate 1 public key to prove authenticity EX) send "\x1b“ over UART send "C0,-----BEGIN CERTIFICATE-----\n“ "MIIDQTCCAimgAwIBAgITBmyfz5m/jAo ….. over UART send “\x03” User Manual Revision 1.1 13-Jan-2022 CFR0012 32 of 39 © 2022 Renesas Electronics...
  • Page 33: Pin Mux

    Note: Default pin mux is BMUX and Ex) use GPIOA2, GPIOA3 for UART1 and GPIOA9 for MCU wakeup AT+AWS=SET NV_PIN_BMUX BMUX_UART1d AT+AWS=SET NV_PIN_EMUX EMUX_GPIO AT+AWS=SET APP_MCU_WKAEUP_PORT GPIO_UNIT_A AT+AWS=SET APP_MCU_WKAEUP_PIN GPIO_PIN9 User Manual Revision 1.1 13-Jan-2022 CFR0012 33 of 39 © 2022 Renesas Electronics...
  • Page 34: Configuration Data As Topics

    MCU can push a value to DA16x00 as a setting to CFG command format MCU_DATA It will work well only if the value is the same format as CFG setting User Manual Revision 1.1 13-Jan-2022 CFR0012 34 of 39 © 2022 Renesas Electronics...
  • Page 35: Command - Da16X00 To Mcu

    It will send when it fails to connect AP with any problem Normally, it this will happen during provisioning failure by the wrong SSID or It needs to go to AP mode by MCU send” RESET_TO_AP” command User Manual Revision 1.1 13-Jan-2022 CFR0012 35 of 39 © 2022 Renesas Electronics...
  • Page 36 DA16x00 Getting Started with AT-Command for AWS-IoT Status Value Parameters Start STA Not defined yet Done STA It will send when entering sleep mode for DPM EX) +AWSIOT STATUS 15 User Manual Revision 1.1 13-Jan-2022 CFR0012 36 of 39 © 2022 Renesas Electronics...
  • Page 37: Revision History

    UM-WI-038 DA16x00 Getting Started with AT-Command for AWS-IoT Revision History Revision Date Description • 13-Jan-2022 Rebranded document to Renesas branding guidelines • Change DA16200 to DA16x00 • Support DA16200 and DA16600 10-Dec-2020 First Release User Manual Revision 1.1 13-Jan-2022 CFR0012 37 of 39 ©...
  • Page 38 Dialog Semiconductor’s 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. User Manual Revision 1.1 13-Jan-2022 CFR0012 38 of 39 © 2022 Renesas Electronics...
  • 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