MQTT to AWS
Risposta
09/08/19 12.47

Hi Community 
I have a problem with the XDK MQTT to AWS Program. 
In the log are this Message: 

 INFO | XDK DEVICE 3: AppControllerFireTask : AWS MQTT publish failed 
 INFO | XDK DEVICE 3: Error in XDK110 Application package.
 INFO | XDK DEVICE 3: 	Package ID: 153
 INFO | XDK DEVICE 3: 	Module ID: 39
 INFO | XDK DEVICE 3: 	Severity code: 2
 INFO | XDK DEVICE 3: 	Error code: 130

I have extended the Mqtt message with a device ID and a timestamp. The whole message arrives in the AWS, but the error in the log is always displayed. 

 

Anybody got an idea?

 

greetings 

 

0 (0 Voti)
RE: MQTT to AWS
Risposta
12/08/19 7.53 come risposta a Silvan Joos.

Hello Silvan,

The error code corresponds to RETCODE_MQTT_IPCONIG_FAIL(130) -> Conversion from IP address to string.

                if (0 > Ip_convertAddrToString(&brokerIpAddress, serverIpStringBuffer))
                {
                    retcode = RETCODE(RETCODE_SEVERITY_ERROR, RETCODE_MQTT_IPCONIG_FAIL);
                }

This conversion is done only during MQTT broker connection. The error will occur when the conversion failed. In that case, i expect the connection itself should have failed.

Can you please check whether connection and publish are successful ?

0 (0 Voti)
RE: MQTT to AWS
Risposta
12/08/19 8.05 come risposta a Silvan Joos.
RE: MQTT to AWS
+1 (1 Voto)
RE: MQTT to AWS
Risposta
13/08/19 6.46 come risposta a Saeid Kajlar.

Hi 

I don't know exactly what the mistake was, but it's okay now. 
Now I have two other problems...
- The MQTT messages arrive double in the AWS? 
- How can I send the current time stamp in the MQTT? 
The variable "tm" is only updated at startup...

 

regards

0 (0 Voti)