Recommended Power on/off:
1. Power off: Send AT+QPOWD and then
cut off power after 12 s or more.
2. Power on: Keep power key as low for
2 s, and then pull it to high.
Query (U)SIM Card Status:
Execute AT+CPIN. Reboot the module if
AT+CPIN? fails to identify (U)SIM card in
20 s.
PS Service:
1. If <stat> of AT+CGREG?/AT+CEREG?
equals 1 or 5, it means that the module
has registered on PS domain service in
LTE/EGRPS network.
2. Go to the next step no matter whether it
is registered on PS domain service in
60 s.
Configure a PDP Context:
Configure APN, user name, password and
authentication type by AT+QICSGP.
(AT+CGDCONT can only configure APN
information.)
Activate a PDP Context:
1. Activate the PDP context by
AT+QIACT=<contextID>.
2. Query IP address of the PDP
context by AT+QIACT?.
Notes:
a) All above commands should be
executed together in sequence.
b) Reboot the module if there is no
response for AT+QIACT in 150s.
c) If failed to deactivate the PDP
context for 3 times continuously,
then reboot the module.
3. Deactivate the PDP context:
reboot the module if there is no
response for AT+QIDEACT in
40 s.
Open Connection:
1. If it fails to get response of AT+QIOPEN in 150 s, close
the connection.
2. If it fails to open connection for 5 times continuously,
deactivate the PDP context first, and then re-activate the
PDP context and open connection again.
TCP Connection Maintenance and Detection:
1. Send data by AT+QISEND =<connectID>[,<send_length>].
It is recommended to periodically send a small data packet to the
remote end to maintain and detect the TCP connection.
2. Query sending ACK by AT+QISEND=<connectID>,0.
If the package is still not acknowledged after two minutes (query every
5 seconds, 24 times in total), the TCP connection may be abnormal.
Execute AT+QICLOSE to close the current connection, and then
execute AT+QIOPEN to re-establish the TCP connection.
Notes:
1. Please note to wait for the final response (for example OK, CME ERROR, CMS ERROR) of the last AT command before entering the next AT
command. Reboot the module if the module fails to get response in 60 s.
2. Reboot the module if the module has not got response of AT+QIACT in 150 s or response of AT+QICLOSE in 10 s and AT+QIDEACT in 40 s.
3. It is NOT recommended to frequently reboot the module. When the module has been continuously rebooted for 3 times due to failed AT command
execution, it can be rebooted immediately for the first time after that. If it still fails, reboot the module 10 minutes later for the second time,
30 minutes later for the third time, and one hour later for the fourth time.
BG96_TCP/IP_Application_Note
Reboot the
The PDP
module if
context is
there is no
deactivated
response in
successfully
40 s.
Deactivate
the PDP context by
AT+QIDEACT=
<contextID>
1. Fail to open connection
2. No response in 150 s.
Figure 1: Flow Chart of Using TCP/IP AT Commands
Power on the module
Send AT command and wait for the module to respond OK
Query (U)SIM card
status by AT+CPIN?
Identify (U)SIM card
Query PS service in 60 s
by AT+CGREG?/
AT+CEREG?
Configure the PDP Context by
AT+QICSGP/AT+CGDCONT
Activate the PDP context by
AT+QIACT=<contextID>
and AT+QIACT?
Fail to activate
Successfully activate PDP context
the PDP context
Open connection
by AT+QIOPEN
continuously for 5 times.
+QIOPEN: <connectID>,<err>
Send data by
AT+QISEND=<connectID>
Query sending
ACK by AT+QISEND=
<connectID>,0
Fail to get ACK in 90 s
Close connection
by AT+QICLOSE=
<connectID>
LPWA Module Series
BG96 TCP/IP Application Note
If identifying (U)SIM card
fails in 20s, reboot the
module.
If it fails in getting the PS
registration status, configure
the PDP context and then
execute AT+CFUN=0 and
AT+CFUN=1. If this still
fails, reboot the module.
1. Reboot the module if
there is no response in
150 s.
2. If deactivating the PDP
context fails for 3 times
continuously, then reboot
the module.
Get ACK
in 90s
OK
Reboot the module if there is
no response in 10 s.
7 / 52
Need help?
Do you have a question about the BG96 TCP/IP and is the answer not in the manual?
Questions and answers