PutGetOption (Send or Receive a File)
Determines 1) whether the datalogger will send or retrieve a file, 2) whether active or passive mode is used, and 3) whether FTP
Passive mode is not applicable with SFTP.
Active vs. Passive mode
In active mode, the client initiates contact with the server and the server must connect back to the client on the port specified by the client. This response from the server may be blocked by the client’s firewall. Passive mode resolves the issue of firewalls by having the client issue a PASV command that opens two random unprivileged ports to the server. In response to the PASV command from the client, the server sends a random port number back to the client. Finally, the client initiates a connection from the server via the port specified by the server. Not all servers support passive mode.
FTPS
The default server port for implicit FTPS is 990. Otherwise, explicit security is used. Implicit security automatically begins with an SSL connection as soon as the FTP client connects to an FTP server, whereas with explicit security, the client and server negotiate the level of protection used.
SFTP
The default server port for SFTP is 22. In order to utilize SFTP, an SFTP Public Key and SFTP Private Key must be set in the datalogger's advanced settings (see the Settings Editor). If these two settings are set and if the server advertises that it can authenticate with a Public/Private key pair, then authentication is attempted using this setting along with the user name and password parameters. Note a limitation with this: if more than one SFTP server is used in the program and if they require the public/private key pair authentication method, then the same public/private key pair must work for each server.
Right-click the parameter to display a list with the options:
Option Code | Description |
---|---|
0 | FTP - Store file to server, active mode |
1 | FTP - Retrieve file from server, active mode |
2 | FTP - Store file to server, passive mode |
3 | FTP - Retrieve file from server, passive mode |
4 | FTP - Delete file on server |
5 | FTP - Rename file on server |
6 | FTP - Directory listing, active mode. Returns a directory listing (instead of a file) into LocalFileName. The path to the directory of the FTP server from which to return the directory listing is specified in the RemoteFileName parameter. This is similar to the FTP LIST command. -6 returns file names only (similar to NLST) |
7 | FTP - Directory listing, passive mode. Returns a directory listing (instead of a file) into LocalFileName. The path to the directory of the FTP server from which to return the directory listing is specified in the RemoteFileName parameter. This is similar to the FTP LIST command.-7 returns file names only (similar to NLST) |
8 | FTP - Append data to end of file, active mode (creates a file if it does not already exist) |
9 | FTP - Append data to end of file, passive mode (creates a file if it does not already exist) |
10 | FTPS - Store file to server, active mode |
11 | FTPS - Retrieve file from server, active mode |
12 | FTPS - Store file to server, passive mode |
13 | FTPS - Retrieve file from server, passive mode |
14 | FTPS - Delete file on server |
15 | FTPS - Rename file on server |
16 | FTPS - Directory listing, active mode. Returns a directory listing (instead of a file) into LocalFileName. The path to the directory of the FTP server from which to return the directory listing is specified in the RemoteFileName parameter. This is similar to the FTPS LIST command. -16 returns file names only (similar to NLST) |
17 | FTPS - Directory listing, passive mode. Returns a directory listing (instead of a file) into LocalFileName. The path to the directory of the FTP server from which to return the directory listing is specified in the RemoteFileName parameter. This is similar to the FTPS LIST command.-17 returns file names only (similar to NLST) |
18 | FTPS - Append data to end of file, active mode (creates a file if it does not already exist) |
19 | FTPS - Append data to end of file, passive mode (creates a file if it does not already exist) |
20 | SFTP - Store file to server, active mode |
21 | SFTP - Retrieve file from server, active mode |
24 | SFTP - Delete file on server |
25 | SFTP - Rename file on server |
26 | SFTP - Directory listing, active mode. Returns a directory listing (instead of a file) into LocalFileName. The path to the directory of the FTP server from which to return the directory listing is specified in the RemoteFileName parameter. This is similar to the SFTP LIST command. -26 returns file names only (similar to NLST) |
27 | SFTP - Directory listing, passive mode. Returns a directory listing (instead of a file) into LocalFileName. The path to the directory of the FTP server from which to return the directory listing is specified in the RemoteFileName parameter. This is similar to the SFTP LIST command.-27 returns file names only (similar to NLST) |
28 | SFTP - Append data to end of file, active mode (creates a file if it does not already exist) |
FTPS(TLS)
Type: Variable