Unable to activate context

Using the python library provided with the BG96 app shield, I’m attempting to establish a TCP connection (eventually an MQTT connection). However, when I attempt to activate the context, the program hangs.

I’m following the signal flow from the BG96 TCP documentation. Here are the commands

# Echo on
ATE1
OK

APP RDY

# Enable verbose
AT+CMEE=2
OK

# Enable network registration unsolicited result code
AT+CGREG=1
OK

# Query (U)SIM Card Status
AT+CPIN?
+CPIN: READY

OK

# Query PS service
AT+CGREG?
+CGREG: 1,4

OK

# Configure PDP context
AT+QICSGP=1,1,"hologram","","",1
OK

# Active context
# this never returns!
AT+QIACT=1

Any thoughts?

Thanks!
Ken

Hi Ken,

Please help to provide the return value of the following AT commands.

AT+QCFG=“band”
AT+QCFG=“nwscanseq”
AT+QCFG=“nwscanmode”
AT+QCFG=“iotopmode”
AT+CSQ
AT+QCSQ
AT+COPS?
AT+CGATT?
AT+CREG?
AT+CGDCONT?

Thanks for your reply @ensar.

I found some success with minicomm. I have found that when I do it in python, it eventually works if I wait for a while. So it seems that the python code is overly conservative in timeouts, but eventually works.

I thought it hung indefinitely, but I can’t reproduce that. Also, it was only connecting 2G before, but now its LTE. I’m not sure how I fixed it. :slight_smile:

Thanks,
Ken

BTW, here are the answers to your query:

AT+QCFG="band"
+QCFG: "band",0xf,0x400a0e189f,0xa0e189f

OK
AT+QCFG="nwscanseq"
+QCFG: "nwscanseq",020301

OK
AT+QCFG="nwscanmode"
+QCFG: "nwscanmode",0

OK
AT+QCFG="iotopmode"
+QCFG: "iotopmode",0

OK
AT+CSQ
+CSQ: 23,99

OK
AT+QCSQ
+QCSQ: "CAT-M1",0,-140,147,-3

OK
AT+COPS?
+COPS: 0,0,"AT&T Hologram",8

OK
AT+CGATT?
+CGATT: 1

OK
AT+CREG?
+CREG: 0,5

OK
AT+CGDCONT?
+CGDCONT: 1,"IP","hologram","0.0.0.0",0,0,0,0

OK

Then finally:

AT+CGACT=1
OK

I also tried with the PDP context and it works now.

AT+QIACT=1
OK

I am glad to hear that. It is really good news.

Thank you!