Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

RTOS - FTP and HTTP rap API lwIP SAM4E

Posted by metio on August 16, 2016

Hi all,

I'm working on a project that combines a HTTP and FTP servers. The FTP server was implemented in later stage in the project because of the need to transfer large amount of data approximately 1 GB of data file. The applications both the ftp and the http are using raw PAW on top of lwIP. Since the http server was provided by the vendor Atmel, there are no many problems with it. My problem occurs when I want to implement both two applications to run at the same time, at the current state the ftp works if the http is enabled and other way around.

Brief Periodically retrigger timeout process. After managing the lwIP timers. trigger corresponding ethernet process. //////////////////////////////////////////////////////////////////////////////////////////////////////////// ~~~ void ethernettask(void) { /* Run polling tasks */ ethernetifinput(&gsnetif);

/* Run periodic tasks */
timers_update();

} ~~~

Brief Create ethernet task, for ethernet management. //////////////////////////////////////////////////////////////////////////////////////////////////////////// ~~~ void initethernet(void) { /** set a unique MAC address from falsh**/ setMAC_addresses();

/** Initialize lwIP */
lwip_init();				//initializes the functions enabled in lwipopts.h

/** Set hw and IP parameters, initialize MAC too */
ethernet_configure_interface();

//LLMNR_init(&gs_net_if);		//initializes the LLMNR responder
if defined(HTTPRAWUSED)
/** Bring up the web server */
http_init();	
endif
if defined(FTPRAWUSED)
/** Bring up the FTP server */
ftpd_init();
endif

} ~~~ //////////////////////////////////////////////////////////////////////////////////////////////////////////// ~~~

define TASKwebserverSTACKSIZE (4096/sizeof(portSTACKTYPE))
define TASKwebserverSTACKPRIORITY (tskIDLEPRIORITY + 3)

~~~ //////////////////////////////////////////////////////////////////////////////////////////////////////////// ~~~ static void webservertask(void *pvParameters) { UNUSED(pvParameters); /** Wait for user to read instructions. */ WAITFOR_EVENT;

while (1) {
ethernet_task();
}

} ~~~ ////////////////////////////////////////////////////// MAIN. ~~~ sysclkinit(); boardinit(); init_ethernet();

if (xTaskCreate(webservertask, "webserver", TASKwebserverSTACKSIZE, NULL,TASKwebserverSTACK_PRIORITY, NULL) != pdPASS) { } ~~~

My question is how I can possibly proceed to get the two servers working? Should I create another task for the FTP server?

Thanks in advance!


RTOS - FTP and HTTP rap API lwIP SAM4E

Posted by rtel on August 16, 2016

I'm afraid lwIP support is out of scope for this forum. We do however have our own FTP and [basic] HTTP examples running on Atmel hardware: http://www.freertos.org/FreeRTOS-Plus/FreeRTOSPlusTCP/TCPIPFATExamplesAtmelSAM4E.html


RTOS - FTP and HTTP rap API lwIP SAM4E

Posted by metio on August 16, 2016

Thank you for your quick response!!

To simplify my question... Why the FTP server cannot work when I enable the HTTP server.? Do I have to cr4eate a separate task? Thank you!!


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists