I'm trying to implement a MQTT-client based on the embedded variant of Paho. This is what my code looks like (pseudocode of the relevant parts):
Â Âstruct mqtt_inst_dataÂ Â*instData;
Â ÂMQTTPacket_connectDataÂ Âdata="">
Â ÂMQTTStringÂ Â Â Â Â Â Â Âtopic=MQTTString_initializer;
Â Â-> open TCP/IP connection here
Â Âlen = MQTTSerialize_connect(buf,MAX_BUFLEN,&data); /* 1 */
Â Âlen+=MQTTSerialize_publish(buf+len,MAX_BUFLEN-len,0,3,0,0,topic,(unsigned char*)payload,payloadlen); /* 2 */
Â Âlen+=MQTTSerialize_disconnect(buf+len,MAX_BUFLEN-len); /* 3 */
Â Â-> send data "buf" with length "len" here
Â Â-> close TCP/IP connection
1538382438: New connection from 192.168.188.1 on port 1883.
1538382446: New client connected from 192.168.188.1 as C85B76DF5FF6 (c1, k60).
1538382446: No will message specified.
1538382446: Sending CONNACK to C85B76DF5FF6 (0, 0)
1538382446: Invalid QoS in PUBLISH from C85B76DF5FF6, disconnecting.
1538382446: Socket error on client C85B76DF5FF6, disconnecting.
Where/how do I have to set this QoS stuff exactly?ÂMQTTPacket_connectData has a sub-structureÂMQTTPacket_willOptions which itself contains a member "qos" - but what do I have to do with this structure exactly? Or is this error caused by some other problem?