LPWA Module Series
BG95&BG77&BG600L Series TCP/IP Application Note
BG95&BG77&BG600L_Series_TCP/IP_Application_Note 10 / 56
Power on the module
Query (U)SIM card
status by AT+CPIN?
Query (U)SIM Card Status:
Execute AT+CPIN. Reboot the module if
AT+CPIN? fails to identify (U)SIM card in
20 s.
Recommended Power on/off:
1. Power off: Send AT+QPOWD first. After
12 s or more, cut off the power supply.
2. Power on: Keep PWRKEY as low for
2 s, and then pull it to high.
Activate the PDP context by
AT+QIACT=<contextID>
and AT+QIACT?
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 40s.
Open connection
by AT+QIOPEN
Send data by
AT+QISEND=<connectID>
Query sending
ACK by AT+QISEND=
<connectID>,0
Close connection
by AT+QICLOSE=
<connectID>
Deactivate
the PDP context by
AT+QIDEACT=
<contextID>
Identify (U)SIM card
Successfully activate PDP context
Reboot the module if there is
no response in 10 s.
+QIOPEN: <connectID>,<err>
Get ACK
in 90 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
EGRPS/Cat M1 or NB-IoT network.
2. Go to next step no matter whether it is
registered on PS domain service or not in
60 s.
If failed to identify (U)SIM
card in 20 s, then reboot the
module.
1. Reboot the module if there
is no response in 150 s.
2. If failed to deactivate the
PDP context for 3 times
continuously, then reboot the
module.
Notes:
1. Please note that you need to wait for the final response (for example OK, CME error, CMS error) of the last AT command you entered before you
enter the next AT command. You can 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 after 10 minutes for the second time, and reboot
after 30 minutes for the third time, one hour for the fourth time, etc.
Query PS service in 60 s
by AT+CGREG?/
AT+CEREG?
Failed to activate
the PDP context
1. Failed to open connection
continuously for 5 times.
2. There is no response in150 s.
Failed to get ACK in 90 s
OK
The PDP
context is
deactivated
successfully
Reboot the
module if
there is no
response in
40 s.
Open Connection:
1. If failed to get response of AT+QIOPEN in 150 s, then
close the connection.
2. If failed to open connection for 5 times continuously,
deactivate the PDP context first, and then re-activate the
PDP context and open connection again.
Send AT command and wait for the module to respond OK
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 maintian 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.
Configure the PDP Context by
AT+QICSGP/AT+CGDCONT
Configure a PDP Context:
Configure APN, user name, password and
auth type by AT+QICSGP.
(AT+CGDCONT can only configure APN
information.)
If failed to get PS registered
status, configure the PDP
context then change the
AT+CFUN setting or reboot
the module.
Figure 1: Flow Chart of Using TCP/IP AT Commands