6 years ago.

QoS 2 not responded

Hi Team,

I am trying HelloMQTT on FRDM-K64F board, commenting out LCD lines. It works fine for QoS 0 and 1, but the client is stopping at receiving QoS 2.

Thank you for your help.


Question relating to:

Sample MQTT program - simple send and receive

3 Answers

5 years, 9 months ago.


I am receiving junk characters or some previous data appended to my currently subscribed message. I have enabled clean session and not enabled any retention. Your suggestions will be very useful.

Regards, Sriram

6 years ago.

I've updated HelloMQTT now, so it should work for you. A change in the underlying library meant that QoS 2 processing was switched off, unless

  1. define MQTTCLIENT_QOS2 1

was used.

I also made it easy to not use the LCD screen by setting #define USE_LCD 0.

6 years ago.

Hi Ian,

Thank you for your prompt response.

It worked!

Just one thing, I see received message of QoS 2 with "qos 1", not sure if this is as expected.

Message arrived: qos 1, retained 0, dup 0, packetid 2 Payload Hello World! QoS 2 message from app version 0.500000

Even minor was that some lcd.cls() got error when USE_LCD is 0. I suppose we can eliminate them.


I made a further update. Removed those lcd.cls() calls still remaining, and changed the subscription to be at QoS 2 (it was at QoS 1 before).

posted by Ian Craggs 30 Jul 2015