LPWA Module Series
BG95&BG77&BG600L Series TCP/IP Application Note
BG95&BG77&BG600L_Series_TCP/IP_Application_Note 41 / 56
3.2.4. Close a Connection
3.3. TCP Client Works in Buffer Access Mode under IPv6
3.3.1. Set up a TCP Client Connection and Enter Buffer Access Mode
3.3.2. Send Data in Buffer Access Mode
test1
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
AT+QICLOSE=0
//Close a connection whose
<connectID>
is 0. Depending on the
network, the maximum response time is 10s.
OK
//Context is 1 and
<connectID>
is 0. Before using
AT+QIOPEN
, the host should activate the context
with
AT+QIACT
first.
AT+QIOPEN=1,0,"TCP","2001:468:2100:1:0:0:0:0",5001,0,0
OK
+QIOPEN: 0,0
//TCP client is connected successfully. It is suggested to wait for 150 seconds for
the URC
+QIOPEN: <connectID>,<result>
. If the URC cannot be received in
150 seconds, the host can use
AT+QICLOSE
to close the socket.
AT+QISTATE=1,0
//Query the connection status of socket service
1.
+QISTATE: 0,"TCP","2001:468:2100:1:0:0:0:0",5001,11921,2,1,0,0,"usbmodem"
OK
AT+QISEND=0
//Send variable-length data.
>
test1<Ctrl+Z>
SEND OK
//
SEND OK
does not mean the data has been sent to the server