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
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.
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