IOT Central not sending command

Rob Ashworth 1 Reputation point

I'm a bit new to IOT, but I have finally managed after a bit of tinkering to get my actual device (STM32L475 Development board) talking to both the IoT Hub, and AzureIOT central.

I can receive telemetry ok, and in the IoT Hub I can send a command to turn and LED on/off - all fine so far...

When I try to send a command from AzureIOTCentral though it doesn't seem to get though. In IoT Hub, the command structure is (C2D) : {"Name":"LedOn","Parameters":{}} which seems to work fine.

I can't tell if AzureIOTCentral is actually sending the command at all , or if it is correctly formatted. Can anyone help, or point me at some info/training material?


Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
342 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,109 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Roman Kiss 2,241 Reputation points

    Hi @Rob Ashworth ,

    Try the following in your IoT Central App :

    • create the command in the default component like is shown in the following screen snippet:


    Note, that the Queue if offline is On which it will generate a C2D message to the device via the device queue the same way like is done by IoT Hub with one more property on the topic such as the method-name=LedOn

    2 people found this answer helpful.

  2. Sander van de Velde 28,161 Reputation points MVP

    Azure IoT supports two ways to send C2D 'commands' to a device:


    1. Message to device is an async call that is sent to the device and picked up once the device is connected to the cloud. Hence, it is not possible to return a value back to the cloud with a response
    2. A Direct Method can send a message and the method waits for a (possible) response. The call can only be made if the device is connected at that exact moment.

    Both solutions make use of different logic on the device.

    Please double-check if you are using the same solution on both platforms.

    1 person found this answer helpful.
    0 comments No comments

  3. Rob Ashworth 1 Reputation point

    OK, so this works, I thought that the whole point behind IOTCentral was that these commands could be encoded into a GUI button press rather than having to type it in explicitly -not very user friendly.


    If this is the case, can anyone recommend a starting point for a Web App to make the user interface (DevOps etc...?).

    I'm more accustomed to Embedded C, if that helps.