Click here to Skip to main content
15,884,099 members
Articles / Mobile Apps

FTP Server for XP Embedded

Rate me:
Please Sign up or sign in to vote.
4.33/5 (5 votes)
3 Aug 2005CPOL1 min read 55.9K   866   32   4
A minimalistic FTP server for XPe-powered systems.

MiniFTP screenshot

Introduction

I think that I'm not the only one who's experimenting with XP Embedded - feature rich, componentized version of Windows XP Professional. This system may be used in "black boxes" which contain a fully functional OS, but only with necessary components and may boot from ROM.

Background

The typical way to add FTP functionality in embedded systems powered by XPe is to use IIS FTP. It's relatively easy, but this way has some limitations: the size of image will grow, IIS requires 'heavy' components; IIS cannot be used with Minlogon because it relies on NTLM authentication; for simple tasks like up/downloading some files, IIS is overkill; no easy way to append custom commands. The solution is to use some lightweight FTP server like this one: a single class offers nearly full FTP functionality, and supports commands defined in RFC 959 plus any custom ones. There are several limitations, which won't be critical for embedded FTP servers (from my point of view): only one user with 'administrative' rights, only one directory without subfolders, only one user may be connected to the server.

Using the code

To use the code, just add CFTPServerT<>-based class to your code. Custom command handling may be made through 'command handlers' FTP_COMMAND_HANDLER(_T("some_custom_cmd"), handler_func), you may see the sample in the code, it's well commented. Custom command handlers allow to use any non-standard commands for e.g. remote restart, shutdown, upgrade and any other tasks still using FTP. You may embed this server right into your software, just keep in mind the 'KISS' principle. The sample is an easy console application, but may be converted into a service very quickly.

History

  • August, 2005 - the initial version 1.0.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer TV-Projects
Russian Federation Russian Federation
See my profile @ LinkedIn: http://ru.linkedin.com/in/dmitryivanov
My Blog: http://dmitryivanov.net

Comments and Discussions

 
GeneralExactly what I've been looking for Pin
alanteigne23-Jun-08 5:20
alanteigne23-Jun-08 5:20 
GeneralRe: Exactly what I've been looking for Pin
alanteigne23-Jun-08 11:09
alanteigne23-Jun-08 11:09 
GeneralRe: Exactly what I've been looking for Pin
alanteigne26-Jun-08 5:38
alanteigne26-Jun-08 5:38 
GeneralRe: Exactly what I've been looking for Pin
Dmitry Ivanov27-Jun-08 10:15
Dmitry Ivanov27-Jun-08 10:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.