[BG95] AT+QMTPUBEX in QoS=0 answering "+QMTPUB: 0,0,0" before message in sent ;(

Hello,

I’d like to power down my BG95 module as soon as possible after MQTT publish.
I do:
SEND: AT+QMTPUBEX=0,0,0,0,“UPLINK/ID”,“message”
WAIT FOR: +QMTPUB: 0,0,0
SEND: AT+CFUN=0

But this is not working :frowning: To get this work, I need to add a delay before turning off the modem:
SEND: AT+QMTPUBEX=0,0,0,0,“UPLINK/ID”,“message”
WAIT FOR: +QMTPUB: 0,0,0
WAIT FOR TIMER
SEND: AT+CFUN=0

I had messages received with TIMER=10ms but full reliability seems to be around 100ms (maybe this depends also on message size!). Any possibility to know when the message has been entirely fired (I know in QoS 0 we can’t have ACK from server but I’m looking for confirmation of message transmission at least ^^).

I did test with QoS 1: the additional timer is not needed but I’d like QoS 0 to save some energy and data.

Thank you for help,

Thomas

if Qos=0 , this result indicated the data has been sent to modem already .

to get the same result, you can do the similar thing in application layer not in mqtt session layer .

Hello Stephen,
Thank you for answering my question !

Did you try it?

What I’m looking for is: ACK from modem that message has been sent to the server so that I can do other stuff as soon as possible. But with QoS=0 I receive ACK from modem as soon as message is received by the modem (but I don’t know how long it takes to actually transmit it!). So how can I do similar thing in application layer without notification by the modem that message has been sent?

Thank you,

Thomas

Hello,
Any idea? I really don’t like those undocumented “delay” I have to insert in my code between [+QMTPUB: 0,0,0] (received from modem as soon as [AT+QMTPUBEX=0,0,0,0,“topic”,“message”" is sent] and [AT+QPOWD=1] sent to modem to turn it off.

IMHO you should change firmware to sent “+QMTPUB: 0,0,0” when modem has finished transmitting the data.