
LPWA Module Series
BG95&BG77&BG600L Series TCP/IP Application Note
BG95&BG77&BG600L_Series_TCP/IP_Application_Note 17 / 56
Parameter
2.3.4. AT+QIOPEN Open a Socket Service
This 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 response
+QIOPEN: <connectID>,<result>
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 automatically specifies a
<connectID>
and reports 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 with 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>
.
Send data: execute
AT+QISEND=<connectID>,<send_length>,<remoteIP>,<remote_port>
.
Receive data in direct push mode: the module reports the URC
+QIURC:
"recv",<connectID>,<currentrecvlength>,<remoteIP>,<remote_port><CR><LF><data>
.
Receive data in buffer access mode: the module reports the URC
+QIURC:
"recv",<connectID>[,<data_len>]
, and then the received data can be retrieved with
AT+QIRD=<connectID>
.
3. It is suggested to wait for 150 seconds for
+QIOPEN: <connectID>,<result>
to be outputted after
executing the Write Command. If the response cannot be received in 150 seconds,
AT+QICLOSE
should be used to close the socket.
AT+QIDEACT=<contextID>
OK
Or
ERROR
Maximum Response Time
40 seconds, determined by the network.
Characteristics
/
<contextID>
Integer type. Context ID. Range: 1
–16.
AT+QIOPEN Open a Socket Service
Test Command
AT+QIOPEN=?
Response
+QIOPEN: (
range of supported
<contextID>
s
),(
range of
supported
<connectID>
s
),"TCP/UDP/TCP LISTENER/UDP