TCP Server 통신연습
1. TCP Server 설정과정
2. TCP Server 명령시퀀스
NO | Command | Response | 설명 |
1 | PDP Context 설정 | See & Refer to corresponding page | |
2 | AT+CNACT? | Are there enabled PDPs? | |
– | AT+CNACT=0,1 | Activate 0th PDP Context. | |
3 | AT+CASERVER=0,0,”TCP”,6000 |
Create TCP server with 0th PDP on port 6000 of 0th TCP connection |
|
– | AT+CASERVER=0,0,”TCP”,6000,1 | RX data push to UART autiomatiicaly | |
4 | AT+CARECV=1,100 | Read 100 byte data | |
5 | AT+CASEND=1,5 | ||
6 | AT+CAACK=1 | ||
7 | AT+CACLOSE=1 | Close the connection with 1th TCP connection. | |
AT+CACLOSE=0 | Close the connection with 0th TCP connection. | ||
8 | AT+CNACT=0,0 | Disconnect 0th PDP |