Giter Site home page Giter Site logo

Comments (4)

dgarske avatar dgarske commented on July 17, 2024

Hi Christian,

Our wolfMQTT library is built upon the MQTT 3.1.1 specification which allows any topic name.

The topic name syntax for direct methods for MQTT is:
Devices receive direct method requests on the MQTT topic:
$iothub/methods/POST/{method name}/?$rid={request id}

You can see our Azure IoT example here:
https://github.com/wolfssl/wolfmqtt#azure-iot-hub-example
https://github.com/wolfSSL/wolfMQTT/blob/master/examples/azure/azureiothub.c#L72

So the short answer is yes it it supported with our library, but you will have to format the topic string yourself for the publish message.

Thanks,
David Garske, wolfSSL

from wolfmqtt.

ChristianWeyer avatar ChristianWeyer commented on July 17, 2024

This is great. Thanks🤘

from wolfmqtt.

ChristianWeyer avatar ChristianWeyer commented on July 17, 2024

Hi again,

do you happen to have a working example for Direct Methods?
We are having a hard time getting one working.

Thanks!

from wolfmqtt.

ChristianWeyer avatar ChristianWeyer commented on July 17, 2024

For everyone who tries this...
It is important to have a username like this (pseudo code):

username = subdomain + ".azure-devices.net/" + device_id + \
    "/DeviceClientType=azure-iot-device%2F1.1.21&api-version=2016-11-14"

from wolfmqtt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.