BG96, Missing TCP messages in sleep mode

Hello
I am developing a control terminal device using the BG96 module.
I have a question while developing the sleep mode function, so I inquired as follows.

This device maintains two mqtt/tcp connections using the bg96 module and provides service.
And in implementing the sleep mode of this device,
disconnect the mqtt connection of the BG96 module (maintain the tcp connection),
and command the sleep mode with “AT+QSCLK=1”.
At this time, the DTR pin is in a low/input floating state.

In this sleep state, if our own server sends a specific message to the bg96 module of this device, it is a function that wakes up the device by receiving an interrupt through the rx pin of the module.

This function usually works well, but it seems that the tcp message is not received after the sleep time of the bg96 module is maintained for more than 30 seconds. In other words, it seems that the tcp connection is automatically disconnected.

So, before the “AT+QSCLK=1” command, I tried to maintain the tcp connection with the “AT+QICFG=“tcp/keepalive”,1,120,25,10” command, but the result is still the same.

So, I ask if I am using this command incorrectly.

Hello

Sorry for the late response.
After configured this command should be working.Which FW are you using ?

B R
Linkin W

revision: BG96MAR04A04M1G
(Our board main chipset is STM32F405RGT6 and uses arduino based firmware.)
Configuration for basic communication connection is completed, mqtt and tcp communication is working well.
What Configuration you talking about?

I have also seen cases like
BG95-M2 tcp keep-alive network problems - IoT Modules / LPWA Module - Quectel Forums

If so, is it not possible to receive tcp messages in sleep state?

For other products, use the following command to maintain the tcp connection.
AT#SKTTO=0
AT#SCFGEXT=2,1,0,0,0,0

Hello,

The device is fixed somewhere right? because if the device in moving, that’'s will be cause Tracking area update.
And are you using CATM or NB netwokr?
I tried in myside with TCP messages, and it wakes up sleep mode as expected.

B R
Linkin WANG

It is the result of testing in a fixed place
We use CAT.M1 network.

Rather than wakeup the BG96 with a tcp message, just give the RISING signal to the connected rx pin of our MCU.
Actually, in sleep state of BG96, when it receives a tcp message,
it sends a signal to our MCU and MCU wakes up the BG96 with this event. (the DTR pin HIGH, “AT+QSCLK=0”)

As mentioned above, as a common phenomenon, and when receiving a tcp message,
BG96 gives a rising signal to our MCU In less than 30 seconds after sleep,
but gives no signal after 30 seconds or more.

Yes, RISING is good in myside when received server message.
Could you please help check if working under NB network?

It is difficult to change to NB due to the environment of our product.

And what do you mean by “configured” above?

And If you were successful, would it have happened without “AT+QICFG=“tcp/keepalive”,1,120,25,10” command, after 30 seconds or more?

The basic principle of TCP KeepAlive is to send a probe packet to the opposite end of the connection at regular intervals. If an ACK is received from the other party, it is considered that the connection is still alive. After a certain number of retries, it still does not receive a response from the other party, and it is discarded. the TCP connection.
So this command is not mandatory, It’s OK to disable or enable.
And now need to check logs to find root cuase i think.

OK. We’ll test it more internally and get the log and report back.

I tried to attach the log file, but it says that it is not possible for a new user.
How can I forward this log

Just send to email linkin.wang@quectel.com

As the last command(AT+QSCLK=1) in the log, bg96 goes to sleep, and after 30 seconds, when the server sends a tcp message, there is no reaction.
Therefore, the contents of this situation are the situation after the log.

Please let me know what logs you need to figure out this issue

So you create a TCP Listener and the module as a Server?
and i saw there is tcp incoming, this should be client right?

As it appears in the log, BG96 is connected as “TCP Listener” with “AT+QIOPEN” and “+QISTATE” commands, as Client.
And that’s right. bg96 get a tcp message, but that’s the case when bg96 went to sleep less than 30 seconds ago.

Is this issue related to bg96 connecting as client or server?

Should not relate as client or server.
And does this issue is easy to reproduce? sometime the network TAU will casue server or client miss message.
But better to provide Modem logs to check this if caused by network.

bg96 does not receive tcp messages AT ALL, after 30 seconds or more after bg96 goes to sleep with a command(AT+QSCLK=1). Not sometimes, but always.

OK, To get modem logs, the DM port connected to the PC was confirmed.
If so, where can I get quectel’s pc program that can get the modem log?

image

  1. Send AT+QCFG=“DBGCTL”,0
  2. AT+CFUN=0
  3. Open Log Tool and start to collect logs
  4. AT+CFUN=1
  5. try to reproduce issue
  6. Finished and stop collection
  7. log will saved at log path.

Here is Log Tool and short user guide.
https://cnquectel-my.sharepoint.com/:u:/g/personal/linkin_wang_quectel_com/EWY0vTpYowJHjMS25UfpleABdOx1cbli9_nWLMjAnDbNbg?e=76Kde8

I sent an email with the log attached.

Sorry, please see previous message, i missed one step.

I sent. check again please