LPWA Module Series
BG95&BG77&BG600L Series TCP/IP Application Note
BG95&BG77&BG600L_Series_TCP/IP_Application_Note 47 / 56
3.7.4. Switch Incoming Connection to Transparent Transmission Mode
3.7.5. Close a TCP Server
3.8. UDP Service under IPv4 Network
3.8.1. Start a UDP Service
OK
AT+QIRD=11,0
//Query the total length of received data, including read and unread data.
+QIRD: 4,4,0
OK
AT+QSWTMD=11,2
//Switch the incoming connection whose socket service
index is 11 to transparent transmission mode.
CONNECT
1234567890
//Send data directly.
+++
//Exit from transparent transmission mode.
OK
AT+QICLOSE=11
//Close the incoming connection. Depending on the
network, the maximum response time is 10 seconds.
OK
AT+QICLOSE=1
//Close TCP server listening.
OK
//Start a UDP service whose
<connectID>
is 2 and
<context>
is 1. Before using
AT+QIOPEN
, the host
should activate the context with
AT+QIACT
first.
AT+QIOPEN=1,2,"UDP SERVICE","127.0.0.1",0,3030,0
OK
+QIOPEN: 2,0
//UDP service is opened successfully.
AT+QISTATE=0,1
//Query the connection status of context 1.
+QISTATE: 2,"UDP SERVICE","10.7.157.1",0,3030,2,1,2,0,"usbmodem"
OK