Quectel BG96 TCP (IP) AT Commands Manual V1.0
Quectel BG96 TCP (IP) AT Commands Manual V1.0
AT Commands Manual
Rev. BG96_TCP/IP_AT_Commands_Manual_V1.0
Date: 2017-11-23
Status: Released
www.quectel.com
LTE Module Series
BG96 TCP/IP AT Commands Manual
Our aim is to provide customers with timely and comprehensive service. For any
assistance, please contact our company headquarters:
GENERAL NOTES
QUECTEL OFFERS THE INFORMATION AS A SERVICE TO ITS CUSTOMERS. THE INFORMATION
PROVIDED IS BASED UPON CUSTOMERS’ REQUIREMENTS. QUECTEL MAKES EVERY EFFORT
TO ENSURE THE QUALITY OF THE INFORMATION IT MAKES AVAILABLE. QUECTEL DOES NOT
MAKE ANY WARRANTY AS TO THE INFORMATION CONTAINED HEREIN, AND DOES NOT ACCEPT
ANY LIABILITY FOR ANY INJURY, LOSS OR DAMAGE OF ANY KIND INCURRED BY USE OF OR
RELIANCE UPON THE INFORMATION. ALL INFORMATION SUPPLIED HEREIN IS SUBJECT TO
CHANGE WITHOUT PRIOR NOTICE.
COPYRIGHT
THE INFORMATION CONTAINED HERE IS PROPRIETARY TECHNICAL INFORMATION OF
QUECTEL WIRELESS SOLUTIONS CO., LTD. TRANSMITTING, REPRODUCTION, DISSEMINATION
AND EDITING OF THIS DOCUMENT AS WELL AS UTILIZATION OF THE CONTENT ARE
FORBIDDEN WITHOUT PERMISSION. OFFENDERS WILL BE HELD LIABLE FOR PAYMENT OF
DAMAGES. ALL RIGHTS ARE RESERVED IN THE EVENT OF A PATENT GRANT OR
REGISTRATION OF A UTILITY MODEL OR DESIGN.
Copyright © Quectel Wireless Solutions Co., Ltd. 2017. All rights reserved.
BG96_TCP/IP_AT_Commands_Manual 1 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
History
Revision Date Author Description
Walker HAN/
1.0 2017-11-23 Initial
Lucifer YAN
BG96_TCP/IP_AT_Commands_Manual 2 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
Contents
1 Introduction .......................................................................................................................................... 6
1.1. The Process of Using TCP/IP AT Commands ............................................................................. 6
1.2. Description of Data Access Modes .............................................................................................. 8
3 Examples ............................................................................................................................................ 32
3.1. Configure and Activate a Context .............................................................................................. 32
3.1.1. Configure a Context ....................................................................................................... 32
3.1.2. Activate a Context .......................................................................................................... 32
3.1.3. Deactivate a Context ...................................................................................................... 32
3.2. TCP Client Works in Buffer Access Mode ................................................................................. 33
3.2.1. Set up a TCP Client Connection and Enter into Buffer Access Mode ........................... 33
3.2.2. Send Data in Buffer Access Mode ................................................................................. 33
3.2.3. Receive Data from Remote Server in Buffer Access Mode ........................................... 34
BG96_TCP/IP_AT_Commands_Manual 3 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
BG96_TCP/IP_AT_Commands_Manual 4 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
Table Index
BG96_TCP/IP_AT_Commands_Manual 5 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
1 Introduction
Quectel BG96 module features embedded TCP/IP stack, which enables the host to access the Internet
directly via AT commands. This greatly reduces the dependence on the PPP and TCP/IP protocol stacks
and thus minimizes the cost. BG96 module provides the following socket services: TCP client, UDP client,
TCP server and UDP server.
Through TCP/IP AT commands, the host can configure a PDP context, activate/deactivate the PDP
context, start/close socket service and send/receive data via socket service. The following figure
illustrates how to use TCP/IP AT commands.
BG96_TCP/IP_AT_Commands_Manual 6 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
PS Service:
1. If <stat> of AT+CGREG?/AT+CEREG? Register on CS domain service in 60s
equals to 1 or 5, it means that the module
has registered on PS domain service in
Query PS service in 60s by
UMTS/LTE network.
AT+CGREG?/
2. Go to next step no matter whether it is
AT+CEREG?
registered on PS domain service or not in
60s.
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 60s.
2. Reboot the module if the module has not got response of AT+QIACT in 150s or response of AT+QICLOSE in 10s and AT+QIDEACT in 40s.
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.
BG96_TCP/IP_AT_Commands_Manual 7 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
BG96 module supports the following three kinds of data access modes:
When opening a socket service via AT+QIOPEN, the data access mode can be specified by the
parameter <access_mode>. After a socket service is opened, customers can switch the access mode via
AT+QISWTMD.
1. In buffer access mode, data can be sent via AT+QISEND command, and if the module has received
data from the Internet, it will buffer the data and report a URC as “+QIURC: “recv”,<connectID>”.
Customers can read data via AT+QIRD command.
2. In direct push mode, data can be sent via AT+QISEND command, and if the module has received
data from the Internet, the data will be outputted to COM port directly in the following format:
“+QIURC: “recv”,<connectID>,<currectrecvlength><CR><LF><data>”.
3. In transparent access mode, the corresponding port (such as UART, USB modem port, etc.) enters
into the exclusive mode. The data received from COM port will be sent to the Internet directly, and the
data received from Internet will be outputted via COM port directly. Customers can use “+++” to exit
from transparent access mode. When “OK” is returned, the module will be switched to buffer access
mode. AT+QISWTMD can be used to return back to transparent access mode.
4. To exit from the transparent access mode, “+++” or DTR (AT&D1 should be set first) can be used. To
prevent the “+++” from being misinterpreted as data, the following sequence should be followed:
5. There are two methods to return back to the transparent access mode:
BG96_TCP/IP_AT_Commands_Manual 8 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
NOTES
1. In buffer access mode, if the buffer is not empty, the module will not report a new URC until all the
received data has been read via AT+QIRD from buffer.
2. In transparent access mode, AT commands cannot be executed. If the socket connection is closed
because of network error or other errors, the module will report “NO CARRIER” and exit from the
transparent access mode. In this case, AT+QICLOSE should be executed to close socket service.
BG96_TCP/IP_AT_Commands_Manual 9 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
The command can be used to configure the <APN>, <username>, <password> and other parameters of a
TCP/IP context.
OK
Write Command Response
Query the configuration of a context +QICSGP:
AT+QICSGP=<contextID> <context_type>,<APN>,<username>,<password>,<authent
ication>
OK
Write Command Response
Configure the context OK
AT+QICSGP=<contextID>[,<context_t ERROR
ype>,<APN>[,<username>,<passwor
d>)[,<authentication>]]]
Parameter
BG96_TCP/IP_AT_Commands_Manual 10 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
Example
OK
AT+QICSGP=1,1,"UNINET","","",1 //Configure context 1. APN is “UNINET” for China Unicom.
OK
NOTE
Before activating a PDP context via AT+QIACT, the context should be configured by AT+QICSGP. After
activation, the IP address can be queried via AT+QIACT?. The range of <contextID> is 1-16. According to
3GPP specifications, the module only supports three PDP contexts activated simultaneously, so
customers must make sure the number of activated PDP contexts is less than 3. Depending on the
network, it may take at most 150 seconds to return “OK” or “ERROR” after executing AT+QIACT. Before
the response is returned, other AT commands cannot be executed.
OK
Read command Response
AT+QIACT? Return the list of the current activated contexts and their IP
addresses:
+QIACT:
1,<context_state>,<context_type>[,<IP_address>]
[.....
+QIACT:
16,<context_state>,<context_type>[,<IP_address>]]
BG96_TCP/IP_AT_Commands_Manual 11 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
OK
Parameter
NOTE
The command is used to deactivate the specific context and close all TCP/IP connections set up in this
context. Depending on the network, it may take at most 40 seconds to return “OK” or “ERROR” after
executing AT+QIDEACT. Before the response is returned, other AT commands cannot be executed.
OK
Write Command Response
AT+QIDEACT=<contextID> OK
Or
ERROR
BG96_TCP/IP_AT_Commands_Manual 12 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
Parameter
The command is used to open a socket service. The service type can be specified by <service_type>
parameter. The data access mode (buffer access mode, direct push mode and transparent access mode)
can be specified by <access_mode> parameter. The “+QIOPEN” URC indicates whether the socket
service has been opened successfully.
1. If <service_type> is “TCP LISTENER”, the module works as TCP SERVER. After accepting a new
TCP connection, the module will automatically specify a <connectID> and report a URC as “+QIURC:
“incoming”,<connectID>,<serverID>,<remoteIP>,<remote_port>”. The range of <connectID> is 0-11.
The type of this new incoming connection is “TCP INCOMING” and the <access_mode> of “TCP
INCOMING” is the same with the <access_mode> of “TCP LISTENER”.
2. If <service_type> is “UDP SERVICE”, UDP data can be sent to or received from the remote IP via
<local_port>.
Send data: execute AT+QISEND=<connectID>,<send_length>,<remoteIP>,<remote_port>.
Receive data in direct push mode: the module reports a URC as “+QIURC:
“recv”,<connectID>,<currentrecvlength>,<remoteIP>,<remote_port><CR><LF><data>”.
Receive data in buffer access mode: the module reports a URC as “+QIURC:
“recv”,<connectID>”, and then customers can retrieve data via AT+QIRD=<connectID>.
3. It is suggested to wait for 150 seconds for “+QIOPEN: <connectID>,<err>” to be outputted. If the
URC cannot be received in 150 seconds, AT+QICLOSE should be used to close the socket.
OK
Write Command Response
AT+QIOPEN=<contextID>,<connectID If the <access_mode> is transparent access mode and it is
>,<service_type>,<IP_address>/<dom successful to open the service, response:
ain_name>,<remote_port>[,<local_po CONNECT
BG96_TCP/IP_AT_Commands_Manual 13 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
rt>[,<access_mode>]]
If there is any error, response:
ERROR
Error description can be got via AT+QIGETERROR.
+QIOPEN: <connectID>,<err>
<err> is 0 when service is opened successfully. In other cases,
<err> is not 0.
Parameter
BG96_TCP/IP_AT_Commands_Manual 14 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
The command is used to close the specified socket service. Depending on the network, it will take at most
10 seconds (default value, can be modified by <timeout>) to return “OK” or “ERROR” after executing
AT+QICLOSE. Before the response is returned, other AT commands cannot be executed.
OK
Write Command Response
AT+QICLOSE=<connectID>[,<timeout If successfully closed, response:
>] OK
Parameter
<connectID> Integer type. The socket service index. The range is 0-11.
<timeout> Integer type. If the FIN ACK of the other peers is not received within <timeout>, the
module will force to close the socket. The range is 1-65535, and the default value is 10.
Unit: second.
The command is used to query the socket service status. If the <query_type> is 0, it will return the status
of all existing socket services in the specified context. If the <query_type> is 1, it will return the status of
the specified socket service.
OK
BG96_TCP/IP_AT_Commands_Manual 15 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
OK
Write Command Response
If <query_type> is 1, query connection +QISTATE:
status of the specified socket service <connectID>,<service_type>,<IP_address>,<remote_port>
AT+QISTATE=<query_type>,<connect ,<local_port>,<socket_state>,<contextID>,<serverID>,<ac
ID> cess_mode>,<AT_port>
OK
Parameter
BG96_TCP/IP_AT_Commands_Manual 16 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
If <access_mode> of the specified socket service is buffer access mode or direct push mode, data can be
sent via AT+QISEND. If the data is sent to the module successfully, “SEND OK” will be returned.
Otherwise it will return “SEND FAIL” or “ERROR”. “SEND FAIL” indicates the sending buffer is full and
customers can try to resend the data. “ERROR” indicates it encounters an error in the process of sending
data. Customers should delay some time for the data to be sent. The maximum data length is 1460 bytes.
“SEND OK” does not mean the data has been sent to the server successfully. Customers can query
whether the data has reached the server by AT+QISEND=<connectID>, 0 command.
OK
Write Command Response
If <service_type> is “TCP”, “UDP” or >
“TCP INCOMING”, send data with <input data>
changeable length CTRL+Z
AT+QISEND=<connectID>
After response “>”, input the data to be If connection has been established and sending is successful,
sent. Tap CTRL+Z to send, and tap ESC response:
to cancel the operation SEND OK
BG96_TCP/IP_AT_Commands_Manual 17 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
OK
BG96_TCP/IP_AT_Commands_Manual 18 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
ERROR
Parameter
In buffer access mode, after receiving data, the module will buffer it and report “+QIURC:
“recv”,<connectID>”, then data can be retrieved by AT+QIRD.
Please note that if the buffer is not empty, and the module receives data again, it will not report a new
URC until all the received data has been retrieved via AT+QIRD from buffer.
OK
Write Command Response
When <service_type> is If the specified connection has received data, response:
“TCP”/“UDP”/“TCP INCOMING” +QIRD: <read_actual_length><CR><LF><data>
AT+QIRD=<connectID>[,<read_length
>] OK
OK
BG96_TCP/IP_AT_Commands_Manual 19 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
OK
OK
OK
If there is any error, response:
ERROR
Parameter
<connectID> Integer type. The socket service index. The range is 0-11.
<read_length> The maximum length of data to be retrieved. The range is 0-1500. Unit: byte.
<read_actual_length> The actual length of received data. Unit: byte.
<remoteIP> String type. The remote IP address, only valid when <service_type> is “UDP
SERVICE”.
<remote_port> Integer type. The remote port, only valid when <service_type> is “UDP
SERVICE”.
<data> The retrieved data.
<total_receive_length> The total length of received data. Unit: byte.
<have_read_length> The length of read data. Unit: byte.
<unread_length> The length of unread data. Unit: byte.
BG96_TCP/IP_AT_Commands_Manual 20 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
This command cannot be applied for “UDP SERVICE” and “TCP LISTENER” sockets.
OK
Write Command Response
AT+QISENDEX=<connectID>,<h If sent successfully, response:
ex_string> SEND OK
Parameter
<connectID> Integer type. The socket service index. The range is 0-11.
<hex_string> String type. Hex string. The max length is 512 bytes.
The command can be used to switch the data access modes: buffer access mode, direct push mode and
transparent access mode. When starting a socket service, data access modes can be specified via the
<access_mode> parameter of AT+QIOPEN. After a socket has been opened, the data access modes can
be changed via AT+QISWTMD.
OK
Write Command Response
AT+QISWTMD=<connectID>,<access If data access mode is switched successfully and
_mode> <access_mode> is 0 or 1, response:
OK
BG96_TCP/IP_AT_Commands_Manual 21 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
Parameter
<connectID> Integer type. The socket service index. The range is 0-11.
<access_mode> Integer type. The data access modes of the connection.
0 Buffer access mode
1 Direct push mode
2 Transparent access mode
The command is used to test the Internet protocol reachability of a host. Before using ping tools, the host
should activate the context corresponding to <contextID> via AT+QIACT first. It will return the result
during <timeout> and the default value of <timeout> is 4 seconds.
OK
Write Command Response
AT+QPING=<contextID>,<host>[,<tim If ping a remote server successfully, response:
eout>[,<pingnum>]] OK
[+QPING:
<result>[,<IP_address>,<bytes>,<time>,<ttl>]<CR><LF>…]
+QPING:
<finresult>[,<sent>,<rcvd>,<lost>,<min>,<max>,<avg>]
BG96_TCP/IP_AT_Commands_Manual 22 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
Parameter
NTP is intended to synchronize the Coordinated Universal Time (UTC) with the time server. Before using
NTP, the host should activate the context corresponding to <contextID> via AT+QIACT first. Depending
on the network, it will take at most 125 seconds to return the result.
OK
Read command Response
AT+QNTP? If in the process of synchronizing local time:
+QNTP: <server>,<port>
BG96_TCP/IP_AT_Commands_Manual 23 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
OK
+QNTP: <err>,<time>
Parameter
Before setting the DNS address, the host must activate the context corresponding to <contextID> via
AT+QIACT first.
OK
Write Command Response
Configure DNS server address for OK
specified PDP context Or
AT+QIDNSCFG=<contextID>,<pri ERROR
dnsaddr>[,<secdnsaddr>]
Write Command Response
Query DNS server address of +QIDNSCFG: <contextID>,<pridnsaddr>,<secdnsaddr>
specified PDP context
AT+QIDNSCFG=<contextID> OK
BG96_TCP/IP_AT_Commands_Manual 24 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
Parameter
<contextID> Integer type. The PDP context ID. The range is 1-16.
<pridnsaddr> String type. The primary DNS server address.
<secdnsaddr> String type. The secondary DNS server address.
Before querying the DNS, the host should activate the context corresponding to <contextID> via
AT+QIACT first. Depending on the network, it will take at most 60 seconds to return the result.
OK
Write Command Response
AT+QIDNSGIP=<contextID>,<hos
tname> OK
Or
ERROR
Parameter
<contextID> Integer type. The PDP context ID. The range is 1-16.
<hostname> String type. The domain name.
<err> Integer type. The error code of the operation. Please refer to Chapter 4.
<IP_count> Integer type. The number of the IP addresses corresponding to the <hostname>.
<DNS_ttl> Integer type. The time to live of the DNS.
<hostIPaddr> String type. The IP address of <hostname>.
BG96_TCP/IP_AT_Commands_Manual 25 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
OK
Write Command Response
Set packet size for transparent [+QICFG: "transpktsize",<transpktsize>]
mode
AT+QICFG="transpktsize"[,<tran OK
spktsize>] Or
ERROR
Write Command Response
Set waiting time for transparent [+QICFG: "transwaittm",<transwaittm>]
mode
AT+QICFG="transwaittm"[,<tran OK
swaittm >] Or
ERROR
Write Command Response
Set the data format for sending and [+QICFG:
receiving (only for non-transparent "dataformat",<send_data_format>,<recv_data_format>]
mode)
AT+QICFG=“dataformat”[,<send OK
_data_format>,<recv_data_forma Or
t>] ERROR
BG96_TCP/IP_AT_Commands_Manual 26 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
ax_backoffs>,<max_rto>] Or
ERROR
Parameter
<transpktsize> Integer type. The max length of the data packet to be sent. The range is
1-1460, and the default value is 1024. Unit: byte.
<transwaittm> Integer type. In transparent access mode, if the length of data received from
the port is less than the specified value of <transpktsize>, after exceeding the
time of <transwaittm>, data will be sent directly. The range is 0-20, and the
default value is 2. Unit: 100ms.
<send_data_format> Integer type.
0 Text mode
1 Hex mode
<recv_data_format> Integer type.
0 Text mode
1 Hex mode
<view_mode> Integer type.
0 Output format of received data: data header\r\ndata.
1 Output format of received data: data header,data.
<max_backoffs> Integer type. The maximum number of TCP retransmission. The range is
3-20, and the default value is 8.
<max_rto> Integer type. The maximum interval time of TCP retransmission.
The range is 5-1000, and the default value is 600. Unit: 100ms.
NOTE
The command is used to control whether to echo the data for AT+QISEND.
OK
Read command Response
AT+QISDE? +QISDE: <echo>
BG96_TCP/IP_AT_Commands_Manual 27 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
OK
Write Command Response
AT+QISDE=<echo> OK
Or
ERROR
Parameter
If “ERROR” is returned after executing TCP/IP commands, the details of error can be queried via
AT+QIGETERROR. Please note that AT+QIGETERROR just returns error code of the last TCP/IP AT
command.
OK
Parameter
<err> Integer type. The error code of the operation. Please refer to Chapter 4.
<errcode_description> A string parameter indicates the details of error information. Please refer to
Chapter 4 for details.
The URC of TCP/IP AT commands will be reported to the host in the format of beginning with “+QIURC:”.
It contains the reports about incoming data, connection closed and incoming connection and so on.
Actually, there is “<CR><LF>” both before and after URC, but “<CR><LF>” is omitted intentionally.
BG96_TCP/IP_AT_Commands_Manual 28 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
When TCP socket service is closed by remote peer or due to network error, the URC will be outputted.
The status of the socket service will be “closing”. AT+QICLOSE=<connectID> can be used to change the
<socket_state> to “initial”.
Parameter
<connectID> Integer type. The socket service index. The range is 0-11.
In buffer access mode or direct push mode, after receiving data, the module will report URC to the host.
In buffer access mode, after receiving data, the module will report URC as “+QIURC: “recv”,<connectID>”
to notify the host. Then host can retrieve data via AT+QIRD. Please note that if the buffer is not empty,
and the module receives data again, it will not report a new URC until all the received data has been
retrieved via AT+QIRD from buffer.
In direct push mode, the received data will be outputted to COM port directly.
Parameter
<connectID> Integer type. The socket service index. The range is 0-11.
<currentrecvlength> Integer type. The length of actual received data.
<remoteIP> Remote IP address.
BG96_TCP/IP_AT_Commands_Manual 29 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
If the incoming connection reaches the limit, or no socket system resources can be allocated, then the
module will report the URC as “+QIURC: “incoming full”” for the new incoming connection request.
If the <service_type> is “TCP LISTENER”, when a remote client connects to this server, the host will
automatically assign a free <connectID> for the new connection. The range of <connectID> is 0-11. The
module will report a URC. The <service_type> of the new connection will be “TCP INCOMING”, and the
<access_mode> will be buffer access mode.
Parameter
<connectID> Integer type. Assign this socket service for the incoming connection, which is
automatically specified by the module. The range is 0-11.
<serverID> The incoming <connectID> accepted by the server whose <service_type> is “TCP
LISTENER” and listening socket ID is <serverID>.
<remoteIP> Remote IP address of the incoming <connectID>.
<remote_port> Remote port of the incoming <connectID>.
PDP context may be deactivated by the network. The module will report URC to the host about PDP
deactivation. The host must execute AT+QIDEACT to deactivate the context and reset all connections.
BG96_TCP/IP_AT_Commands_Manual 30 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
Parameter
BG96_TCP/IP_AT_Commands_Manual 31 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
3 Examples
OK
3.2.1. Set up a TCP Client Connection and Enter into Buffer Access Mode
OK
AT+QISEND=0 //Send changeable length data. “SEND OK” does not mean the
data has been sent to the server successfully. The host can query
whether the data has reached the server via AT+QISEND=0,0.
>test1<ctrl+Z>
SEND OK
AT+QISEND=0,4 //Send fixed length data and the data length is 4 bytes.
>test
SEND OK
AT+QISEND=0,0 //Query the length of sent data.
+QISEND: 9,9,0
OK
AT+QISENDEX=0,"3132333435" //Send Hex string data.
SEND OK
AT+QISEND=0,0 //Query the length of sent data.
+QISEND: 14,14,0
OK
BG96_TCP/IP_AT_Commands_Manual 33 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
OK
AT+QIRD=0,1500
+QIRD: 0 //No data in buffer.
OK
AT+QIRD=0,0 //Query the total length of received data, including read and unread data.
+QIRD: 5,5,0
OK
3.3.1. Set up a TCP Client Connection and Enter into Transparent Access Mode
<All data got from COM port will be sent to internet directly>
BG96_TCP/IP_AT_Commands_Manual 34 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
3.4.1. Set up a TCP Client Connection and Enter into Direct Push Mode
OK
BG96_TCP/IP_AT_Commands_Manual 35 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
>test1<ctrl+Z>
SEND OK
AT+QISEND=0,5 //Send fixed length data and the data length is 5 bytes.
>test2
SEND OK
AT+QISEND=0,0 //Query the length of sent data. .
+QISEND: 10,10,0
OK
OK
BG96_TCP/IP_AT_Commands_Manual 36 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
OK
AT+QIRD=11,1500
+QIRD: 0 //No data in buffer.
OK
AT+QIRD=11,0 //Query the length of total received data, including
read and unread data.
+QIRD: 4,4,0
OK
BG96_TCP/IP_AT_Commands_Manual 37 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
OK
OK
OK
AT+QIRD=2 //Read data.
+QIRD: 0 //No data in buffer.
OK
AT+QISEND=2,10,“10.7.76.34”,7687 //Send data to remote whose IP is 10.7.76.34 and
remote port is 7687.
>1234567890
SEND OK
BG96_TCP/IP_AT_Commands_Manual 38 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
3.7. PING
+QPING: 0,"61.135.169.125",32,192,255
+QPING: 0,"61.135.169.125",32,240,255
+QPING: 0,"61.135.169.125",32,241,255
+QPING: 0,"61.135.169.125",32,479,255
+QPING: 0,4,4,0,192,479,287
+QNTP: 0,"2013/08/19,11:10:10+32"
AT+CCLK?
+CCLK: "13/08/19,11:10:57+32"
OK
OK
BG96_TCP/IP_AT_Commands_Manual 39 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
<err> Meaning
0 Operation successful
BG96_TCP/IP_AT_Commands_Manual 41 / 42
LTE Module Series
BG96 TCP/IP AT Commands Manual
5 Appendix A Reference
Abbreviation Description
IP Internet Protocol
NV Non-Volatile
BG96_TCP/IP_AT_Commands_Manual 42 / 42