Communicate with Azure IoT Hub broker

Azure IoT Hub supports sending or receiving information only on specific topics of a device.

Prerequisites

Generate a SAS token

Azure IoT Hub does not allow you to send and receive information on custom topics. A device can send or receive information only on specific topics of the device:

send
devices/deviceid/messages/events/
receive
devices/deviceid/messages/devicebound/#
To communicate with Azure IoT Hub broker
  1. For each client that to send or receive messages, create a device on the Azure IoT Hub.
    Tip: Clients cannot use the same devices to send or receive data.
  2. Verify that sending and receiving messages is successful.
    Tip: The Device Explorer and Azure IoT Explorer applications enable you to monitor the received messages and send messages to devices.