FTP
File Transport Protocol
Last updated
File Transport Protocol
Last updated
In general, FTP (File Transfer Protocol) is an old protocol, not really suitable for IoT applications. But, there are many systems working on FTP for data logging.
In principal, following are steps in file transfer in FTP:
Create a local file (typically text or CSV file) with a given name and text content.
Login to given FTP server (typically an IP address) using a login name and password.
Change directory at destination FTP server
Transfer the file from local device (YuDash IoT device) to FTP server
For custom cloud server, please ensure "Use YuDash Cloud" is unchecked.
FTP settings are available within the Cloud Settings section.
There are two sections in FTP settings, which are covered in following sections:
The FTP server details
The FTP file details (file name and content).
Similar to all sub sections, you have to click on "Read FTP Settings" to load present FTP Settings. After updating, please click on "Update FTP Settings". New FTP settings block will be created if not present earlier.
FTP server includes following components:
FTP Server
The target FTP server, which is typically an IP address.
FTP User name
The user name for the given FTP server
FTP Password
The password to login to given FTP server
FTP Directory
The target FTP server directory where the payload fill will be uploaded by the YuDash IoT device.
It is advisable that FTP server credentials are verified using a FTP client PC software, for example coreFTP.
After FTP server details are configured, next step is to configure the file which will be transferred to FTP server. There are two parts to it:
File content: The file will have text content with mix of telemetry, metadata and possibly timestamp.
File Name: We need to define the file name, which will be created on given server directory. Typically, there a time stamp/snippet encoded in file name as we will uploading multiple files in same directory.
YuDash don't support appending of file in FTP. A new file is created on the FTP server. Please contact us at info@yudash.com if you have this requirement. We can surely do it, subject to business use-case!
There are two ways to create FTP files in the YuDash device. This is categorized by radio box FTP File Type".
Default: This is a default format which make a 3 line file with pre-defined file naming convention. This is used for a specific compliance server.
Generic: This is an extremely generic technique with flexibility of file name and content. In this case, file content is defined under payload setting.
The file content of generic FTP File Type is defined under Payload Settings. Basically, the payload is the content of file, which can be technically a text or JSON payload. In most of cases, text payload will be used in FTP configuration. For this, powerful YuTGT (YuDash Text Generator) is used to generate any kind of text payloads with mix of telemetry, separators and device meta-data. Please refer YuTGT TuDash Text Generator documentation to get familiar with semantics.
The file name itself is generated using the YuTGT. Following two settings are defined under "Generic FTP File Settings"
File Name TimeStamp: The time stamp format (if required) to be used in the file name creation. This is similar to TimeStamp format used in payload settings.
We will explain the FTP file creation using an example. This uses YuTGT Example#1 for payload generation.
File name encoder has following input
Sample generated file and file name: 20240518101304_file.csv
In case of connection errors to FTP server for first time, please refer to following trouble shooting guide: