关注官方微信

中文.

Products

Products

The FTP Function of Serial to RJ45 Module

Published Time: 2013-01-05 Author: Shanghai ZLAN Views: 6532

ZLSN2000, ZLSN2002 and other ZLAN serial to RJ45 modules not only support the ordinary Ethernet transparent transfer function, and also support for a variety of high-level protocols, the FTP is one of the protocols supported.

1. Overview of FTP function of serial to RJ45 module

FTP is a file transfer protocol, which is divided into two types: FTP server and FTP client. The FTP Server can be implemented by using server software such as Server-U. Here we introduce realizing FTP client function through serial to RJ45 module ZLSN2000, as using embedded style to obtain a file or upload a file from the FTP server of Server-U through serial to RJ45 module.

2. Usage of FTP function of serial to RJ45 module

As shown in the figure, serial to RJ45 module ZLSN2000 can maintain two TCP connections at the same time, respectively connected to the control port 21 of the FTP server and the data port. In two connections, the control connection is responsible for the control of the FTP command; Data connection is responsible for the transfer of file data.

The serial to RJ45 module ZLSN2000 outputs the file contents obtained from the FTP server from the serial port to the user. If uploading data, the user sends the contents of the FTP file from the serial port to ZLSN2000.

In terms of setup, the user send the IP address of the FTP server and the file name needed to obtain to ZLSN2000 through serial to RJ45 module ZLSN2000, then ZLSN2000 can access the contents of this file and output from a serial port.

The FTP function of ZLSN2000 support the continuation of the breakpoint, that is, the first time the file is not transmitted completely, and the second time it gets the file from the last obtained location of the file.

3. Application

The serial to RJ45 module provides a method of single chip microcomputer and embedded system to obtain FTP files via serial port. In the era of Internet of things, this embedded FTP function has many good applications:

1) File upload: we know that the pages on the Internet can be uploaded via FTP, so the serial to RJ45 module can upload the acquisition data to Web server via pages after they have the FTP function.

2) File download: the SCM can download the updated configuration files on the server, which provides an easy way to communicate with the SCM terminal on the Internet and update cofiguration.