Close A Tcp Server; Tcp Server Works In Buffer Access Mode Under Ipv6 Network; Start A Tcp Server; Accept Tcp Incoming Connection - Quectel BG95 Series Application Note

Hide thumbs Also See for BG95 Series:
Table of Contents

Advertisement

3.6.4. Close a TCP Server

AT+QICLOSE=11
OK
AT+QICLOSE=1
OK

3.7. TCP Server Works in Buffer Access Mode under IPv6 Network

3.7.1. Start a TCP Server

//Context is 1 and <connectID> is 1. Before using AT+QIOPEN, the host should activate the context
with AT+QIACT first.
AT+QIOPEN=1,1,"TCP LISTENER","0:0:0:0:0:0:0:1",0,12345,0
OK
+QIOPEN: 1,0
AT+QISTATE=0,1
+QISTATE: 1,"TCP LISTENER","2001:468:2100:1:2001:468:2100:1",0,12345,3,1,1,0,"usbmodem"
OK

3.7.2. Accept TCP Incoming Connection

+QIURC: "incoming",11,1,"2001:468:2100:1:0:0:0:0",54091 //A new TCP connection is accepted.

3.7.3. Retrieve Data from Incoming Connection

+QIURC: "recv",11
AT+QIRD=11,1500
+QIRD: 4
test
OK
AT+QIRD=11,1500
+QIRD: 0
BG95&BG77&BG600L_Series_TCP/IP_Application_Note
BG95&BG77&BG600L Series TCP/IP Application Note
//Close the incoming connection. Depending on the network,
the maximum response time is 10 seconds.
//Close TCP server listening.
//TCP server is opened successfully.
//Query the connection status of context 1.
//Received data from remote incoming connection.
//Retrieve the data received from incoming connection.
//Actually retrieved data length is 4 bytes.
//No data in buffer.
LPWA Module Series
The <service_type> is "TCP incoming",
and <connectID> is 11.
46 / 56

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Bg77 seriesBg600l series

Table of Contents