페이지 선택
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in pages

FTPS 통신연습 – File Download to Serial Port

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 Download to Serial Port

FTP(S) 서버로 부터 파일을 다운로드 하여 Serial Port로 출력하는 예는 다음과 같다..

 

NO Command Response 설명
1 PDP Context 설정    
2 AT+CFTPSSTART +CFTPSSTART: 0
OK
Activate PDP context to start FTP service
3 AT+CFTPSSINGLEIP=1 OK

Set data connection,

use the same port(address) of control connection

4

AT+CFTPSLOGIN=”test.rebex.net”,

21,”demo”,”password”,0

OK
+CFTPSLOGIN: 0
 
5 AT+CFTPSLIST=”/”

OK

+CFTPSLIST: DATA,95
10-19-20  03:19PM       <DIR>          pub
12-17-21  11:58AM        405 readme.txt

+CFTPSLIST: 0

List all items of  directory “/” of FTP server
6 AT+CFTPSPWD OK
+CFTPSPWD: “/”
Get current directory of FTP server
7 AT+CFTPSGET=”readme.txt”  +CFTPSGET: DATA,405
Welcome,
You are connected to an FTP or SFTP server used for testing purposes by Rebex FTP/SSL or Rebex SFTP sample code. Only read access is allowed and the FTP download speed is limited to 16KBps. For information about Rebex FTP/SSL, Rebex SFTP and other Rebex .NET components, please visit our website at https://www.rebex.net/
For feedback and support, contact support@rebex.net
Thanks!

 

+CFTPSGET: 0

Download a file from FTP server to serial port
  AT+CFTPSABORT   Abort FTP(S) operation
8 AT+CFTPSLOGOUT OK
+CFTPSLOGOUT: 0
Logout FTP server
9 AT+CFTPSSTOP +CFTPSSTOP: 0
OK
Stop FTP service

 

 

 

 

Adsense

 

 WiFi IoT Module

 

www.mxchip.com

 

 

 Bluetooth Module

www.feasycom.com

 

 

 5G/LTE/CAT-M1/NB-IoT

 

www.simcom.com

 

Viewed Page List