Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner