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.
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 ........................
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 ................
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.
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.
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...
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...
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.
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.
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...
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...
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...
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.
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.
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.
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...
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!!
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.
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.
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"...
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...
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"...
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’.
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.
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...
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...
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...
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...
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...
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 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.
Need help?
Do you have a question about the DA16200 and is the answer not in the manual?
Questions and answers