MQTT MC60 Library

I running an MQTT Client application using MC60 GPRS module. My question is simple. Since there is no particular AT command for sending an MQTT PING in MC60 MQTT library, I want to know if there is any other way through which we can send PINGREQ and receive the response as PINGACK. I’m quite sure there is some way by which we can send MQTT PINGREQ as the flow chart in the GSM_MQTT Application Note makes a mention of the client sending a PINGREQ packet. Looking forward for a solution from someone.

Dear Sir,
Could you share why you want to use MQTT PING command ? For MQTT application, there have no special AT command to set it, if you want to keep alive the connection, you can try the following command. Thanks!

@Kyson , As I said I’m running a client application which is an MQTT Client, I want to periodically send an MQTT PING command at the application layer for the purpose of monitoring the network health with the broker.
I want to know does assigning a value of keep alive time automatically sends a PINGREQ after that time is elapsed or does it mean that an activity has to happen within the time specified in order to avoid a graceful disconnect ?

Dear Sir,
Please check the explanation about keep alive time. Thanks!
For your application, you can try to use the keepalive function or send data to server periodic. Thanks!

Dear @Kyson
I understand what a keep alive timer is. What my real questions was how has the keep alive timer been used in the stack implementation of MQTT for MC60 module. Some stacks use the value for keep alive timer to send a PINGREQ thereby fulfilling the criteria for maintaining the connection whereas some stacks just run a timer for the value of keep alive and it’s responsibility of the application to ensure an activity within the said time.
As far as I can understand from your response, MC60 has no provision for sending an MQTT PING request whatsoever and in order to monitor network health i should rather use the PUBLISH command and validate based on its successful response.
Please correct me if I’m wrong.

if MQTT keep-alive-interval is set, MQTT stack send PING-REQUEST …
Set time and see PING-RESPONSE on broker
If broker not receive PING 1.5 of keep-alive time will close the connection

Hi Wizio, iam looking for a example of mqtt communication despite that is given in the mqtt AT command manual for MC60. any help is appreciated.

thanks in advance

ask from your local Quectel support document:

Please check the following document. Thanks!
Quectel_GSM_MQTT_Application_Note_V1.2.pdf (518.0 KB)

hi kyson,
i have the document, but when iam trying to use any AT command for MQTT in parameters it is mentioned as which actually confusing me. this is that returned after opening a TCP socket or it is a random value of 0-5. just looking for some sample code…

Thanks in advance

Dear Sir,
Please check the following example AT sequence. Thanks!
MQTT with SSL:
GSM MQTT AT Logs.pdf (51.5 KB)

MQTT without SSL:

Dear Sir,
Please check the following answers to your question. Thanks!
1).Please check the following picture, here the 0 is just in the range of 0~5,it is your choice to set it.

2)About the AT+QMTCFG, you can set it according to your MQTT server requirement, it is not mandatory. If you server have no such requirement, you do not need to set it. Thanks!
3)if you subscribe the topic, and it will have URC information to notify the message. Thanks!

Thank you kyson,

Hi This is Raghu, continuation for above thread.

i’ll try with the given information.
actually iam trying to implement MQTT using RIL services. is it possible? if yes,

  1. can i read the publish data by other client on my subscribed channel?
  2. in AT commands for Publishing we have to wait until “<” arrives, what if iam using RIL for it, will it be possible to publish the data with out waiting for this “<” ?

any help would be appreciated,
Thank you.

Dear Raghu,
Thanks for your inquiry in Quectel forum.
Yes, of course you can implement MQTT use RIL service.
If you already subscrib the topic, and other client have update the topic, of course you can get the data.
Actually, it is the same as RIL service. You also need to waiting for “<”. Thanks!