Skill Level: Any Skill Level

This recipe is a simple demonstration of the wolfMQTT client connecting to IBM Watson IoT Quickserver broker.


  1. Build the wolfSSL library

    Step through the readme for wolfSSL.

  2. Build the wolfMQTT library and the examples

    Step through the readme for wolfMQTT.

  3. Execute the “wiot” example in /examples/wiot/


    MQTT Client: QoS 0, Use TLS 0

    MQTT Net Init: Success (0)

    MQTT Init: Success (0)

    MQTT Socket Connect: Success (0)

    MQTT Connect: Success (0)

    MQTT Connect Ack: Return Code 0, Session Present 0

    To view the published sample data visit:



    MQTT Subscribe: Success (0)

     Topic iot-2/type/wolfMQTT/id/wolftestid/evt/sensor/fmt/json, Qos 0, Return Code 0

    MQTT Publish: Topic iot-2/type/wolfMQTT/id/wolftestid/evt/sensor/fmt/json, Success (0)

    MQTT Waiting for message…

    MQTT Message: Topic iot-2/type/wolfMQTT/id/wolftestid/evt/sensor/fmt/json, Qos 0, Len 12

    Payload (0 – 12): {“sensor”:1}

    MQTT Message: Done

  4. Browse to the Quickstart Broker



  5. Publish more data

    By typing:


    and then pressing <ENTER>.

    You can change the number and add more values to the chart display.

Join The Discussion