ParticleFtpClient (community library)


Name Value
Name ParticleFtpClient
Version 0.0.4
Installs 14261
License MIT
Author Joon-Yee Chuah
Download .tar.gz
All Versions 0.0.4, 0.0.3, 0.0.2, 0.0.1

A library that implements PASV FTP

Example Build Testing

Device OS Version:

This table is generated from an automated build. Success only indicates that the code compiled successfully.

Library Read Me

This content is provided by the library maintainer and has not been validated or approved.


A library for platform devices to perform simple FTP commands.

ParticleFtpClient ftp;

Most methods mirror FTP commands. To log into an FTP server, you must successively call"hostname", timeout), ftp.user("username") and ftp.pass("password"). Each should return true.


FTP can be a slow protocol. Therefore, the open method has a timeout parameter in integer seconds. Certain methods will timeout. I've tried to make the client as robust as possible, but occassionally things will happen "out of sequence" and you may wish to retry your ftp commands.

Passive Mode

This library implements a passive mode client only. TLDR, The server needs to support passive mode.

In passive mode, any time the server needs to send or receive extensive data, the client will automatically send a PASV command. The server responds with a new port used for the data transfer. The sender of the data (either the client when uploading or server when downloading) stops the connection when the data transfer is finished and the port is discarded.

Downloading Files

Certain methods (list, retr) requires the use of a passive connection. Therefore, ParticleFTPClient exposes a public TCPClient member data. For methods that retrieve passive data (list and retr), you may reasonably expect server sent data as long as data remaines connected. For example:

// Initiate a download
// While the connection remains open, the server still intends to send data.
while ( {
// Read what data is in the current packet
while ( {
// get another byte
char c =;
Uploading Files

The stor method allows a file upload, using the data member. Call finish when you are done uploading. It will stop the data connection and flush any server responses. (There may be a timeout here.) For example:

// Set the file type to ASCII
// Initiate an upload
for (int i = 0; i < strlen(data); i++) {[i]);
// Call finish when you are done uploading. You may expect a timeout here.

If you want verbose serial output for server responses, uncomment #define PARTICLE_FTP_DEBUG in ParticleFtpClient.cpp

Browse Library Files