UDP Server Exercise
1. UDP Server Setup
2. UDP Server setting command sequence
NO | Command | Response | 설명 |
1 | PDP Context 설정 | See & Refer to corresponding page | |
2 | AT+CNACT? |
Check the 0th PDN/PDP local IP. |
|
– | AT+CNACT=0,1 | Activate 0th PDP Context | |
3 | AT+CASERVER=0,0,”UDP”,6000 |
Create UDP server with 0th PDP on port 6000 of 0th connection |
|
– | AT+CASERVER=0,0,”UDP”,6000,1 | RX data push to UART automatiically | |
Date comes in on 0th connection. Have a new client access on 0th connection And the client has been assigned to 0th connection. |
|||
4 | AT+CARECV=0,100 | Read 100 byte data on 0th connection | |
5 |
AT+CACFG=”REMOTEADDR”,1, 117.131.85.139,6014 |
Set remote address information for send to. | |
6 | AT+CASEND=0,5 | Request to send 5 bytes of data | |
7 | > | ||
8 | AT+CACLOSE=0 | Close the connection with UDP 0th connection | |
9 | AT+CNACT=0,0 | Disconnect 0th PDP |