How do I know if my Device in Azure IoT Hub is reachable?

最后都变了- 提交于 2019-12-25 09:18:52

问题


I have a Azure IoT Hub with 2 Devices. I send a Message from a RaspberryPi to another Device.

How do I know that the message was received from the other Device?


回答1:


You can refer to the Device Explorer tool, which is open sourced.

If you want to monitor if an IoT device is reachable by the IoT Hub, you can got to "Message To Device" tab, select the IoT device in the Device ID tab, and make sure you checked "Monitor Feedback Endpoint". Whenever a message is sent from the IoT Hub to the device, and callback(feedback) message will be showing the status of the message.

If you want to do it programatically, refer to the DeviceExplorer source code https://github.com/Azure/azure-iot-sdks/tree/master/tools/DeviceExplorer/DeviceExplorer, the monitor code MainForm.cs, from line 726.




回答2:


There is a cross-platform Azure IoT Toolkit extension for Visual Studio Code to make you able to monitor whether the message is sent to Azure IoT Hub. You could send C2D message and Direct Method to your device. Also, you could see whether the device is connected or disconnected.



来源:https://stackoverflow.com/questions/39100278/how-do-i-know-if-my-device-in-azure-iot-hub-is-reachable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!