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

Advertisement

Quick Links

User Manual
DA16200 DA16600 Getting
Started with Azure® IoT
UM-WI-058

Abstract

The focus of this document is to introduce a door lock example for Azure® IoT. This is a reference
design which includes the Azure® IoT Application. This reference design provides the user an
experience using the Azure® IoT Android/iOS Application.

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 Azure® IoT UM-WI-058 Abstract The focus of this document is to introduce a door lock example for Azure® IoT. This is a reference design which includes the Azure® IoT Application. This reference design provides the user an...
  • Page 2: Table Of Contents

    Create IoT Hub ....................11 3.2.4 Register Devices ....................15 Configure Azure IoT Hub ....................17 Verify Connection Between Azure IoT Hub and DA16200/DA16600 ......... 20 Door Lock Reference Application ..................... 25 Reference Application in DA16200/DA16600 ..............25 4.1.1 Open Door ......................26 4.1.2...
  • Page 3 Configure Data as Topics ..................77 Command – MCU to DA16200/DA16600 ............78 B.3.5 Command – DA16200/DA16600 to MCU ............78 B.3.6 DA16200/DA16600 Status – DA16200/DA16600 to MCU ........78 B.3.7 Appendix C Troubleshooting ......................80 Operational Issue ........................ 80 Revision History ..........................81 User Manual Revision 1.4...
  • Page 4: Figures

    Figure 42: Default UART HW Connection ................... 32 Figure 43: Sample Example of UART1 Connection ................33 Figure 44: HW Connection for Waking up DA16200/DA16600 ............33 Figure 45: Default Pin Configuration for Waking Up Host MCU............34 Figure 46: Another Pin Configuration for Waking up Host MCU ............34 Figure 47: Factory Reset Button on DA16200 EVB ................
  • Page 5 Figure 82: OTA Update Operation ...................... 62 Figure 83: Message Flows of OTA Update ..................63 Figure 84: OTA Process in DA16200/DA16600 .................. 63 Figure 85: Block Diagram of MCU OTA ....................64 Figure 86: Azure IoT Hub Device Provisioning Service ..............65 Figure 87: Create DPS ........................
  • Page 6: Terms And Definitions

    Transport Layer Security NVRAM Non-Volatile Random Access Memory Device Provisioning Service References UM-WI-056, DA16200 DA16600 FreeRTOS Getting Started Guide, User Manual, Renesas Electronics UM-WI-042, DA16200 DA16600 Provisioning Mobile App, User Manual, Renesas Electronics User Manual Revision 1.4 Jan. 26, 2024...
  • Page 7: Azure Iot Hub

    Azure IoT Hub A Microsoft Azure account is required to run the door lock reference application. This section provides how to configure Azure IoT Hub for communicating with the DA16200/DA16600 IoT device. Azure Services The Azure Portal provides various services including IoT as shown in...
  • Page 8: Create Resource Group

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT 1. Go to the https://azure.microsoft.com. 2. Create an Azure account and sign in. 3. Go to Microsoft Azure Portal to use Azure services (https://azure.microsoft.com/en- us/features/azure-portal). 3.2.2 Create Resource Group To register an IoT Hub resource, a resource group should be created.
  • Page 9: Figure 5: New Resource Group

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 5: New Resource Group 4. Add a resource group name and select a region, and then click Review + create to accept the configuration. Figure 6: Adding Data for Resource Group 5.
  • Page 10: Figure 7: Create Resource Group

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 7: Create Resource Group 6. Click Go to resource group. Figure 8: Go to Resource Group The newly created resource group is displayed. User Manual Revision 1.4 Jan. 26, 2024 CFR0012 10 of 83 ©...
  • Page 11: Create Iot Hub

    Create IoT Hub Azure IoT Hub is a managed service that acts as a central message hub for communication between IoT applications and IoT devices that are connected to the DA16200/DA16600. IoT Hub should be created before creating IoT devices.
  • Page 12: Figure 11: Select Iot Hub

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 11: Select IoT Hub 3. In IoT Hub menu, click Create. Figure 12: Create IoT Hub 4. In the Basics menu, add the IoT hub name and select a region, and then click Next: Networking.
  • Page 13: Figure 13: Next Networking

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 13: Next Networking 5. In IoT Hub Networking menu, click Next: Management. Figure 14: Next Management 6. In the IoT Hub Management menu, select Pricing and scale tier, and then click Review+create.
  • Page 14: Figure 15: Iot Hub Management

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 15: IoT Hub Management 7. Review the items displayed in the Review + Create menu, and click Create. Figure 16: Review IoT Hub Configuration User Manual Revision 1.4 Jan. 26, 2024...
  • Page 15: Register Devices

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT 8. After IoT hub deployment is completed, click Go to resource. Figure 17: Completed IoT Hub Deployment The generated IoT hub web page appears. Figure 18: Generated IoT Hub Web Page 3.2.4 Register Devices IoT devices should be added to Azure IoT Hub.
  • Page 16: Figure 19: Add Devices

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 19: Add Devices 2. In Devices menu, click Add Device. Figure 20: Add Devices (Continued) User Manual Revision 1.4 Jan. 26, 2024 CFR0012 16 of 83 © 2024 Renesas Electronics...
  • Page 17: Configure Azure Iot Hub

    The Azure IoT Hub requires several parameters to be configured. These parameters are used for connecting DA16200/DA16600 device and must be set in the parameter of DA16200/DA16600. The Azure IoT Hub and DA16200/DA16600 need to be connected for data communication.
  • Page 18: Figure 23: Device Id Registered In Azure Iot Hub

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 23: Device ID Registered in Azure IoT Hub ● Device-Primary-Key: Primary key with device ID registered in Azure IoT Hub Figure 24: Primary Key with Device ID User Manual Revision 1.4 Jan.
  • Page 19: Figure 25: Hostname In Azure Iot Hub

    "da16XXX-iothub.azure-devices.net" #define APP_USER_MY_IOTHUB_CONN_STRIN "HostName= da16XXX-iothub.azure- devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=a5UBDdFQJ92jVMhVjwJRzY/LR/GfnrEu289Aa806nUw=" ● Program the values in the DA16200/DA16600 NVRAM: In the DA16200/DA16600 debug console, enter factory mode and set the 4 NVRAM parameters as shown below. User Manual Revision 1.4 Jan. 26, 2024 CFR0012 19 of 83...
  • Page 20: Verify Connection Between Azure Iot Hub And Da16200/Da16600

    When parameters listed above are configured and firmware is successfully downloaded, boot the DA16200/DA16600 EVK and connect to the Azure IoT Hub. Once connected, the DA16200/DA16600 EVK reports to the Azure IoT Hub and the Azure device twin is updated with the reported items.
  • Page 21 UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT ………………………………….. [ azure_twin_dpm_auto_start] AZURE_IOT on Station Mode for "da16200-device-1" …………………………………… [dpmAPPManager] statusFlag : 23 [dpmAPPManager] DM_NEED_INIT DM_INIT Info: [azure_dpm_app_init:544] : AZURE_UPDATE_OTA_UNKNOWN Info: [azure_dpm_app_init:557] : read AZURE_NVRAM_CONFIG_OTA_STATE init status [dpmAPPManager] DM_NEED_CONNECTION DM_NEED_CONNECTION Info: [create_connection_string:740] : connection string : HostName=da16200-standard-iot-hub.azure- devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=Vmt7BP8BsSwNJRm1tSLJUClibls1ApXjpd67HqF91xQ=...
  • Page 22: Figure 27: Azure Iot Hub

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT …………………………………… [dpmAPPManager] statusFlag : 23 [dpmAPPManager] DM_NEED_INIT DM_INIT Info: [azure_dpm_app_init:544] : AZURE_UPDATE_OTA_UNKNOWN Info: [azure_dpm_app_init:557] : read AZURE_NVRAM_CONFIG_OTA_STATE init status [dpmAPPManager] DM_NEED_CONNECTION DM_NEED_CONNECTION Info: [create_connection_string:740] : connection string : HostName= da16XXX-iothub.azure- devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=Vmt7BP8BsSwNJRm1tSLJUClibls1ApXjpd67HqF91xQ= Info: [IoTHub_Init:22] : Platform intitializeion OK Info: [ThreadAPI_Create:55] : thread "azrSubT_0"...
  • Page 23: Figure 28: Select Device Id

    Figure 29: Device Twin in Azure IoT Hub Figure 30 shows the property of Device Twin. The information shown in the device twin should match with the information shown in the DA16200/DA16600 console log. User Manual Revision 1.4 Jan. 26, 2024...
  • Page 24: Figure 30: Items In Azure Device Twin

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 30: Items in Azure Device Twin User Manual Revision 1.4 Jan. 26, 2024 CFR0012 24 of 83 © 2024 Renesas Electronics...
  • Page 25: Door Lock Reference Application

    Azure account Figure 31: Structure of Azure IoT Install the mobile application by searching for DA16200 or DA16600 on the Google Pay Store or Apple App Store on the mobile devices. Provisioning is required for connection between DA16200/DA16600 and Router before connecting DA16200/DA16600 with Azure IoT hub.
  • Page 26: Open Door

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 32: Open Azure IoT on Mobile Device Figure 33 shows key features of the Azure IoT on the Android phone. Figure 33: Azure IoT on Mobile Device 4.1.1 Open Door Figure 34 shows message flows of opening the door.
  • Page 27: Figure 34: Message Flows Of Opening Door

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 34: Message Flows of Opening Door The operation of opening door in Android app is shown in Figure Figure 35: Opening Door on Mobile App Figure 36 shows the device twin of Azure IoT Hub when the operation of opening door is completed.
  • Page 28: Close Door

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 36: Device Twin When Door Is Open When the operation of opening door is completed, the console logs of DA16200/DA16600 are displayed as below. [mqttOperationCompleteCallback:2102] MQTT_CLIENT_ON_CONNACK & CONNECTION_ACCEPTED: subscribing topics=0x000d ==> elapsed time: 2 ms, total time: 207 ms Info: [app_socket_set_recv_timeout:146] : recv timeout(=120) set OK (socket=0) [SubscribeToMqttProtocol:2441] mqtt_client_subscribe() bypassed ==>...
  • Page 29: Figure 38: Closing Door On Mobile App

    Azure IoT Hub when the operation for closing door is completed. Figure 39: Device Twin When Door Is Closed When the operation for closing door is completed, the console logs of DA16200/DA16600 are displayed as below. [mqttOperationCompleteCallback:2102] MQTT_CLIENT_ON_CONNACK & CONNECTION_ACCEPTED: subscribing topics=0x000d ==>...
  • Page 30: Reference Application In Host Mcu

    Figure 40: Azure IoT Using Firmware Images for AT Commands and Host MCU 4.2.1 Download Package for Door Lock Reference Application in Host MCU A firmware image for AT command and application in MCU are available in the official Renesas website (https://www.renesas.com/us/en/products/wireless-connectivity/wi-fi/low-power-wi-fi). The contents of the package are as follows: ●...
  • Page 31: Hardware Connections Between Da16200/Da16600 And Host Mcu

    DPM low power mode (DPM LPM) ○ GPIO from the DA16200/DA16600 to host MCU to wake up the MCU in sleep mode Figure 41: Hardware Configuration The pin connections between the DA16200/DA16600 EVB and the EK-RA6M4 board are shown in...
  • Page 32: Figure 42: Default Uart Hw Connection

    Flow Control (HW/SW) None The DA16200 EVB uses GPIOA_4 and GPIOA_5 for UART1 TX and UART1 RX, and the DA16600 EVB uses GPIOC_6 and GPIOC_7 for UART2 TX and UART2 RX by default. In addition, GND needs to be connected to the host MCU as shown in...
  • Page 33: Figure 43: Sample Example Of Uart1 Connection

    Figure 44: HW Connection for Waking up DA16200/DA16600 The host MCU may be in sleep mode when DA16200/DA16600 wakes up from DPM LPM and needs to send responses to the host MCU. In this scenario, the DA16200/DA16600 needs to wake up the...
  • Page 34: Figure 45: Default Pin Configuration For Waking Up Host Mcu

    // GPIO_11 Figure 45: Default Pin Configuration for Waking Up Host MCU Other GPIOs in the DA16200 EVB can be used for waking up the host MCU as shown in Table For example, GPIOC_6 can be configured for waking up host MCU using the below AT commands...
  • Page 35: Programming Firmware Images For Da16200/Da16600

    This can be done by pushing the “Factory_RST” button for 5 seconds as shown in Figure 47 Figure 48, and the logs from DA16200/DA16600 are shown in box below. Figure 47: Factory Reset Button on DA16200 EVB Figure 48: Factory Reset Button on DA16600 EVB User Manual Revision 1.4...
  • Page 36: Configure Components For Testing

    Root CA: X Not ready Cert for Azure service ... invalid AZURE feature...can't start AZURE thread...check again .. UART ready After the factory reset, the DA16200/DA16600 is now ready to enter the Azure-IoT Configuration Settings. 4.2.4 Configure Components for Testing The following information are required for testing the application with Azure IoT server: ●...
  • Page 37 DA16200 DA16600 Getting Started with 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 38: Test Without Host Mcu

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT The MCU source code can be found in the following file: \MCU\RA6M4\Src\atcmd\at_cmd.c. const char* cmd_set_azure_cfg[MAX_CFG_NUM] = "\r\nAT+"PLATFORM" SET APP_BOARD_FEATURE EVK\r\n", "\r\nAT+"PLATFORM" SET APP_THINGNAME da16200_atcmd_thing\r\n", "\r\nAT+"PLATFORM" SET APP_DEV_PRIMARY_KEY dWKJjGHX9TiCOPheiKyRjjcmmUtBBZsuASBB+K6OoGs=\r\n", "\r\nAT+"PLATFORM" SET APP_HOSTNAME azure-atcmd-iothub.azure-devices.net\r\n", "\r\nAT+"PLATFORM"...
  • Page 39: Figure 49: E 2 Studio Project File

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 49: e studio Project File NOTE When connecting to the RA6M4 MCU for the first time or changing the configuration, follow the step 2 to set up the FSP configuration. 2. Select Configurations.xml to set FSP configuration of the RA6M4 MCU (see Figure 50).
  • Page 40: Figure 51: Thingname/Primarykey/Hostname/Iothub Connection String

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 51: Thingname/Primarykey/Hostname/IotHub Connection String 5. Select project > Build all to build (see Figure 52). Figure 52: Build Project 6. Select Debug Configurations to set the connection to the RA6M4 MCU (see Figure 53).
  • Page 41: Figure 53: Debug Configurations

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 53: Debug Configurations 7. Change the configuration as shown in Figure 54 and then select the Apply and Debug buttons. Figure 54: Set Debug Configurations 8. The image for host MCU is downloaded to the device.
  • Page 42 UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT 9. The following shows the console output of the DA16200/DA16600 after a factory mode reset. System Mode : Soft-AP (1) >>> DHCP Server Started >>> Start DA16X Supplicant ... >>> DA16x Supp Ver2.7 - 2022_03 >>>...
  • Page 43 UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT 10. The following shows the console output of the DA16200/DA16600 when setting the Azure IoT configuration through AT commands from an MCU. ======================================================= argc num = 2 argv[0]: AT+AZU argv[1]: SET APP_BOARD_FEATURE EVK...
  • Page 44: Mobile App Demo

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT 11. The following shows the console output of the DA16200/DA16600 after the Soft AP has been configured and it is waiting to be provisioned by the mobile application. Soft-AP is Ready (d4:3d:39:11:5e:73)
  • Page 45: Open Door

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT 4.3.1 Open Door A message flow of opening door is shown in Figure Figure 55: Message Flow of Opening Door The operation for opening door on android app along with the Azure IoT console output displaying the device twin state is shown in Figure 56.
  • Page 46: Figure 57: Device Twin When Door Is Opened

    Azure IoT Hub once the operation of opening door has been completed. Figure 57: Device Twin When Door is Opened The console log of the DA16200/DA16600 after the door is opened as below. User Manual Revision 1.4 Jan.
  • Page 47 UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT 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" to MCU ======================================================= argc num = 2 argv[0]: AT+AZU argv[1]: CMD MCU_DATA 1 mcu_door opened ======================================================= send "CMD_TO_MCU update"...
  • Page 48: Close Door

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT 4.3.2 Close Door Message flows of closing door is shown in Figure Figure 58: Message Flows of Closing Door The operation for closing door on android app along with the Azure IoT console output displaying the...
  • Page 49: Figure 60: Device Twin When Door Is Closed

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 60: Device Twin When Door is Closed The console output of the DA16200/DA16600 after the door is closed is shown below: User Manual Revision 1.4 Jan. 26, 2024 CFR0012 49 of 83...
  • Page 50 UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Info: [deviceMethodCallback:565] : method_name: AppControl, Command payload : 18, "0 app_door close" dynamic subscription command ("app_door") send "SERVER_DATA 0 app_door close" to MCU ======================================================= argc num = 2 argv[0]: AT+AZU argv[1]: CMD MCU_DATA 1 mcu_door closed ======================================================= send "CMD_TO_MCU update"...
  • Page 51: Ota Update

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT OTA Update Over the Air (OTA) is the process of updating the DA16200/DA16600 firmware image through Wi-Fi using an Azure services storage account. To set up OTA update: 1. Create a storage account.
  • Page 52: Figure 63: Configure Storage Account

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT 3. Configure the Resource group, Storage account name, and Region, and then click Review + create. Figure 63: Configure Storage Account 4. Once the storage account validation passes, click Create. Figure 64: Storage Account Validation Done 5.
  • Page 53: Create Container

    Figure Figure 66: Created Storage Account Create Container A container must be created in the Azure services storage account to store the DA16200/DA16600 image file for OTA update. To create a container: 1. In the created storage account, click Containers.
  • Page 54: Figure 67: Containers In Storage Account

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 67: Containers in Storage Account 2. Click Container to add container. Figure 68: Add Container User Manual Revision 1.4 Jan. 26, 2024 CFR0012 54 of 83 © 2024 Renesas Electronics...
  • Page 55: Upload Firmware Image File

    4. The created container appears in the containers list. Figure 70: Created Container Upload Firmware Image File To upload the DA16200/DA16600 firmware image file to the container: 1. Click the created container in the containers list. User Manual Revision 1.4 Jan.
  • Page 56: Figure 71: Container For Uploading Images

    Figure 71: Container for Uploading Images 2. Click Upload to upload the DA16200/DA16600 image file. Figure 72: Upload Image 3. Under the Upload blob section, in Files navigate to the DA16200/DA16600 image file saved in local directory: ○ In case of DA16200 –...
  • Page 57: Figure 73: Navigate To Image

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 73: Navigate to Image Figure 74: Uploaded Image 5. Choose Properties, and then click the Copy icon as shown in Figure 75 after the file is uploaded. Save the URL to configure the Azure Device Twin later.
  • Page 58: Add Ota Url To Device Twin

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 75: Copy Container URL Add OTA URL to Device Twin For OTA update, a configuration must be added to the IoT Hub that sets the OTA URL in the Device Twin.
  • Page 59: Figure 77: Name And Label Section

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT 2. Under the Name and Label section, follow the steps below: a. In Name, add a name, for example “da16XXX-ota-version1”. b. Under Label, create a label by adding name and value, for example “da16XXX-ota-label”, “1.0”.
  • Page 60: Figure 78: Create Configuration

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 78: Create Configuration 4. Under the Target Devices section, follow the step below: a. Set Priority, for example “10”. b. Set Target Condition to match the Device ID in the devices of Azure IoT Hub.
  • Page 61: Figure 79: Target Devices Section

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT c. Click View Devices to verify the device Id. Figure 79: Target Devices Section 5. Under the Review + create section, follow the steps below: a. Verify the validation is passed. b. Review the configuration that is shown in the text box.
  • Page 62: Figure 81: Created Device Twin Configuration

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 81: Created Device Twin Configuration 7. The operation of the Android app is shown in Figure Figure 82: OTA Update Operation 8. The message flow of OTA update is shown in...
  • Page 63: Ota Update Of Mcu Firmware

    Azure server to update the MCU firmware through the DA16200/DA16600. Note that the DA16200/DA16600 detects whether the firmware image is for the MCU or for the DA16200/DA16600 depending on the prefix of the firmware image name. If the firmware image is for the MCU, then the firmware image name should be prefixed with “mcu”...
  • Page 64: Figure 85: Block Diagram Of Mcu Ota

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 85: Block Diagram of MCU OTA An example MCU firmware image for testing OTA is available in the Azure AT command package: \MCU\bin\mcu_azure.bin. User Manual Revision 1.4 Jan. 26, 2024 CFR0012 64 of 83 ©...
  • Page 65: Appendix A Azure Iot Hub Device Provisioning Service

    DA16200 DA16600 Getting Started with Azure® IoT Appendix A Azure IoT Hub Device Provisioning Service Device Provisioning Service (DPS) is a process for registering the DA16200/DA16600 device on the Azure IoT Hub. To set up DPS, follow the steps below: 1.
  • Page 66: Figure 88: Configure Resource Group, Name, And Region

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT 3. Configure the Resource group, Name and Region as shown in Figure 88, and then click Review + create. Figure 88: Configure Resource Group, Name, and Region 4. After the validation is passed, click Create.
  • Page 67: Figure 90: Go To Resource

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT 5. After the deployment of DPS is complete, click Go to resource. Figure 90: Go to Resource 6. Select Linked IoT hubs to link the created DPS resource to the Azure IoT Hub.
  • Page 68: Figure 92: Add Link To Azure Iot Hub

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Figure 92: Add Link to Azure IoT Hub 8. Under Add link to IoT hub section, select the IoT hub and Access Policy as shown in Figure 93, and click Save. Figure 93: Configure Link The IoT Hub that is linked to the DPS appears in the list.
  • Page 69: Manage Enrollments

    Figure 95: Manage Enrollments 2. In the Add enrollment, follow the steps below, and then click Save: a. In Mechanism, select Symmetric Key. b. In Registration ID, enter value for the device, for example da16200-dps-dev1. User Manual Revision 1.4 Jan. 26, 2024...
  • Page 70: Configure Registration Id Parameters In Da16200/Da16600 Sdk

    To enable the Device Provisioning Service, define ENABLE_AZURE_DPS_EXAMPLE as 1 in the e studio. To configure DPS parameters in the DA16200/DA16600 SDK: 1. In the DA16200/DA16600 SDK, edit app_thing_manager.h and define APP_USER_MY_THING_NAME as the DPS Registration ID. For example: #define APP_USER_MY_THING_NAME “da16XXX-dps-dev1”...
  • Page 71: Figure 98: Dps Registration Id

    For example: #define APP_USER_MY_SYMMETRIC_KEY “ddl6VQRQymWXx30Hxv0TqikjQYzUSl5gmxC9JIpB5Vdi71UJtGRJUwbBxd/7tMOG1CuU43q0RFEodfCIQ tMZCw==” Figure 99: Primary Key of DPS Registration ID 3. In the DA16200/DA16600 SDK, edit app_azure_user_conf.h and define ID_SCOPE as the ID Scope of the DPS overview window. For example: #define ID_SCOPE “0ne005E7EE4” User Manual Revision 1.4...
  • Page 72: Figure 100: Id Scope Of Dps

    DA16200 DA16600 Getting Started with Azure® IoT Figure 100: ID Scope of DPS 4. After enabled DPS feature is defined in app_azure_user_conf.h of the DA16200/DA16600 SDK as follows, compile it and download the image file to the device, and then reset the device.
  • Page 73: Appendix B Azure Iot At Command List

    B.1.1 Setting Mode After uploading a firmware image and rebooting, the DA16200/DA16600 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 should be set.
  • Page 74: Communication Mode

    DA16200 DA16600 Getting Started with Azure® IoT Figure 103: Provisioning Mode B.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 104). Figure 104: Communication Mode How to Report Topic and Update Device Twin B.2.1...
  • Page 75: At Command List

    Table 5 ● The MCU pushes the topics in Table 5 to the DA16200/DA16600 using AT commands The DA16200/DA16600 facilitates the communication between the MCU and the phone as shown in Figure 105. Table 5: Configuration of Topics Number Name...
  • Page 76: 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 B.3.2 TLS Certificate Table 7: TLS Certificate from MCU to DA16200/DA16600 Start Code Sub Code Type End Code Root CA Self-Signed, well known...
  • Page 77: Configure Data As Topics

    Note: Default pin mux is BMUX, and uses GPIOA2/GPIOA3 for UART1 and GPIOA9 for MCU wakeup. AT+AZU=SET NV_PIN_BMUX BMUX_UART1d AT+AZU=SET NV_PIN_EMUX EMUX_GPIO AT+AZU=SET APP_MCU_WKAEUP_PORT GPIO_UNIT_A AT+AZU=SET APP_MCU_WKAEUP_PIN GPIO_PIN9 B.3.4 Configure Data as Topics Table 9: Configuration Data from MCU to DA16200/DA16600 Head Main Parameters ● number: Index to identify the saved topic...
  • Page 78: Command - Mcu To Da16200/Da16600

    Table 11: Command from DA16200/DA16600 to MCU Head Main Parameters Description Used by the DA16200/DA16600 to set a CFG parameter in [number] [name] +AZUIOT SERVER_DATA the MCU The value must be the same format as defined by [value] the CFG setting.
  • Page 79 UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Status Value Parameters Need configuration Sent if there is no setting MCU should set and configure with the SET and CFG command Start AP mode Sent when being started to AP mode...
  • Page 80: Appendix C Troubleshooting

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Appendix C Troubleshooting Operational Issue When UI buttons are not visible or not showing up properly while using the mobile app, try to uninstall and install it again. The first time running the mobile app after reinstalling it, make sure that the app can access the location of the device as described in Test Provisioning on Android/iPhone sections of [2].
  • Page 81: Revision History

    UM-WI-058 DA16200 DA16600 Getting Started with Azure® IoT Revision History Revision Date Description Jan. 26, 2024 Added Troubleshooting section Merged documents: Sep. 27, 2023 ● UM-WI-058, DA16200 DA16600 Getting Started with Azure-IoT ● UM-WI-060, DA16200 DA16600 Getting Started with AT- Command for Azure-IoT ●...
  • Page 82 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 83 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