Quectel BG96 module suddenly turns off when receiving +CEREG: 2

Hi everyone

I’m making a firmware for the Quectel BG96 module (using LTE IoT 2 click) so that it configures itself when it turns on and communicates with a server. NB IoT and LTE M1 LPWAN technologies are being prioritized to make the connection. It performs the configuration correctly but when it proceeds to register with the network it suddenly turns off when it receives +CEREG: 2 (“Not registered, but MT is currently trying to attach or searching an operator to
register to.”). I have no idea what the cause could be, I’ve tried to reset it to factory settings, turn the power on and off, and sometimes it works and registers correctly but other times it gives this error. The module is being supplied with enough power, so that can’t be it.

The fault consists in that when it starts searching for a network to register with, the module turns off but the code continues to run as expected, no error message is received.

If anyone knows what this error could be or how to solve it I would be happy to hear :smile:.

Below I add a screenshot of what the failure looks like in an energy consumption graph.

Can you provide your debug AT log?

Yes, of course, here is my log of the messages I send and receive from the module. This log is two cycles of the configuration (it is repeated after the failure, it is programmed to perform the configuration again).

--------------recibido--------------

RDY
--------------recibido--------------

+CFUN: 1
--------------recibido--------------

+CPIN: READY

+QU--------------recibido--------------

+QUSIM: 1
--------------recibido--------------

+QIND: SMS DONE
--------------recibido--------------

APP RDY
--------------enviado-------------
ATE0
--------------recibido--------------
ATE0

OK
--------------enviado-------------
AT+CFUN=4
--------------recibido--------------

OK
--------------enviado-------------
AT+CPIN?
--------------recibido--------------

+CPIN: READY

OK
--------------enviado-------------
AT+COPS=0
--------------recibido--------------

OK
--------------enviado-------------
AT+QCFG="nwscanseq",00,1
--------------recibido--------------

OK
--------------enviado-------------
AT+QCFG="nwscanmode",0,1
--------------recibido--------------

OK
--------------enviado-------------
AT+QCFG="iotopmode",2,1
--------------recibido--------------

OK
--------------enviado-------------
AT+QCFG="band",0,84,80084
--------------recibido--------------

OK
--------------enviado-------------
AT+QCFG="roamservice",255,1
--------------recibido--------------

OK
--------------enviado-------------
AT+CEREG=1
--------------recibido--------------

OK
--------------enviado-------------
AT+QPSMS=1,,,"00100010","00000000"
--------------recibido--------------

OK
--------------enviado-------------
AT+QPSMEXTCFG=3,2,120,5,120,3
--------------recibido--------------

OK
--------------enviado-------------
AT+QCFG="servicedomain",2,1
--------------recibido--------------

OK
--------------enviado-------------
AT+QURCCFG="urcport","uart1"
--------------recibido--------------

OK
--------------enviado-------------
AT+QCFG="psm/urc",0
--------------recibido--------------

OK
--------------enviado-------------
AT+QCSCON=0
--------------recibido--------------

OK
--------------enviado-------------
AT+QICSGP=1,1,"iot.1nce.net","","",1
--------------recibido--------------

OK
--------------enviado-------------
AT+QCFG="psm/enter",1
--------------recibido--------------

OK
--------------enviado-------------
AT+CFUN=1,0
--------------recibido--------------

OK

+QIND: SMS DONE
--------------recibido--------------

+CEREG: 2
--------------recibido--------------

RDY
--------------recibido--------------

+CFUN: 1
--------------recibido--------------

+CPIN: READY
--------------recibido--------------

+QUSIM: 1
--------------recibido--------------

+QIND: SMS DONE
--------------recibido--------------

APP RDY
--------------enviado-------------
ATE0
--------------recibido--------------
ATE0

OK
--------------enviado-------------
AT+CFUN=4
--------------recibido--------------

OK
--------------enviado-------------
AT+CPIN?
--------------recibido--------------

+CPIN: READY

OK
--------------enviado-------------
AT+COPS=0
--------------recibido--------------

OK
--------------enviado-------------
AT+QCFG="nwscanseq",00,1
--------------recibido--------------

OK
--------------enviado-------------
AT+QCFG="nwscanmode",0,1
--------------recibido--------------

OK

....

Please remove this command and try again

If I remove AT+CFUN=1,0, the module does not become fully operational again and is unable to register to any network. If I remove AT+CFUN=4 and AT+CFUN=1,0, the module fails to search for any network CEREG: 0 (Not registered. MT is not currently searching an operator to register to.)

you can run

AT+CFUN=0
then
AT+CFUN=1

The same error occurs but it seems to always happen at ~12 seconds after AT+CFUN=1, at these moments only the URC message from CEREG is being waited for, no extra command is sent in between.

You will need to provide an AT log with a timestamp

Hi Herbert, here is the log with timestamps for each message (seconds and milliseconds). As you can see, no ERROR message appears after displaying “+CEREG: 2” URC. The module simply experiences a power drop, and proceeds to reboot (remember that this reboot is caused by the way I have written the program, otherwise it would stay off). I have tested using GSM and this error does not occur, I also have evidence that the code works correctly occasionally, could this unexpected shutdown be related to a difficulty when logging with the network due to signal quality?

19s930:--------------recibido--------------
19s931:
RDY
19s948:--------------recibido--------------
19s948:
+CFUN: 1
20s797:--------------recibido--------------
20s797:
+CPIN: READY
20s798:--------------recibido--------------
20s798:
+QUSIM: 1
20s846:--------------recibido--------------
20s846:
APP RDY
20s847:--------------enviado-------------
20s847:ATE0
20s847:--------------recibido--------------
20s848:ATE0

O20s848:--------------recibido--------------
20s848:
OK
20s879:--------------recibido--------------
20s880:
+QIND: SMS DONE
20s922:--------------enviado-------------
20s922:AT+CFUN=4
20s940:--------------recibido--------------
20s940:
OK
20s972:--------------enviado-------------
20s972:AT+CPIN?
20s973:--------------recibido--------------
20s974:
+CPIN: READY

OK
21s773:--------------enviado-------------
21s773:AT+COPS=0
21s776:--------------recibido--------------
21s776:
OK
21s823:--------------enviado-------------
21s823:AT+QCFG=“nwscanseq”,00,1
21s826:--------------recibido--------------
21s826:
OK
21s874:--------------enviado-------------
21s874:AT+QCFG=“nwscanmode”,0,1
21s875:--------------recibido--------------
21s875:
OK
21s923:--------------enviado-------------
21s924:AT+QCFG=“iotopmode”,2,1
21s925:--------------recibido--------------
21s925:
OK
21s974:--------------enviado-------------
21s974:AT+QCFG=“band”,0,84,80084
21s977:--------------recibido--------------
21s977:
OK
22s775:--------------enviado-------------
22s775:AT+QCFG=“roamservice”,255,1
22s776:--------------recibido--------------
22s776:
OK
22s825:--------------enviado-------------
22s825:AT+CEREG=1
22s826:--------------recibido--------------
22s826:
OK
22s875:--------------enviado-------------
22s875:AT+QPSMS=1,“00100010”,“00000000”
22s876:--------------recibido--------------
22s877:
OK
22s925:--------------enviado-------------
22s925:AT+QPSMEXTCFG=3,2,120,5,120,3
22s927:--------------recibido--------------
22s927:
OK
22s976:--------------enviado-------------
22s976:AT+QCFG=“servicedomain”,2,1
22s977:--------------recibido--------------
22s977:
OK
23s776:--------------enviado-------------
23s776:AT+QURCCFG=“urcport”,“uart1”
23s778:--------------recibido--------------
23s778:
OK
23s827:--------------enviado-------------
23s827:AT+QCFG=“psm/urc”,0
23s828:--------------recibido--------------
23s828:
OK
23s876:--------------enviado-------------
23s876:AT+QCSCON=0
23s877:--------------recibido--------------
23s877:
OK
23s927:--------------enviado-------------
23s927:AT+QICSGP=1,1,“iot. 1nce. net”,“”,“”,1
23s931:--------------recibido--------------
23s932:
OK
23s977:--------------enviado-------------
23s978:AT+QCFG=“psm/enter”,1
23s979:--------------recibido--------------
23s979:
OK
24s778:--------------enviado-------------
24s778:AT+CFUN=1,0
24s780:--------------recibido--------------
24s780:
OK

+QIND: SMS DONE
37s796:--------------recibido--------------
37s796:
+CEREG: 2
42s914:--------------recibido--------------
42s914:
RDY
42s931:--------------recibido--------------
42s931:
+CFUN: 1
43s786:--------------recibido--------------
43s786:
+CPIN: READY

+QUSIM:43s786:--------------recibido--------------
43s786:
+QUSIM: 1
43s845:--------------recibido--------------
43s845:
APP RDY
43s845:--------------enviado-------------
43s846:ATE0
43s846:--------------recibido--------------
43s846:ATE0

OK
43s865:--------------recibido--------------
43s866:
+QIND: SMS DONE
43s896:--------------enviado-------------
43s896:AT+CFUN=4
43s915:--------------recibido--------------
43s915:
OK
43s946:--------------enviado-------------
43s946:AT+CPIN?
43s947:--------------recibido--------------
43s948:
+CPIN: READY

OK
43s997:--------------enviado-------------
43s997:AT+COPS=0
44s750:--------------recibido--------------
44s750:
OK
44s796:--------------enviado-------------
44s796:AT+QCFG=“nwscanseq”,00,1
44s799:--------------recibido--------------
44s799:
OK
44s847:--------------enviado-------------
44s847:AT+QCFG=“nwscanmode”,0,1
44s848:--------------recibido--------------
44s848:
OK
44s897:--------------enviado-------------
44s898:AT+QCFG=“iotopmode”,2,1
44s899:--------------recibido--------------
44s899:
OK
44s948:--------------enviado-------------
44s948:AT+QCFG=“band”,0,84,80084
44s952:--------------recibido--------------
44s952:
OK
44s999:--------------enviado-------------
44s999:AT+QCFG=“roamservice”,255,1
45s750:--------------recibido--------------
45s750:
OK
45s798:--------------enviado-------------
45s798:AT+CEREG=1
45s799:--------------recibido--------------
45s799:
OK
45s849:--------------enviado-------------
45s849:AT+QPSMS=1,“00100010”,“00000000”
45s850:--------------recibido--------------
45s851:
OK
45s899:--------------enviado-------------
45s899:AT+QPSMEXTCFG=3,2,120,5,120,3
45s901:--------------recibido--------------
45s901:
OK
45s950:--------------enviado-------------
45s950:AT+QCFG=“servicedomain”,2,1
45s951:--------------recibido--------------
45s951:
OK
46s750:--------------enviado-------------
46s750:AT+QURCCFG=“urcport”,“uart1”
46s751:--------------recibido--------------
46s751:
OK
46s800:--------------enviado-------------
46s800:AT+QCFG=“psm/urc”,0
46s801:--------------recibido--------------
46s801:
OK
46s850:--------------enviado-------------
46s851:AT+QCSCON=0
46s851:--------------recibido--------------
46s851:
OK
46s901:--------------enviado-------------
46s901:AT+QICSGP=1,1,“iot.1nce.net”,“”,“”,1
46s905:--------------recibido--------------
46s906:
OK
46s952:--------------enviado-------------
46s952:AT+QCFG=“psm/enter”,1
46s953:--------------recibido--------------
46s953:
OK
47s751:--------------enviado-------------
47s751:AT+CFUN=1,0
47s753:--------------recibido--------------
47s753:
OK

+QIND: SMS DONE
57s916:--------------recibido--------------
57s916:
+CEREG: 2

Reboot? It’s not your programming? Please check the power supply or hardware

The module is being supplied with up to 1A.

Yes, the code I have developed (knowing that the failure of an unexpected shutdown occurs just after receiving CEREG: 2), I have programmed it so that in each check of the registration status (CEREG) it also performs a check of whether the module is on or off. If it is off, it proceeds to turn it on and repeat the same process.

I have not been able to identify what could be the cause of this failure, I have tried with replacement modules that we had and the same thing happened.

The same thing continues to happen by cutting the code and without putting the restart process, and changing the configuration to work with GPRS, it does correctly connect. I must also say that the failure I am describing does not happen 100% of the time, but in a very high percentage, therefore the configuration of the module should be correct if it has managed to connect.

P.S.: I know if the module has been turned off by checking a pin.