简体   繁体   中英

Azure IOT Hub: Control a device connected to an IoT hub (Android)

Just followed the procedure explained in the quickstart ( https://docs.microsoft.com/en-us/azure/iot-hub/quickstart-control-device-android ), but unable to connect to the device to listen for direct method calls. The sample app displayed an error message shown below. Any sugg在此处输入图片说明 estions to resolve this issue will be a great help.

This tutorial consists of two parts: Part #1: Device API - This app sends the data from the android device to IOT hub. Part #2: Service API - This app calls direct method to control the data frequency (sent time duration) on the device connected to the IOT hub.

I installed the app created in part#1 on my phone. This app pushes data to IOT hub using events at regular intervals.

I launched the app in part #2 on another device keeping the first app running on my phone.This 2nd app just modifies the time interval and issues an event to the first app running on my phone. A notification is displayed on the first app when the event is received.

In short: we need two devices 1. an IOT device connected to the hub. 2. another device to control the IOT device.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM