Udp Service Under Ipv6; Start A Udp Service; Send Udp Data To Remote; Receive Data From Remote - Quectel BG96 TCP/IP Application Note

Lpwa module
Hide thumbs Also See for BG96 TCP/IP:
Table of Contents

Advertisement

3.9. UDP Service under IPv6

3.9.1. Start a UDP Service

AT+QIOPEN=1,2,"UDP SERVICE","0:0:0:0:0:0:0:1",0,12345,0
OK
+QIOPEN: 2,0
AT+QISTATE=0,1
+QISTATE: 2,"UDP SERVICE","2001:468:2100:1:2001:468:2100:1",0,12345,2,1,2,0,"usbmodem"
OK

3.9.2. Send UDP Data to Remote

AT+QISEND=2,10,"2001:468:2100:1:0:0:0:0",5001
>1234567890
SEND OK

3.9.3. Receive Data from Remote

+QIURC: "recv",2
AT+QIRD=2
+QIRD: 4,"2001:468:2100:1:0:0:0:0",5001
AAAA
OK
AT+QIRD=2
+QIRD: 0
OK
BG96_TCP/IP_Application_Note
LPWA Module Series
BG96 TCP/IP Application Note
//Start a UDP service, <connectID>
is 2 and <context> is 1. Before using
AT+QIOPEN, the host should activate the
context with AT+QIACT first.
//UDP service is opened successfully.
//Query
if
the
connection
<contextID> is 1.
//Send 10 bytes data to remote whose IP is
2001:468:2100:1:0:0:0:0 and remote port is
5001.
//Receive data from remote.
//Read UDP data. One whole UDP packet will
be outputted. There is no need to specify the
read length.
//Data length is 4. The remote IP address is
2001:468:2100:1:0:0:0:0 and remote port is
5001.
//Read data.
//No data in buffer.
status
of
46 / 52

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BG96 TCP/IP and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF