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...
4.3.3 Create Devices ....................16 Configuring the Azure IoT Hub and the DA16200(DA16600) ..........19 Verify the Connection Between Azure IoT Hub and DA16200(DA16600) ......22 Testing the DA16200(DA16600) Door-Lock ................26 Open Door ........................... 26 Close Door .......................... 28 OTA Update ........................
UM-WI-058 DA16200(DA16600) Getting Started with Azure® Figures Figure 1: Architecture of Azure for IoT ....................6 Figure 2: Azure Portal Services ......................7 Figure 3: Azure IoT Service Configuration .................... 8 Figure 4: Create a Resource ......................... 8 Figure 5: Resource Group ........................9 Figure 6: New Resource Group ......................
Page 4
Figure 61: Created Device Twin Configuration ................... 44 Figure 62: OTA Process of Android Mobile App ................. 45 Figure 63: DA16200 Device (EVK) OTA Process ................45 Figure 64: Azure IoT Hub Device Provisioning Service ..............46 Figure 65: Create DPS ........................46 Figure 66: Configure the Resource Group, Name, and Region ............
UM-WI-058 DA16200(DA16600) Getting Started with Azure® Terms and Definitions Access Point Android Debug Bridge Application Programming Interface Azure Microsoft Web Services CONFIGURE COMMAND Dynamic Power Management DTIM Delivery Traffic Indication Map Evaluation Board Internet of Things Micro-Controller Unit Over-The-Air Real-Time Clock...
Demonstration Environment This example will demonstrate how to use a mobile application to control a door-lock application running on a DA16200(DA16600) via an Internet connection and the Microsoft Azure IoT server. Figure 1: Architecture of Azure for IoT Demonstration Prerequisites ●...
A Microsoft Azure account is required to test the door-lock example. If an account is not available, a free account can be created and used for this demonstration. This section provides instructions on how to configure Azure IoT Hub to connect to the DA16200(DA16600) IoT device. Azure Account and Portal To create an Azure account, do the following: 1.
UM-WI-058 DA16200(DA16600) Getting Started with Azure® Azure Service Configuration for IoT Azure offers a variety of services of which three are required to connect a device to the Azure IoT server as shown in Figure ● Resource groups ● IoT Hub ●...
UM-WI-058 DA16200(DA16600) Getting Started with Azure® 4. Add the resource group name and select the region, and then click Review + create to accept the configuration. Figure 7: Adding Data for Resource Group 5. Click Create. Figure 8: Create Resource Group User Manual Revision 1.1...
The resource group is completed. Figure 10: Created Resource Group 4.3.2 Create IoT Hub IoT Hub includes Azure IoT devices and the devices are connected to the DA16200(DA16600) devices. To create IoT devices, IoT Hub should be created. User Manual Revision 1.1...
UM-WI-058 DA16200(DA16600) Getting Started with Azure® To create IoT Hub: 1. In the created resource group, click Create resources. Figure 11: Create Resources 2. In Create a resource menu, search and click IoT Hub. Figure 12: IoT Hub User Manual Revision 1.1...
UM-WI-058 DA16200(DA16600) Getting Started with Azure® 3. In IoT Hub menu, click Create. Figure 13: Create in IoT Hub 4. In the Basics menu, add the IoT hub name and select a region, and then click Next: Networking. Figure 14: Next Networking User Manual Revision 1.1...
UM-WI-058 DA16200(DA16600) Getting Started with Azure® 5. In IoT Hub Networking menu, click Next: Management. Figure 15: Next Management 6. In the IoT Hub Management menu, select Pricing and scale tier, and then click Review+create. Figure 16: IoT Hub Management Menu User Manual Revision 1.1...
UM-WI-058 DA16200(DA16600) Getting Started with Azure® 7. Once the IoT hub configuration is created, click Create. Figure 17: Created IoT Hub Configuration 8. After IoT hub deployment is completed, click Go to resource. Figure 18: Completed IoT Hub Deployment User Manual Revision 1.1...
The generated IoT hub web page appears. Figure 19: Generated IoT Hub Web Page 4.3.3 Create Devices The Azure IoT Hub devices should be created for connection of DA16200(DA16600) devices. To create devices: 1. In the created IoT Hub, click Devices. Figure 20: Devices 2.
UM-WI-058 DA16200(DA16600) Getting Started with Azure® Figure 21: Add Devices 3. Add the desired Device ID, and then click Save. Figure 22: Save Devices 4. The device to be used is registered in the Azure IoT server. User Manual Revision 1.1...
The Azure IoT Hub requires several parameters to be configured. These parameters are used to connect to the DA16200(DA16600) device and must be set in the parameter of DA16200(DA16600). The connection is necessary for data communication between the Azure IoT Hub and DA16200(DA16600) device.
● Set the default values in the SDK: Edit the above settings in app_thing_manager.h, and then compile (for instruction on how to compile the DA16200(DA16600) SDK, see Section 5 of Ref [1]) and download the firmware image #define APP_USER_MYHING_NAME "da16XXX-device-1" //Device ID #define APP_USER_MY_DEV_PRIMARY_KEY "kzsauVFTNfZpO1xJHrgXFDjxZ6t9Jbfmd4PgMvx/ixo=”...
Page 21
UM-WI-058 DA16200(DA16600) Getting Started with Azure® ● 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. [/DA16200 or /DA16600] # nvram Command-List is changed, "NVRAM"...
After the 4 parameters mentioned in Section 5 are set up completely and the firmware is downloaded, boot the DA16200(DA16600) EVK and it connects to the Azure IoT Hub. Once connected, the DA16200(DA16600) EVK reports the items to the Azure IoT Hub and the Azure device twin is updated with the reported items.
Page 23
UM-WI-058 DA16200(DA16600) Getting Started with Azure® ● Log of the connection between the DA16600 EVK and Azure IoT Hub Wakeup source is 0x4 [dpm_init_retmemory] DPM INIT CONFIGURATION(1) ****************************************************** DA16600 SDK Information * --------------------------------------------------- * - CPU Type : Cortex-M4 (120MHz) * - OS Type : FreeRTOS 10.4.3...
UM-WI-058 DA16200(DA16600) Getting Started with Azure® ● Log of items reported to the Azure IoT Hub Info: [deviceTwinCallback:463] : Report => {"temperature":23,"battery":100,"doorStateChange":0,"openMethod":"none","doorState":false,"doorBell":false,"do orOpenMode":0,"OTAupdate":0,"OTAresult":"OTA_UNKNOWN","OTAversion":"none"} ● Updated items in the Azure Device Twin To check updated items in the Azure Device Twin:...
Figure 30: Azure IoT Hub Device Twin Azure Device twin is as shown in Figure 31. The information shown in the device twin should match the information shown in the DA16200(DA16600) console log. Figure 31: Items in Azure Device Twin User Manual Revision 1.1...
UM-WI-058 DA16200(DA16600) Getting Started with Azure® Testing the DA16200(DA16600) Door-Lock The DA16200(DA16600) and Azure IoT example can be tested with the Dialog WiFiProvisioning app on either an Android or iOS device. See document Ref. for details on installing and provisioning the mobile app.
Azure IoT Hub when the opening door operation is completed. Figure 34: Device Twin When Door Is Open The console log of DA16200(DA16600) when the opening door operation is completed, is shown below. [mqttOperationCompleteCallback:2102] MQTT_CLIENT_ON_CONNACK & CONNECTION_ACCEPTED: subscribing topics=0x000d ==>...
Azure IoT Hub when the door closing operation is completed. Figure 37: Device Twin When Door Is Closed The console log of DA16200(DA16600) when the door closing operation is completed, is shown as below. [mqttOperationCompleteCallback:2102] MQTT_CLIENT_ON_CONNACK & CONNECTION_ACCEPTED: subscribing topics=0x000d ==>...
UM-WI-058 DA16200(DA16600) Getting Started with Azure® OTA Update The block diagram for OTA update is shown in Figure Figure 38: Block Diagram for OTA Update The operation of the Android app is shown in Figure Figure 39: OTA Update Operation User Manual Revision 1.1...
UM-WI-058 DA16200(DA16600) Getting Started with Azure® OTA Update Over-The-Air update (OTA) is the process of updating the DA16200(DA16600) firmware through Wi- Fi using an Azure services storage account. Several steps must be completed to setup OTA including: 1. Create a storage account.
UM-WI-058 DA16200(DA16600) Getting Started with Azure® 4. Once the storage account validation passes, click Create: Figure 44: Storage Account Validation Done 5. Once the storage account deployment is complete, click Go to resource: Figure 45: Storage Account Deployment Done User Manual Revision 1.1...
UM-WI-058 DA16200(DA16600) Getting Started with Azure® Create a 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.
UM-WI-058 DA16200(DA16600) Getting Started with Azure® 3. Under the New container section, enter a name (for example, “da16XXX-img-container”) and select Container (anonymous read access for containers and blobs) as the Public access level, and then click Create. Figure 49: Container Details The created container appears in the containers list.
Figure 51: Container for Uploading the Image 2. Click Upload to upload the DA16200(DA16600) image file. Figure 52: 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 ○...
UM-WI-058 DA16200(DA16600) Getting Started with Azure® And click Upload and then uploaded image files are appeared as shown in Figure Figure 53: Navigate to the Image Figure 54: Uploaded Image 4. After the file is uploaded, click Properties and then click the Copy icon as shown in Figure Save the URL to configure the Azure Device Twin later.
UM-WI-058 DA16200(DA16600) Getting Started with Azure® Figure 55: Copy Container URL Add the OTA URL to the Device Twin For OTA update, a configuration must be added to the IoT Hub that sets the OTA URL in the Device Twin.
UM-WI-058 DA16200(DA16600) Getting Started with Azure® 2. Under the Name and Label section, do the following: 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”.
UM-WI-058 DA16200(DA16600) Getting Started with Azure® 3. Under the Twin Settings section, do the following: a. Set Device Twin Property to: “properties.desired.fwupdate”. b. In the Device Twin Property Content field, which defines the version and URL, add a JSON formatted string.
UM-WI-058 DA16200(DA16600) Getting Started with Azure® c. Click View Devices to verify the device Id. Figure 59: Target Devices Section 5. Under the Review + create section, do the following: a. Verify the validation is passed. b. Review the configuration that is shown in the text box.
1. Click OTA Update to execute OTA update in the Android Mobile App, and then the OTA update’s process proceeds as shown in Figure Figure 62: OTA Process of Android Mobile App 2. The process of the DA16200 device (EVK) proceeds as shown in Figure Figure 63: DA16200 Device (EVK) OTA Process User Manual Revision 1.1...
DA16200(DA16600) Getting Started with Azure® Appendix A Using the 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 setup DPS, several steps must be completed: 1.
UM-WI-058 DA16200(DA16600) Getting Started with Azure® 3. Configure the Resource group, Name and Region as shown in Figure 66, and then click Review + create. Figure 66: Configure the Resource Group, Name, and Region 4. After the validation is passed, click Create.
UM-WI-058 DA16200(DA16600) Getting Started with Azure® 5. After the deployment of DPS is complete, click Go to resource. Figure 68: Go to Resource 6. Select Linked IoT hubs to link the created DPS resource to the Azure IoT Hub. Figure 69: Linked IoT Hubs 7.
UM-WI-058 DA16200(DA16600) Getting Started with Azure® Figure 70: Add Link to the Azure IoT Hub 8. Under Add link to IoT hub section, select the IoT hub and Access Policy as shown in Figure 71, and click Save. Figure 71: Configure the Link The IoT Hub that is linked to the DPS appears in the list.
Figure 73: Manage Enrollments 2. In the Add enrollment, do the following, 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.1 01-Sep-2022...
To enable the Device Provisioning Service, define ENABLE_AZURE_DPS_EXAMPLE as 1 in Eclipse as shown in . 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”...
For example: #define APP_USER_MY_SYMMETRIC_KEY “ddl6VQRQymWXx30Hxv0TqikjQYzUSl5gmxC9JIpB5Vdi71UJtGRJUwbBxd/7tMOG1CuU43q0RFEodfCIQ tMZCw==” Figure 77: Primary Key of the 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.1...
DA16200(DA16600) Getting Started with Azure® Figure 78: ID Scope of the 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 55
UM-WI-058 DA16200(DA16600) Getting Started with Azure® Status Definitions Status Definition DRAFT The content of this document is under review and subject to formal approval, which may result in modifications or additions. APPROVED The content of this document has been approved for publication.
Page 56
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.
Need help?
Do you have a question about the DA16200 and is the answer not in the manual?
Questions and answers