Community news, upcoming events and general discussions
Threads: 36 Posts: 88
Get technical support from the community
Threads: 1416 Posts: 7565
Threads: 18 Posts: 64
Tell us how to make XDK better!
Threads: 36 Posts: 119
Share and discuss community member projects
Threads: 78 Posts: 343
Hello XDK users,
our MQTT and Bosch IoT demo will not be available anymore in the future, since we are working on new features for these XDK topics. We hope to release these features soon, stay tuned!
It would make sense to keep the current version available, until the new features are released.
Is there another way to try MQTT on XDK ?
Is it still possible to get the MQTT demo ?
Hello Wael, Welcome to the XDK community. We apologize for the inconveniences that are caused by the demos no longer being available. These were outdated and no longer supported for the current XDK-Workbench 3.1.0. But with the XDK-Workbench 3.0.0, MQTT is a part of the SDK of the XDK and does no longer need to be integrated with external libraries. Furthermore, a guide about how to use the integrated MQTT API will available soon. Please let me know if that was helpful and do not hesitate to ask if you have further questions. Kind regards, Franjo
Thank you for your response.
Now I am testing with the Serval_Mqtt.h available in the XDK-Workbench 3.1.0 , and following the given example in Serval_Mqtt.h. I try to connect to a broker, then publish a message.
It looks like the API is always returning success codes !
Whatever I pass as broker address (i.e. a false address), it returns success.
I tried with a broker (mosquitto) in my local network. The Serval_Mqtt API returns success after connect and the isConnected function returns true. Mqtt_publish function also returns true. However, looking at my broker's logs, there is nothing happening. Also I listened to the network (with tcpdump): nothing coming from the XDK device.
I also tried with the test.mosquitto.org broker. Not working.
Looking forward to having the new MQTT guide.
Hello Wael, as the MQTT API is quite difficult to use, we have decided to upload the guide on an external server temporarily. The official release is experiencing delay, but the guide is already finished. You can download the guide by following this link here. Additionally, regarding your issue: The function Mqtt_connect() returns true if the XDK can establish a connection on TCP level. That does not neccessarily mean that the server recognizes this as an MQTT connection. Perhaps the cause is an improper setting of the session struct's target attribute. Anyhow, I think this issue will be solved if you follow the advice from the guide, since the API description is not quite helpful in regards to troubleshooting. Please let me if that was helpful and do not hesitate to ask if you have further questions. Kind regards, Franjo