Hi,

I run the sample SendDataOverMQTT and connect to mosquitto. After some minutes MQTT publishing fails with the following error message:

INFO | XDK DEVICE 1: AppControllerValidateWLANConnectivity : Check out WLAN connectivity ...
 INFO | XDK DEVICE 1: MqttEventHandler : Event - 15
 INFO | XDK DEVICE 1: MqttEventHandler : Event - 14
 INFO | XDK DEVICE 1: AppMQTTSubscribeCB : #128, Incoming Message:
 INFO | XDK DEVICE 1: 	Topic: BCDS/XDK110/example/out
 INFO | XDK DEVICE 1: 	Payload: 
 INFO | XDK DEVICE 1: """
 INFO | XDK DEVICE 1: Environmental Data -
 INFO | XDK DEVICE 1: 	Humidity : 45
 INFO | XDK DEVICE 1: 	Pressure : 100982
 INFO | XDK DEVICE 1: 	Temperature : 20.831000ø
 INFO | XDK DEVICE 1: """
 INFO | XDK DEVICE 1: AppControllerValidateWLANConnectivity : Check out WLAN connectivity ...
 INFO | XDK DEVICE 1: MqttEventHandler : Event - 17
 INFO | XDK DEVICE 1: MqttEventHandler : Event - 4
 INFO | XDK DEVICE 1: AppControllerFire : MQTT publish failed 
 INFO | XDK DEVICE 1: Error in XDK110 Application package.
 INFO | XDK DEVICE 1: Error in XDK110 Application package.
 INFO | XDK DEVICE 1: 	Package ID: 153
 INFO | XDK DEVICE 1: 	Package ID: 153
 INFO | XDK DEVICE 1: 	Module ID: 39
 INFO | XDK DEVICE 1: 	Module ID: 39
 INFO | XDK DEVICE 1: 	Severity code: 2
 INFO | XDK DEVICE 1: 	Severity code: 2
 INFO | XDK DEVICE 1: 	Error code: 123
 INFO | XDK DEVICE 1: 	Error code: 125

I added extra debug msg. to rule out any issues with the WIFI connectivity, which does not seem to be the case here.

What might be the issue?

Thanks in advance.

Regards Christof

0 (0 Stimmen)
RE: SendDataOverMQTT fails in version workbench 3.6
Antwort
30.04.19 05:50 als Antwort auf Christof Strack.

Hi,

I found out if I reduce the QoS property from:

MQTT_QOS_AT_LEAST_ONCE

to

MQTT_QOS_AT_MOST_ONE

and then the MQTT sample runs stable over a long period.

--Christof

0 (0 Stimmen)
RE: SendDataOverMQTT fails in version workbench 3.6
Antwort
02.05.19 07:57 als Antwort auf Christof Strack.

Hello Christof,

it seems you already solved your problem by your self. I just want to explain a few things I know about this error. Maybe it will help you in the future.

Unfortunately the MQTT library on the XDK only supports QoS level 1 as the maximum QoS level. You are not able to publish data with a QoS level of 2.

Also the errors your received have the following meaning:

Event - 17: MQTT_PUBLISH_SEND_FAILED

Event - MQTT_CONNECTION_CLOSED

So it seems due to the failed publish event the connection to the broker got closed.

I hope that will be helpfull. If you have any further questions dont hesitate to ask.

Best regards,

Christian

0 (0 Stimmen)