NB-IoT Module Series
BC26 AT Commands Manual
BC26_AT_Commands_Manual 53 / 73
5.9. Examples
5.9.1. Example of Creating a TCP Socket (Do Not Support Now)
AT+QPING=192.168.1.1
OK
AT+QGACT=1,1,"apn","user_name","pwd"
//Activate APN
+QGACT=<cid>,1,1,1
OK
AT+QSOC=1,1,1
//Create socket
+QSOC=0
OK
AT+QSOCON=0,1026,
"220.180.239.212"
//Connection socket
OK
AT+QSOSEND=0,10,1234562112
//Send data
OK
+QSONMI=0,3,3BX
//Receive data
AT+QSODIS=0
/
/Disconnect socket
OK
AT+QSOCL=0
//Close socket
OK
5.9.2. Example of Creating a UDP Socket Example
AT+QGACT
=1,1,"apn","user_name","pwd“
/
/Activate APN
+QGACT=<cid>,1,1,1
OK
AT+QSOC=1,2,1
//Create socket
+QSOC=0
OK
AT+QSOCON=0,1026,
"220.180.239.212"
//Connection socket
OK
AT+QSOSEND=0,10,1234562112
//Send data