TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139260 times)
  2. FAT32 Library (71751 times)
  3. Network Ethernet Library (57123 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43086 times)
  6. FT800 Library (42404 times)
  7. GSM click (29835 times)
  8. mikroSDK (28079 times)
  9. PID Library (26885 times)
  10. microSD click (26198 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Example

FTP Server

Rating:

0

Author: Vladimir Djukovic

Last Updated: 2013-09-01

Package Version: 1.0.0.0

Example: 1.0.0.0

Category: Communication

Downloaded: 1362 times

Not followed.

License: MIT license  

Demo - test; Simple embedded FTP server application in LAN environment based on PIC18F devices; Can be useful for special purposes. More on project blog page.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "FTP Server" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "FTP Server" changes.

Do you want to report abuse regarding "FTP Server".

  • Information
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Example Blog


CLIENT - SERVER mode of operation characteristics:

The main point is to allow a PC connected over Ethernet to the server
to access the server's file content and to download it.


Blosk schematic :

 

test

test

test example

View full image

 

PC FTP client software - command line interface:
 - Standard command prompt FTP service:

- Only active mode connection (server initiates data channel opening):
- Supported FTP client actions on the file content: RETR command only
- in other words this embedded FTP service at the moment provides
an opportunity for a client machine to download the file content stored in the server's storage
memory.

 Server default IP address: 192.168.0.1
Primary intended to be directly connected via Ethernet cable to the Network
Interface Card of a PC at a distance. As in the previous block schematic.
Code is written to serve for that needs.

Provide file accessing to only one client machine at the same time:
two static allocated socket in code: Control(port service 21), and Data (port 20) socket:

There is no working guarantee in a "real" LAN (noted some file content
loses while it is being downloaded)

Transfer speed low: max noted 7 kb/s

FTP process "state machine" should be improved to provide all flexibility.
In this code examples the FTP timeout is not appllied, but it change nothing
for testing purpose.


STORAGE characteristics:

- supported file system: only FAT16 (FAT); 8.3 file name format.
- only root directory handling.
- up to several files (seven/eight max). Care should be taken - do not allow to much files to
be present in the storage at the same time, in otherwise it shall cause server fail
while receives a directory listing command from client. The main point here is that the directory
listing content must be no more than 512 bytes in size (TCP Tx buffer size). Used library for this is the compiler's MMC FAT library -there is no routine that returns the directory listing pointer while reading its content, than directly print directory content to an output medium while the listing is being read - byte by byte (ascii by ascii).

 

HARDWARE CONFIGURATION:

Tools/Components:

EasyPICv7development system:http://www.mikroe.com/easypic/                                                                                               Serial Ethernet board: http://www.mikroe.com/add-on-boards/communication/serial-ethernet/ 
mikroSD Card board:
http://www.mikroe.com/add-on-boards/storage/microsd-card/                                       StartUSB for PIC board: http://www.mikroe.com/startusb/pic/
74HCT244 3-state bus driver IC:   http://pdf.datasheetcatalog.com/datasheet/philips/74HC_HCT244_CNV_2.pdf 

1. FTP server with PIC18F4620/ENC28J60 + MMC SD card 2GB. Only as an example for FTP server code. MMC storage already contains previously stored files (eg. via a card reader) . Since the transfer speed is only about 7kb/s, it is not recommended to test another file formats out of the group of file formats that can be considered as documents (txt files, short pdf..)  
 

2. Configuration with two subsystem counterparts.
   - FTP Server as in 1.
   - Subsystem with PIC18F2550 for working with server's storage memory content (arranging the file
 content in MMC card memory space - after that the file content can be accessed by a client machine)
 Additional information can be found in MMC_2550_storage.h file.

 This configuration could be useful for some spwecial purposes: eg. the user can write its own
 firmware for PIC18F2550 to serve for file storing into the server's storage space (MMC card)
 or any other actions applied on the file content. Files themselves can be generated by the firmware
 itself or e.g. to be obtained through UART, USB connection from another machine, etc.
 Use compiler's MMC FAT Library for this purpose.

 This part is still under development but as a prototype like here can be usefull for purposes where
 few files are to be present in a storage at any given moment, while letting their content to be retrieved by another (client) computer through FTP/TCP/IP/Ethernet (application-session/transport/network/connection)

 

MAIN LIBRARIES USED:

- Network Ethernet Library: http://www.libstock.com/projects/view/107/network-ethernet-library

- MMC Library (compiler)

 

SCHEMATICS:

video 1

configuration 1 test example

Watch on YouTube

video2

configuration 2 test example

Watch on YouTube

ALSO FROM THIS AUTHOR

Modbus RTU Master Implementation; GUI - demo

5

The project contains a simple graphical user interface software mainly used as a testing tool and integral part of the entire application which refers to the Modbus RTU application protocol implemented in master controllers based on MCUs. NEW: Modbus RTU Master function codes library, basic functions added

[Learn More]

Modbus RTU Implementation & Ladder Logic

5

This project contains some library code aimed to be used for developing slave PLC type controllers using microcontrollers for their hardware configurations

[Learn More]

Programmable Timer

4

An timer application with four independent programmable outputs each one with eight ON/OFF programs on daily basis (0-24h). Fully supported via an character LCD interface gives a comfort of setting the desired program. Additional usefull settings implemented also.

[Learn More]