Send data through MQTT
1/10/19 9:56 AM


I am new to this, I am trying to run the SendDataOverMqtt example in XDK work bench. I have a mosquitto broker running in my personal laptop. I am able to connect to wifi. But not able to connect to mosquitto broker.

when I try to run the code it puts up this error:

AppControllerFire : MQTT connection to the broker failed 
 Error in XDK110 Application package.
 Package ID: 153
 Module ID: 39
 Severity code: 2
 Error code: 114
I have attached a picturer of inputs for broker in .h file




0 (0 Votes)
RE: Send data through MQTT
1/10/19 4:04 PM as a reply to Charan C R.
Hello Charan,

First of all, let me welcome you to the XDK Community.

I will start with explaining the error code you received.
  1. Package ID 153: This means, that there is an issue in your project code.
  2. Module ID 39: This means, that the error comes from an issue with the MQTT module.
  3. Severity Code 2: This means, that the error is a general error, not a warning or fatal error.
  4. Error Code 114: This error means, the the connection failed.
The issue here is, that you missed to define the broker port, therefore no connection can be enabled, which obviously results in a failed connection.
Depending on the way you configured your mosquitto MQTT broker, you need to insert the proper broker port. If you have made no changes, you can use the default port 1883 .
To solve the issue, change the line 125 of the header file AppController.h to:


Please tell me if this was helpful, and do not hesitate to ask further questions.

Kind regards,
0 (0 Votes)