MQTT publish failed
19. 4. 16 오전 10:40

Hello everyone, 

I'm using the example SendDataOverMQTT provied in the workbench.

I'm having problems publishing to the bosch mqtt broker, I have already:

 - Set the certificate in ServerCA.h file, modified the MQTT.h and XDK_MQTT.h;

//In line 443 of MQTT.c

StringDescr_wrap(&username, mqttConnect->Device_username);
MqttSession.username = username;

StringDescr_wrap(&password, mqttConnect->Device_password);
MqttSession.password = password;

//In line 434 of MQTT.c

MqttSession.MQTTVersion = 4

//And in MQTT_Connect_S of XDK_MQTT.h I added the username and password:

struct MQTT_Connect_S
    const char * ClientId; 
    const char * BrokerURL;
    uint16_t BrokerPort; 
    const char * Device_username; //Added
    const char * Device_password; //Added
    bool CleanSession; 
    uint32_t KeepAliveInterval; 

 - Eventually managed to connect and subscribe to a topic (QoS=1) however when i want to publish data relative to the sensors i always get the following "error":

 INFO | XDK DEVICE 1: MqttEventHandler : Event - 16
 INFO | XDK DEVICE 1: AppControllerFire : MQTT publish failed 
 INFO | XDK DEVICE 1: Error in XDK110 Application package.
 INFO | XDK DEVICE 1: 	Package ID: 153
 INFO | XDK DEVICE 1: 	Module ID: 39
 INFO | XDK DEVICE 1: 	Severity code: 2
 INFO | XDK DEVICE 1: 	Error code: 125

Also, in my Bosch IOT suite account I've subscribed to the HUB service, registered the device and created credentials for it.

I think the error might be related to Bosch Services has I've previously managed to publish to a different server.

0 (0 투표)
RE: MQTT publish failed
19. 4. 17 오전 5:45 as a reply to João Lago.

Hi Joao,

Could you tell me which server worked for you ?



0 (0 투표)
RE: MQTT publish failed
19. 4. 17 오후 3:43 as a reply to Priyashi Yadav.
Hi Yadav, the following server worked: tcp://
0 (0 투표)