An Online Azure IoT Hub Developer Tool – IoT DevTool (For Cloud Developers)


A series of posts to introduce IoT DevTool:

  1. Overview
  2. For Cloud Developers
  3. For IoT Hub Device Administrators
  4. For Device Developers
  5. For RESTful Developers

Connect to IoT Hub

Before you start you need a device connection string. You can find it from Device Explorer tab in IoT Hub dashboard.

Find device connection string

Both connection string with primary key and secondary key are okay.

Then paste the device connection string to IoT DevTool Device, and click connect button.

Device connect

Send D2C Messages

After connected, you can send D2C messages to cloud in D2C Messages tab.

You can type any text in the box and send the message to cloud. On the cloud, you can run an event hub client to retrieve that message.

send d2c message

Code running on cloud to retrieve D2C messages.

Receive C2D Messages

You can see received C2D messages in C2D Messages tab.

receive c2d message

Code running on cloud to send C2D messages.

Listen Direct Methods

Add a direct method listener in Direct Method first, let's say we listen reboot method. When the device receives direct method request, it responds {"success":true} and 200 status code.

device direct method

And when the method is called in cloud, you will see it in the history list. Also, the cloud will get the device response.

direct method

Code running on cloud to call direct method.

Get & Update Device Twin

To update reported properties, set the specific property value in JSON format and click send button.

device twin

In cloud, you can update desired properties, and the Device tool will update the data in real time.

update device twin

Code running on cloud to update device twin properties.

Comments (0)

Skip to main content