Good morning,
I am working with a BG77 modem and need to know how long the modem remains available for uplinks/downlinks after sending or receiving a message to/from a server.
In my research, I found the command “AT+QCSCON?” which can be used to display each of these changes via URCs. The problem is that I cannot obtain these state changes from the modem automatically. I can get these times manually by repeatedly executing the command, but it is inaccurate.
The commands I have been using are:
- AT+QCSCON=1
- AT+QINDCFG=“all”,1,0
- AT+QINDCFG=“csq”,1,0
An example of what I do before running these tests:
[2024-10-14 13:48:12:789_S:] ATI
[2024-10-14 13:48:12:854_R:] BG77LAR02A04_01.204.01.204
[2024-10-14 13:48:12:854_R:] OK
[2024-10-14 13:48:16:748_S:] AT+QCSCON?
[2024-10-14 13:48:16:807_R:] AT+QCSCON?
[2024-10-14 13:48:16:807_R:] +QCSCON: 0,0
[2024-10-14 13:48:16:807_R:] OK
[2024-10-14 13:48:18:117_S:] AT+QCSCON=1
[2024-10-14 13:48:18:172_R:] AT+QCSCON=1
[2024-10-14 13:48:18:172_R:] OK
[2024-10-14 13:48:20:205_S:] AT+QCSCON?
[2024-10-14 13:48:20:266_R:] AT+QCSCON?
[2024-10-14 13:48:20:266_R:] +QCSCON: 1,0
[2024-10-14 13:48:20:266_R:] OK
[2024-10-14 13:48:48:356_S:] AT+CSQ
[2024-10-14 13:48:48:426_R:] AT+CSQ
[2024-10-14 13:48:48:426_R:] +CSQ: 22,99
[2024-10-14 13:48:48:426_R:] OK
[2024-10-14 13:48:50:869_S:] AT+QINDCFG="all",1,0
[2024-10-14 13:48:50:931_R:] AT+QINDCFG="all",1,0
[2024-10-14 13:48:50:931_R:] OK
[2024-10-14 13:49:09:629_S:] AT+QINDCFG="csq",1,0
[2024-10-14 13:49:09:684_R:] AT+QINDCFG="csq",1,0
[2024-10-14 13:49:09:684_R:] OK
[2024-10-14 13:49:12:877_S:] AT+QMTCFG="keepalive",0,120
[2024-10-14 13:49:12:930_R:] AT+QMTCFG="keepalive",0,120
[2024-10-14 13:49:12:930_R:] OK
[2024-10-14 13:49:14:069_S:] AT+QMTCFG="timeout",0,60,3,1
[2024-10-14 13:49:14:126_R:] AT+QMTCFG="timeout",0,60,3,1
[2024-10-14 13:49:14:126_R:] OK
[2024-10-14 13:49:15:445_S:] AT+QMTCFG="recv/mode",0,1,0
[2024-10-14 13:49:15:510_R:] AT+QMTCFG="recv/mode",0,1,0
[2024-10-14 13:49:15:510_R:] OK
[2024-10-14 13:49:17:325_S:] AT+QMTOPEN=0,"test.mosquitto.org",1883
[2024-10-14 13:49:17:380_R:] AT+QMTOPEN=0,"test.mosquitto.org",1883
[2024-10-14 13:49:17:380_R:] OK
[2024-10-14 13:49:19:067_R:] DSR:0 CTS:0 (RI:1) DCD:0
[2024-10-14 13:49:19:116_R:] +QMTOPEN: 0,0
[2024-10-14 13:49:19:187_R:] DSR:0 CTS:0 (RI:0) DCD:0
[2024-10-14 13:49:21:829_S:] AT+QMTCONN=0,"client"
[2024-10-14 13:49:21:890_R:] AT+QMTCONN=0,"client"
[2024-10-14 13:49:21:890_R:] OK
[2024-10-14 13:49:23:475_R:] DSR:0 CTS:0 (RI:1) DCD:0
[2024-10-14 13:49:23:527_R:] +QMTCONN: 0,0,0
[2024-10-14 13:49:23:595_R:] DSR:0 CTS:0 (RI:0) DCD:0
[2024-10-14 13:49:24:901_S:] AT+QMTSUB=0,1,"subscription_test",1
[2024-10-14 13:49:24:966_R:] AT+QMTSUB=0,1,"subscription_test",1
[2024-10-14 13:49:24:966_R:] OK
[2024-10-14 13:49:26:554_R:] DSR:0 CTS:0 (RI:1) DCD:0
[2024-10-14 13:49:26:617_R:] +QMTSUB: 0,1,0,1
[2024-10-14 13:49:26:674_R:] DSR:0 CTS:0 (RI:0) DCD:0
[2024-10-14 13:49:39:837_S:] AT+QCSCON?
[2024-10-14 13:49:39:898_R:] AT+QCSCON?
[2024-10-14 13:49:39:898_R:] +QCSCON: 1,0
[2024-10-14 13:49:39:898_R:] OK
[2024-10-14 13:49:40:662_R:] +QMTRECV: 0,0
[2024-10-14 13:49:40:941_S:] AT+QCSCON?
[2024-10-14 13:49:41:003_R:] AT+QCSCON?
[2024-10-14 13:49:41:003_R:] +QCSCON: 1,1
[2024-10-14 13:49:41:003_R:] OK
[2024-10-14 13:49:42:189_S:] AT+QCSCON?
[2024-10-14 13:49:42:245_R:] AT+QCSCON?
[2024-10-14 13:49:42:245_R:] +QCSCON: 1,1
[2024-10-14 13:49:42:245_R:] OK
[2024-10-14 13:49:43:668_S:] AT+QCSCON?
[2024-10-14 13:49:43:733_R:] AT+QCSCON?
[2024-10-14 13:49:43:733_R:] +QCSCON: 1,1
[2024-10-14 13:49:43:733_R:] OK
[2024-10-14 13:49:46:413_S:] AT+QCSCON?
[2024-10-14 13:49:46:478_R:] AT+QCSCON?
[2024-10-14 13:49:46:478_R:] +QCSCON: 1,0
[2024-10-14 13:49:46:478_R:] OK
[2024-10-14 13:49:52:228_S:] AT+QMTRECV?
[2024-10-14 13:49:52:288_R:] AT+QMTRECV?
[2024-10-14 13:49:52:288_R:] +QMTRECV: 0,1,0,0,0,0
[2024-10-14 13:49:52:288_R:] OK
[2024-10-14 13:49:57:613_S:] AT+QCSCON?
[2024-10-14 13:49:57:671_R:] AT+QCSCON?
[2024-10-14 13:49:57:671_R:] +QCSCON: 1,0
[2024-10-14 13:49:57:671_R:] OK
[2024-10-14 13:49:58:605_R:] +QMTRECV: 0,1
[2024-10-14 13:49:58:605_R:] +QMTRECV: 0,2
[2024-10-14 13:50:00:101_S:] AT+QCSCON?
[2024-10-14 13:50:00:166_R:] AT+QCSCON?
[2024-10-14 13:50:00:166_R:] +QCSCON: 1,1
[2024-10-14 13:50:00:166_R:] OK
[2024-10-14 13:50:01:213_S:] AT+QCSCON?
[2024-10-14 13:50:01:270_R:] AT+QCSCON?
[2024-10-14 13:50:01:270_R:] +QCSCON: 1,1
[2024-10-14 13:50:01:270_R:] OK
[2024-10-14 13:50:02:189_S:] AT+QCSCON?
[2024-10-14 13:50:02:246_R:] AT+QCSCON?
[2024-10-14 13:50:02:246_R:] +QCSCON: 1,1
[2024-10-14 13:50:02:246_R:] OK
[2024-10-14 13:50:03:221_S:] AT+QCSCON?
[2024-10-14 13:50:03:287_R:] AT+QCSCON?
[2024-10-14 13:50:03:287_R:] +QCSCON: 1,1
[2024-10-14 13:50:03:287_R:] OK
[2024-10-14 13:50:04:621_S:] AT+QCSCON?
[2024-10-14 13:50:04:676_R:] AT+QCSCON?
[2024-10-14 13:50:04:676_R:] +QCSCON: 1,0
[2024-10-14 13:50:04:676_R:] OK
Note 1: Recently, I have been working with CoAP and MQTT, obtaining the same result with both.
Note 2: The current firmware is BG77LAR02A04_01.204.01.204