GithubHelp home page GithubHelp logo

entropia1ac / ftpino Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mihaigalos/ftpino

0.0 1.0 0.0 12.7 MB

A tiny FTP Server and Client for your Photon / Arduino projects.

License: GNU General Public License v3.0

C++ 98.14% C 1.86%

ftpino's Introduction

FTPino license

A tiny FTP Server and Client for your Photon / Arduino projects. alt tag

#Description FTPino is a lightweight FTPServer and/or client for logging, storing or fetching your data. It is built on the Particle's Photon hardware and comes in two flavors:

  • SDCard Filesystem : based on SDFatLib's library, the filesystem is on a SD Card and I/O operations on files are performed on the card.
  • EEProm Filesystem : experimental, not yet fully functional. Support will be added for storing small files in the EEPROM, so the I/O operations on files will be made there.

#Hardware

SDCard breakout

Certain important things need to be considered when searching for a SDCard breakout board:

  • the pin logic on the SD is at 3.3V, not 5V.
  • the VDD may draw a lot of current, up to 150mA when writing. You cannot supply the board from an output I/O pin directly, for most pins cannot handle neither delivering nor sinking that much current.

If you scout the web a bit for a decent SDCard breakout board, you'll find most are only pin-compatible with Arduino. Cool, what about the Photon? Unfortunately, I couldn't find a one that directly fits the Photon, but the Pololu cut it pretty close.

The SPI pins directly overlap those of the Photon. Only problem was with the GND and VDD pins which couldn't be directly connected. alt tag

My proposed solution consists of soldering the GND of the next pin and cutting it so it doesn't go into the Photon's pin headers. As for the VDD, an airwire was needed. alt tag

#Speed

PC <- Read  <- FTPino : 500 kB/s
PC -> Write -> FTPino : 300 kB/s

#FTP Client (PC) If you choose to interact with FTPino from a PC, I would reccomend using FTPRush FTP client (http://www.wftpserver.com/download.htm) Other clients I've used are FileZilla and FreeCommander, although with those, you can only read from the remote SDCard.

In respect to FTPRush, you must configure your client to use a single socket for data. In v2.1.8 this can be found under Options -> Transfer -> Single connection mode (must be checked).

I've had a bittersweet experience trying to validate FTPino with FileZilla. Most operations work if one respects the prerequisite of setting a single data socket. All except the Store command. This is responsible for sending data to FTPino for it to be written to the SD.

FTP Active mode just doesn't work. In Passive mode, the data is sent, received and written to the SD as you would expect. Except the last couple of kB.

My only explanation as to what is happening is that FileZilla writes to FTPino's buffer without checking if the buffer is full ? and closes the connection, before the client has had a chance to read the whole file.. ?

Code requirements

FTPino was tested on Particle's Photon only. The linker output is presented below (server-only version, for client version flash usage is 1kB higher).

Output of arm-none-eabi-size:

text	data	bss		dec		hex
37740	208		1180	39128	98

In a nutshell:
Flash used	37948 / 110592	34.3 %
RAM used	1388 / 20480	6.8 %

License

This software is freely available under the GNU GPL v3.0 aegis, please consult the LICENSE file for further information.

ftpino's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.