Ec200x Series Tcpip Application Note v1-4
Ec200x Series Tcpip Application Note v1-4
&EG950A Series
TCP/IP Application Note
Version: 1.4
Date: 2023-10-30
Status: Released
LTE Standard Module Series
At Quectel, our aim is to provide timely and comprehensive services to our customers. If you
require any assistance, please contact our headquarters:
Legal Notices
We offer information as a service to you. The provided information is based on your requirements and we
make every effort to ensure its quality. You agree that you are responsible for using independent analysis
and evaluation in designing intended products, and we provide reference designs for illustrative purposes
only. Before using any hardware, software or service guided by this document, please read this notice
carefully. Even though we employ commercially reasonable efforts to provide the best possible experience,
you hereby acknowledge and agree that this document and related services hereunder are provided to
you on an "as available" basis. We may revise or restate this document from time to time at our sole
discretion without any prior notice to you.
Copyright
Our and third-party products hereunder may contain copyrighted material. Such copyrighted material shall
not be copied, reproduced, distributed, merged, published, translated, or modified without prior written
consent. We and the third party have exclusive rights over copyrighted material. No license shall be
granted or conveyed under any patents, copyrights, trademarks, or service mark rights. To avoid
ambiguities, purchasing in any form cannot be deemed as granting a license other than the normal non-
exclusive, royalty-free license to use the material. We reserve the right to take legal action for
noncompliance with abovementioned requirements, unauthorized use, or other illegal or malicious use of
the material.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 1 / 58
LTE Standard Module Series
Trademarks
Except as otherwise set forth herein, nothing in this document shall be construed as conferring any rights
to use any trademark, trade name or name, abbreviation, or counterfeit product thereof owned by Quectel
or any third party in advertising, publicity, or other aspects.
Third-Party Rights
This document may refer to hardware, software and/or documentation owned by one or more third parties
("third-party materials"). Use of such third-party materials shall be governed by all restrictions and
obligations applicable thereto.
We make no warranty or representation, either express or implied, regarding the third-party materials,
including but not limited to any implied or statutory, warranties of merchantability or fitness for a particular
purpose, quiet enjoyment, system integration, information accuracy, and non-infringement of any third-
party intellectual property rights with regard to the licensed technology or use thereof. Nothing herein
constitutes a representation or warranty by us to either develop, enhance, modify, distribute, market, sell,
offer for sale, or otherwise maintain production of any our products or any other hardware, software, device,
tool, information, or product. We moreover disclaim any and all warranties arising from the course of
dealing or usage of trade.
Privacy Policy
To implement module functionality, certain device data are uploaded to Quectel’s or third-party’s servers,
including carriers, chipset suppliers or customer-designated servers. Quectel, strictly abiding by the
relevant laws and regulations, shall retain, use, disclose or otherwise process relevant data for the purpose
of performing the service only or as permitted by applicable laws. Before data interaction with third parties,
please be informed of their privacy and data security policy.
Disclaimer
a) We acknowledge no liability for any injury or damage arising from the reliance upon the information.
b) We shall bear no liability resulting from any inaccuracies or omissions, or from the use of the
information contained herein.
c) While we have made every effort to ensure that the functions and features under development are
free from errors, it is possible that they could contain errors, inaccuracies, and omissions. Unless
otherwise provided by valid agreement, we make no warranties of any kind, either implied or express,
and exclude all liability for any loss or damage suffered in connection with the use of features and
functions under development, to the maximum extent permitted by law, regardless of whether such
loss or damage may have been foreseeable.
d) We are not responsible for the accessibility, safety, accuracy, availability, legality, or completeness of
information, advertising, commercial offers, products, services, and materials on third-party websites
and third-party resources.
Copyright © Quectel Wireless Solutions Co., Ltd. 2023. All rights reserved.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 2 / 58
LTE Standard Module Series
Revision History
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 3 / 58
LTE Standard Module Series
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 4 / 58
LTE Standard Module Series
Contents
1 Introduction ......................................................................................................................................... 8
1.1. Applicable Modules ..................................................................................................................... 8
1.2. The Process of Using TCP/IP AT Commands ............................................................................ 8
1.3. Description of Data Access Modes ........................................................................................... 10
3 Examples ........................................................................................................................................... 45
3.1. Configure and Activate a Context ............................................................................................. 45
3.1.1. Configure a Context ...................................................................................................... 45
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 5 / 58
LTE Standard Module Series
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 6 / 58
LTE Standard Module Series
Table Index
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 7 / 58
LTE Standard Module Series
1 Introduction
Quectel LTE Standard EC200x family, EG800K series, EG91xN family, EG912Y-EU and EG950A series
modules feature an embedded TCP/IP stack, which enables the host to access the Internet directly via AT
commands. This significantly reduces the dependence on external PPP and TCP/IP protocol stacks and
thus minimizes costs.
EC200x family, EG800K series, EG91xN family, EG912Y-EU and EG950A series modules provide socket
services such as TCP client, UDP client, TCP server and UDP server.
EC200A Series
EC200x EC200N-LA
EC200S Series
- EG800K Series
EG912N-EN
EG91xN
EG915N Series
- EG912Y-EU
- EG950A Series
Via TCP/IP AT commands, the host can configure a PDP context, activate/deactivate the PDP context,
start/close a socket service and send/receive data via the socket service. The following figure illustrates
how to use TCP/IP AT commands.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 8 / 58
LTE Standard Module Series
Notes:
1. Please note that users 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 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.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 9 / 58
LTE Standard Module Series
EC200x family, EG800K series, EG91xN family, EG912Y-EU and EG950A series modules support the
following three kinds of data access modes:
When opening a socket service via AT+QIOPEN, the data access mode can be specified with
<access_mode>. After a socket service is opened, the access mode can be switched with AT+QISWTMD.
1. In buffer access mode, data can be sent via AT+QISEND. If the module has received the data from
the Internet, it will buffer them and report the URC: +QIURC: "recv",<connectID>. The host can
retrieve the buffered data with AT+QIRD.
2. In direct push mode, data can be sent via AT+QISEND. If the module has received the data from the
Internet, it will output them to COM port directly through the URC:
+QIURC: "recv",<connectID>,<currectrecvlength><CR><LF><data> or +QIURC:
"recv",<connectID>,<currentrecvlength>,<remoteIP>,<remote_port><CR><LF><data>.
3. In transparent transmission mode, the corresponding port (such as UART, USB modem port, etc.) is
exclusively used for sending/receiving data directly to the Internet. 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.
1) Execute +++. Follow the requirements below to prevent +++ from being misinterpreted as data:
a) Do not input any character for at least 1 s before and after inputting +++.
b) Input only +++ within 1 s, and wait until OK is returned. Once OK is retuned, the module
switches to buffer access mode.
OR
2) Change MAIN_DTR from LOW to HIGH to make the module enter command mode. In this case,
set AT&D1 (see document [1]) before the module enters transparent transmission mode.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 10 / 58
LTE Standard Module Series
OR
2) Execute ATO. After a connection exits from transparent transmission mode, executing ATO
switches the data access mode back to transparent transmission mode. Once transparent
transmission mode is entered successfully, CONNECT is returned. If no connection has entered
transparent transmission mode, ATO returns NO CARRIER.
NOTE
1. In buffer access mode, if the buffer is not empty, and the module receives data again, it does not
report any new URC until all the received data have been retrieved with AT+QIRD from the buffer.
2. In transparent transmission mode, AT commands cannot be executed. If the socket connection is
closed because of network error or other errors, the module reports NO CARRIER and exits the
transparent transmission mode. In this case, execute AT+QICLOSE to close the socket service.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 11 / 58
LTE Standard Module Series
2 TCP/IP AT Commands
This chapter describes AT commands related to TCP/IP.
2.1.1. Definitions
All command lines must start with AT or at and end with <CR>. Information responses and result codes
always start and end with a carriage return character and a line feed character:
<CR><LF><response><CR><LF>. In tables presenting commands and responses throughout this
document, only the commands and responses are presented, and <CR> and <LF> are deliberately omitted.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 12 / 58
LTE Standard Module Series
The AT command examples in this document are provided to help you familiarize with AT commands and
learn how to use them. The examples, however, should not be taken as Quectel’s recommendation or
suggestions about how you should design a program flow or what status you should set the module into.
Sometimes multiple examples may be provided for one AT command. However, this does not mean that
there exists a correlation among these examples and that they should be executed in a given sequence.
2.3. AT Commands
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 13 / 58
LTE Standard Module Series
OK
Write Command Response
Query or set the packet size for If the optional parameter is omitted, query the current setting:
transparent transmission mode +QICFG: "transpktsize",<transpktsize>
AT+QICFG="transpktsize"[,<tran
spktsize>] OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 14 / 58
LTE Standard Module Series
ERROR
If the optional parameter is specified, set the UDP data read mode:
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 15 / 58
LTE Standard Module Series
mode:
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 16 / 58
LTE Standard Module Series
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 17 / 58
LTE Standard Module Series
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 18 / 58
LTE Standard Module Series
AT+QICFG="sendinfo"[,<send_vi OK
ew_mode>]
If the optional parameter is specified, enable or disable displaying
the return information of AT+QISEND or AT+QISENDEX in URC
form:
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 19 / 58
LTE Standard Module Series
format>
OK
Parameter
<transpktsize> Integer type. In transparent transmission mode, the max length of the data
packet to be sent. Range: 1–1460. Default value: 1024. Unit: byte.
<transwaittm> Integer type. In transparent transmission mode, the waiting time before
sending the data automatically, if the length of data to be sent is less than the
specified value of <transpktsize>. Range: 0–20. Default value: 2.
Unit: 100 ms.
<send_data_format> Integer type. Format of the data to be sent. Suffix "0x" is not needed when the
mode is set as Hex mode as the module will automatically form two bytes to
one ASCII code.
0 Text mode
1 Hex mode
<recv_data_format> Integer type. Format of the data to be received. Suffix "0x" is not needed when
the mode is set as Hex mode as the module will automatically form two bytes
to one ASCII code.
0 Text mode
1 Hex mode
<view_mode> Integer type. Output format of received data.
0 data header\r\ndata.
1 data header,data.
<closed> Integer type. Enable or disable the passive close of TCP connection when the
server is closed.
0 Disable
1 Enable
<mode> Integer type. Mode when sending UDP data.
0 Disable block mode.
1 Enable stream mode.
<enable> Integer type. Enable or disable sending of TCP keep-alive information.
0 Disable
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 20 / 58
LTE Standard Module Series
1 Enable
<idle_time> Integer type. Indicates the cycle time of triggered keepalive. Range: 1–1800.
Unit: s.
<interval_time> Integer type. Indicates the interval of sending a packet in cycle time.
Range: 25–100. Unit: s.
<probe_cnt> Integer type. Packet transmission count in cycle time. Range: 3–10.
<show_length> Integer type. Enable or disable data length presence in URC reported after
data reception in TCP/IP buffer mode.
0 Disable
1 Enable
<retran_times> Integer type. Number of reconnections within cycle time. Range: 3–12.
<retran_time> Integer type. Reconnect interval within cycle time. Range: 5–1000. Unit: ms.
<state> Integer type.
0 Disable auto accepting incoming TCP connection from the client.
1 Enable auto accepting incoming TCP connection from the client.
<buffer_size> Integer type. Maximum number of bytes sent at one time.
Range: 1460–10240.
<connectID> Integer type. Socket service index. Range: 0–11.
<cycle_time> Integer type. Set the interval for sending heartbeat packets.
Range: 20–86400. Unit: s.
<msg_auto> String type. Send the content of the heartbeat packet.
<msg_ignore> String type. Filter data content.
<format> Integer type. Control > output format.
0 0D0A>
1 0D0A>0D0A
<timeout> Integer type. Send data timeout time. Range: 0–120. Unit: s.
<close_mode> Integer type. Enable or disable asynchronous disconnection of TCP
connection.
0 Disable
1 Enable
<send_view_mode> Integer type. Enable or disable displaying the return information of
AT+QISEND or AT+QISENDEX in URC form.
0 Disable
1 Enable
<send_mode> Integer type. The return mode of SEND OK.
0 Return SEND OK immediately after sending data
1 Return SEND OK after receiving ACK from server
2 Return <connectID>,SEND OK after receiving ACK from server
3 Return +QIURC: SEND OK after receiving ACK from server
4 Return +QIURC: <connectID>,SEND OK after receiving ACK from
server
<pdpmode> Integer type. Set the PDP activation or deactivation mode.
0 Deactivation mode
1 Activation mode
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 21 / 58
LTE Standard Module Series
NOTE
1. If <data_format>=2, that is, the input data is a string type, the string data cannot contain special
characters (such as ASCII special control characters and escape characters), otherwise
<data_format> should be configured to 0 or 1.
2. After the specified data is configured with AT+QICFG="wakeup/data", all other data sent by the
server will be discarded, and the MCU will be notified to wake up only when the packet is awakened
or the network is abnormal.
This command configures the <APN>, <username>, <password> and other parameters of a TCP/IP
context. The QoS settings can be configured with AT+CGQMIN, AT+CGEQMIN, AT+CGQREQ and
AT+CGEQREQ. For more information about the AT commands, see document [1].
OK
Write Command Response
Query a specific context configuration +QICSGP: <context_type>,<APN>,<username>,<passw
AT+QICSGP=<contextID> ord>,<authentication>
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 22 / 58
LTE Standard Module Series
Parameter
Example
OK
AT+QICSGP=1,1,"UNINET","","",1 //Configure context 1. China Unicom APN: "UNINET".
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 23 / 58
LTE Standard Module Series
Before activating a PDP context with AT+QIACT, the context should be configured with AT+QICSGP. After
activation, the IP address can be queried with AT+QIACT?.
Although the range of <contextID> is 1–15, the module supports maximum three PDP contexts activated
simultaneously. Depending on the network, it may take max.150 s to return OK or ERROR after executing
AT+QIACT. Other AT commands can be executed only after the response is returned.
OK
Read command Response
AT+QIACT? Return the list of the currently activated contexts and their IP
addresses:
+QIACT: 1,<context_state>,<context_type>[,<IP_addres
s>]
[.....
+QIACT: 15,<context_state>,<context_type>[,<IP_addres
s>]]
OK
Write Command Response
Activate a specified PDP context OK
AT+QIACT=<contextID>
If there is any error:
ERROR
Characteristic /
Parameter
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 24 / 58
LTE Standard Module Series
3 IPv4v6
<IP_address> String type. Local IP address after the context is activated.
This command deactivates a specific context and closes all TCP/IP connections set up in this context.
Depending on the network, it may take max. 40 s to return OK or ERROR after executing AT+QIDEACT.
Other AT commands can be executed only after the response is returned.
OK
Write Command Response
AT+QIDEACT=<contextID> OK
Characteristic /
Parameter
The command opens a socket service. The service type can be specified by <service_type>. The data
access mode (buffer access mode, direct push mode and transparent transmission mode) can be specified
by <access_mode>. The URC +QIOPEN indicates if 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 automatically specifies a <connectID> and reports the URC +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 as that 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>.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 25 / 58
LTE Standard Module Series
3. It is suggested to wait for 150 s for +QIOPEN: <connectID>,<err> to be outputted after executing the
Write Command. If the response cannot be received in 150 s, use AT+QICLOSE to close the socket.
OK
Write Command Response
AT+QIOPEN=<contextID>,<connectI If the service is in transparent transmission mode
D>,<service_type>,"<IP_address>/<d (<access_mode>=2) and the service is opened successfully:
omain_name>",<remote_port>[,<loc CONNECT
al_port>[,<access_mode>]]
If there is any error:
ERROR
Error description can be got via AT+QIGETERROR.
+QIOPEN: <connectID>,<err>
<err> is 0 when the service is opened successfully. In other
cases, <err> is not 0.
Characteristic /
Parameter
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 26 / 58
LTE Standard Module Series
This command closes a specified socket service. Depending on the network, it will take max. 10 s (default
value, can be modified by <timeout>) to return OK or ERROR after executing AT+QICLOSE. Other AT
commands can be executed only after the response is returned.
OK
Write Command Response
AT+QICLOSE=<connectID>[,<timeou If the socket service is closed successfully:
t>] OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 27 / 58
LTE Standard Module Series
ERROR
Characteristic /
Parameter
The command queries the socket service status. If the <query_type> is 0, it returns the statuses of all
existing socket services in the specified context. If the <query_type> is 1, it will return the status of a
specified socket service.
OK
Write Command Response
If <query_type> is 0, query the con Return the status of all existing connections in a specified
nection status of a specified context context:
AT+QISTATE=<query_type>,<contex +QISTATE: <connectID>,<service_type>,<IP_address>,<
tID> remote_port>,<local_port>,<socket_state>,<contextID>,<
serverID>,<access_mode>,<AT_port>
[…]
OK
Write Command Response
If <query_type> is 1, query the con +QISTATE: <connectID>,<service_type>,<IP_address>,<
nection status of a specified socket remote_port>,<local_port>,<socket_state>,<contextID>,<
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 28 / 58
LTE Standard Module Series
Characteristic /
Parameter
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 29 / 58
LTE Standard Module Series
In buffer access mode (<access_mode>=0) or direct push mode (<access_mode>=1), the data can be
sent with AT+QISEND. If the data have been sent to the module successfully, SEND OK is returned,
otherwise SEND FAIL or ERROR is returned.
⚫ SEND FAIL indicates the sending buffer is full. In this case, resending of the data can be tried.
⚫ ERROR indicates an error in the sending data process. In this case, wait for some time before
resending the data. Maximum length of data to be sent: 1460 bytes.
⚫ SEND OK means that the data have been sent to the peer, but it does not mean they have reached
the server successfully. You can query whether the data have reached the server with
AT+QISEND=<connectID>,0.
OK
Write Command Response
Send variable-length data when >
<service_type> is "TCP", "UDP" or After the response >, input the data to be sent. Tap Ctrl + Z
"TCP INCOMING" to send data, and tap Esc to cancel the operation.
AT+QISEND=<connectID>
(1) If <send_view_mode>=0:
If the connection has been established and the data is sent
successfully:
SEND OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 30 / 58
LTE Standard Module Series
(2) If <send_view_mode>=1:
If the connection has been established and the data is sent
successfully:
+QISEND: <connectID>,<status>,<Freesize>
OK
(2) If <send_view_mode>=1:
If the connection has been established:
+QISEND: <connectID>,<status>,<Freesize>
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 31 / 58
LTE Standard Module Series
gth>,<remoteIP>,<remote_port> >
After the response >, input the data until the data length equals
<send_length>
OK
Characteristic /
Parameter
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 32 / 58
LTE Standard Module Series
In buffer access mode, after receiving data, the module will buffer it and report +QIURC:
"recv",<connectID>, and then the data can be read 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 read via AT+QIRD from buffer.
OK
Write Command Response
When <service_type> is "TCP", "UDP", If the specified connection has received the data, response:
"TCP INCOMING" +QIRD: <read_actual_length><CR><LF><data>
AT+QIRD=<connectID>[,<read_lengt
h>] OK
OK
OK
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 33 / 58
LTE Standard Module Series
OK
Characteristic /
Parameter
This command sends hex string data and cannot be applied to "UDP SERVICE" and "TCP LISTENER"
sockets.
OK
Write Command Response
AT+QISENDEX=<connectID>,< (1) If <send_view_mode>=0:
hex_string> If the hex string is sent successfully:
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 34 / 58
LTE Standard Module Series
SEND OK
(2) If <send_view_mode>=1:
If the connection has been established:
+QISENDEX: <connectID>,<status>,<Freesize>
OK
Characteristic /
Parameter
This command switches the data access modes between buffer access mode, direct push mode and
transparent transmission mode. When a socket service is started, the data access mode can be specified
via the <access_mode> of AT+QIOPEN. After opening a socket, the data access mode can be changed
with AT+QISWTMD.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 35 / 58
LTE Standard Module Series
OK
Write Command Response
AT+QISWTMD=<connectID>,<access If data access mode is switched successfully and <acces
_mode> s_mode> is 0 or 1:
OK
Parameter
This command tests the reachability of a host on an Internet protocol network. Before using the ping utility,
the host should activate the context of the corresponding <contextID> with AT+QIACT. The command
returns the result within <timeout> and the default value of <timeout> is 4 s.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 36 / 58
LTE Standard Module Series
OK
Write Command Response
AT+QPING=<contextID>,<host>[,<ti If a remote host is pinged successfully:
meout>[,<pingnum>]] OK
+QPING: <result>[,<IP_address>,<bytes>,<time>,<ttl>]
[…]
+QPING: <finresult>[,<sent>,<rcvd>,<lost>,<min>,<ma
x>,<avg>]
Characteristic /
Parameter
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 37 / 58
LTE Standard Module Series
This command synchronizes the local time with Universal Time Coordinated (UTC) through the NTP server.
Before time synchronization, the host should activate the context corresponding to <contextID> with
AT+QIACT. Depending on the network, it will take max. 125 s to return the result.
OK
Read command Response
AT+QNTP? If in the process of local time synchronization:
+QNTP: <server>,<port>
OK
Write command Response
AT+QNTP=<contextID>,<server> If the local time is synchronized with NTP server successfully:
[,<port>[,<autosettime>]] OK
+QNTP: <err>,<time>
Parameter
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 38 / 58
LTE Standard Module Series
Before setting the DNS server address, the host must activate the context of corresponding <contextID>
with AT+QIACT.
OK
Write Command Response
AT+QIDNSCFG=<contextID>[,<pr If the optional parameters are omitted, query the current DNS
idnsaddr>[,<secdnsaddr>]] server addresses of a specified PDP context:
+QIDNSCFG: <contextID>,<pridnsaddr>,<secdnsaddr>
OK
Parameter
This command gets an IP address by domain name. Before querying the DNS, the host should activate
the context of the corresponding <contextID> with AT+QIACT. Depending on the network, it will return a
result in max. 60 s.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 39 / 58
LTE Standard Module Series
OK
Write Command Response
AT+QIDNSGIP=<contextID>,<ho OK
stname>
If there is any error:
ERROR
Characteristic /
Parameter
OK
Read command Response
AT+QISDE? +QISDE: <echo>
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 40 / 58
LTE Standard Module Series
Parameter
If ERROR is returned after TCP/IP commands are executed, the detailed information about a result code
can be queried with AT+QIGETERROR. Please note that AT+QIGETERROR only returns the result code
of the last TCP/IP AT command.
OK
Characteristic /
Parameter
<err> Integer type. Error codes of the operation. See Chapter 4 for more information.
<errcode_description> A string parameter indicates the details of error information. See Chapter 4 for
more information.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 41 / 58
LTE Standard Module Series
+QIURC: is used at the beginning of the URC of TCP/IP AT commands to be reported to the host. The
URC contains the reports about incoming data, closed connection and incoming connection and etc.
Actually, there is <CR><LF> both before and after URC, but <CR><LF> is intentionally not presented.
When TCP socket service is closed by remote peer or due to a network error, the URC is outputted, and
the status of socket service is "closing" (<socket_state>=4). AT+QICLOSE=<connectID> can be used to
change the <socket_state> to initial.
Parameter
In buffer access mode or direct push mode, after receiving data, the module reports a URC to the host.
In buffer access mode, after receiving data, the module reports +QIURC: "recv",<connectID> to notify
the host. Then host can retrieve data with AT+QIRD.
In direct push mode, the received data are outputted to COM port directly.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 42 / 58
LTE Standard Module Series
Parameter
NOTE
If the buffer is not empty, and the module receives data again, it does not report a new URC until all the
received data have been retrieved with AT+QIRD from the buffer.
2.4.3. +QIURC: "incoming full" Indicate Incoming Connection Reaches the Limit
If the incoming connection reaches the limit, or no socket system resources can be allocated, then the
module reports +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. In
such a case, the module will report the 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. Range: 0–11.
<serverID> Integer type. The incoming <connectID> accepted by the server whose <service_type>
is "TCP LISTENER" and listening socket ID is <serverID>.
<remoteIP> String type. Remote IP address of the incoming <connectID>.
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 43 / 58
LTE Standard Module Series
PDP context may be deactivated by the network. The module will report the URC to the host about PDP
deactivation. In such a case, the host must execute AT+QIDEACT to deactivate the context and reset all
connections.
Parameter
This URC is reported when the module receives the wake-up packet data sent by the server.
Parameter
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 44 / 58
LTE Standard Module Series
3 Examples
OK
3.2.1. Set up a TCP Client Connection and Enter Buffer Access Mode
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 45 / 58
LTE Standard Module Series
OK
OK
OK
AT+QISENDEX=0,"3132333435" //Send Hex string data.
SEND OK
AT+QISEND=0,0 //Query the length of sent data, acknowledged data and
unacknowledged data.
+QISEND: 14,14,0
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 46 / 58
LTE Standard Module Series
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: 14,14,0
OK
3.3.1. Set up a TCP Client Connection and Enter Transparent Access Mode
<All data got from COM port will be sent to internet directly>
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 47 / 58
LTE Standard Module Series
3.4.1. Set up a TCP Client Connection and Enter Direct Push Mode
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 48 / 58
LTE Standard Module Series
+QISEND: 10,10,0 //A total of 10 bytes of data have been sent, and all 10
bytes have been acknowledged.
OK
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 49 / 58
LTE Standard Module Series
OK
AT+QIRD=11,1500
+QIRD: 0 //No data in buffer.
OK
AT+QIRD=11,0 //Query the total length of received data, including read and unread data.
+QIRD: 4,4,0
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 50 / 58
LTE Standard Module Series
OK
OK
AT+QIRD=2 //Retrieve data.
+QIRD: 0 //No data in buffer.
OK
AT+QISEND=2,10,"[Link]",7687 //Send data to the remote client whose IP is [Link] and
remote port is 7687.
>1234567890
SEND OK
3.7. PING
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 51 / 58
LTE Standard Module Series
AT+QIACT.
OK
+QPING: 0,"[Link]",32,192,255
+QPING: 0,"[Link]",32,240,255
+QPING: 0,"[Link]",32,241,255
+QPING: 0,"[Link]",32,479,255
+QPING: 0,4,4,0,192,479,288
+QNTP: 0,"2019/07/21,[Link]+00"
AT+CCLK?
+CCLK: "19/07/21,[Link]+00"
OK
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 52 / 58
LTE Standard Module Series
OK
AT+QICFG="wakeup/data",1,"5155454377616b657570" //Set wake-up packet data.
OK
AT+QICFG="wakeup/data",1 //Query the current wake-up packet data.
+QICFG: "wakeup/data",1,"5155454377616b657570",0
OK
AT+QICFG="wakeup/data",1,"" //Clear and disable wake-up feature.
OK
AT+QICFG="wakeup/data",1 //Query the current setting after the wake-up feature is disabled.
+QICFG: "wakeup/data",1,"",0
OK
AT+QICFG="wakeup/data",1,"quec wakeup",2 //Configure wake-up packet data to string
OK type
OK
AT+QICFG="send/auto",0,30,"hi quectel",2,0 //Configure heartbeat packet data to string type.
OK
AT+QICFG="send/auto",0 //Query the current setting.
+QICFG: "send/auto",0,30,"hi quectel",2,0
OK
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 53 / 58
LTE Standard Module Series
OK
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 54 / 58
LTE Standard Module Series
<err> <errcode_description>
0 Operate successfully
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 55 / 58
LTE Standard Module Series
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 56 / 58
LTE Standard Module Series
5 Appendix References
Document Name
[1] Quectel_EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_AT_Commands_Manual
Abbreviation Description
ACK Acknowledgement
CS Circuit Switching
FIN Finish
IP Internet Protocol
NV Non-Volatile
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 57 / 58
LTE Standard Module Series
PS Packet Switching
EC200x&EG800K&EG91xN&EG912Y&EG950A_Series_TCP/IP_Application_Note 58 / 58