FTPS 통신연습 – File Upload
FTP (File Transfer Protocol) is an application layer protocol.
File Transfer Protocol is a standard protocol for transferring files over a network, using the client/server mode.
1. FTP(S) Characteristics
A control connection is a communication link established between a client protocol interpreter and a server protocol interpreter
for exchanging commands and responses.
A data connection is a full-duplex connection for transmitting data.
The transfer of data can occur between DTP for the server data transfer process and DTP for the client,
or between DTP for the two server
2. FTP(S) 통신 설정과정
FTP(S) 통신의 가장 단순한 설정과정은 아래 순서도를 참조할 수 있다.
3. 통신 명령시퀀스 – FTP(S)-File Upload
FTP(S) 서버로 파일을 업로드 하는 예는 다음과 같다..
NO | Command | Response | 설명 |
1 | PDP Context 설정 | ||
2 | AT+CFTPSSTAR | +CFTPSSTART: 0 OK |
Activeate PDP context to start FTP service |
3 | AT+CFTPSSINGLEIP=1 | OK | Set data connection use the same address of control connection |
4 |
AT+CFTPSLOGIN=”xxx.74.xxx.163″, 21,”tmf”,”tmfxxx”,0 |
OK +CFTPSLOGIN: 0 |
|
5 | AT+CFTPSLIST=”/” | list all items of directory “/” | |
6 | AT+CFTPSPWD | OK +CFTPSPWD: “/” |
Get current directory of FTP server |
Abort FTP(S) operation | |||
AT+FSCD? | Query current client directory | ||
AT+FSCD=F:/ | +FSCD: F:/ OK |
Change current directory to “F:/” | |
AT+FSLS |
+FSLS: SUBDIRECTORIES: +FSLS: FILES: OK |
List all items in directory “F:/” | |
7 | AT+CFTPSPUTFILE=”readme.txt” |
OK +CFTPSPUTFILE: 0 |
Upload a file to FTP server |
AT+CFTPSABORT | |||
8 | AT+CFTPSLOGOUT | OK +CFTPSLOGOUT: 0 |
Logout FTP server |
9 | AT+CFTPSSTOP | +CFTPSSTOP: 0 OK |
Stop FTP service |