SQNSMQTTPUBLISH async response

Hi,

I’m running into a strange issue, I’m sending the following command

send: AT+SQNSMQTTPUBLISH=0,“test”,28\r\n
response: \r\n>
send: “{“data”:{“test”:“test 1”}}”
response: +SQNSMQTTPUBLISH: 2
response: OK

waiting for 2 minutes with no response

send: AT\r\n
response: ERROR
response: +SQNSMQTTONPUBLISH: 0,2,0

it is sending ERROR and SQNSMQTTONPUBLISH back to back so is there something else that we need to do to get the SQNSMQTTONPUBLISH async response without having to send any other commands?

also if i wait for less time ~2-3 seconds instead of the 2 minutes it does the same

Hi

The AT command doesn’t match our AT reference manual, the 3rd parmater is QoS, and its range is 0,1,2. May be you executed: AT+SQNSMQTTPUBLISH=0,“test”,,28

From the later print, AT returns ERROR, I suspect the data you sent is not encoded as ASCII characters lead to its length is longer than 28 bytes. There is some characters left in the input buffer, and it is sent to modem together with AT together lead to ERROR. You can confirm this by sending \r\n just after you type “{“data”:{“test”:“test 1”}}”

  • If there are characters left in the input buffer, you will get ERRER

  • If the input buffer is empty you will not get any output.

    What software did you use for the AT operation? May be you can try Tera term on Windows to see if it works?

Hi

you are aright im sending with like AT+SQNSMQTTPUBLISH=0,“test”,,28

i have an extra space at the end making it one extra character long and that is why i get an ERROR after the AT\r\n command

so i fixed that and send \r\n after 60 seconds and get no ERROR message. but that is still not solving my problem with the URCs not being sent during that 60 seconds waiting period, as soon as i send the \r\n it send the URC i am expecting with a response URC of +SQNSMQTTONPUBLISH: 0,2,0

so is there something else i should look into why the URC would be held until a new message is sent?

ive also attached a logic analyzer(using saleae logic capture) so you can see byte by byte with a timeline what is happening

mqttPublishURC.sal (5.4 KB)

what is happening is roughly this:

SEND: AT+SQNSMQTTPUBLISH=0,“testTopic1Template”,35

RECEIVE: >

SEND: {“temperature”:22.5,“status”:“OK”}

RECEIVE: +SQNSMQTTPUBLISH: 1

RECEIVE: OK

(wait 60 seconds)

SEND: \r\n

RECEIVE: +SQNSMQTTONPUBLISH:0,1,0