FreeRTOS TCP Stack

lciummo wrote on Friday, August 07, 2015:

I’ve integrated the FreeRTOS labs TCP stack and it seems to work sporadically. Pings sometimes work (usually fails when host doesn’t get ARP response from board). The board seems to send out gratuitous arps periodically, and sometimes even responds to an ARP request for it’s IP. Sometimes to board will respond to connect requests from clients (SYN get SYN/ACT request), and sometimes my client just keeps retransmitting the SYN requests w/o any reponse from the board.

I’ve got a lot of IP tracing turned on. Lots of output - maybe too much. I use a EMAC driver that sends a semaphore to a task that picks up new Ethernet packets and sends them on as network buffers. Most of this seems to work OK.

I don’t have any quesses on what’s wrong, other than ARP timing looks a bit strange. Anything I should look at to pin this down more?


heinbali01 wrote on Friday, August 07, 2015:

Hi Larry,

Which platform and which driver (“NetworkInterface.c”) are you using?

I’ve got a lot of IP tracing turned on. Lots of output - maybe too much

If you use TCP or UDP to output the IP tracing, you might end-up tracing the tracing messages.

If that happens you might want to define ipconfigTCP_MAY_LOG_PORT in your ‘FreeRTOSIPConfig.h’.
If you use e.g. port 1005 for logging define this:

#define ipconfigTCP_MAY_LOG_PORT(xPort)			( ( xPort ) != 1005 )

But I get the impression that your EMAC driver is not working properly yet.
FreeRTOS is about to bring out a new release of +TCP, with several EMAC drivers.

Feel free to contact FreeRTOS directly and we’ll send you a NetworkInterface.c immediately.


lciummo wrote on Sunday, August 09, 2015:

I’m on a Freescale Kinetis Tower board - K60. The neworkinterface.c is my own. I used an EMAC.c from another FreeRtos stack (EMAC.C) that I’ve modified to work with ny networkinterace.c. Receive interrupts notify a networkinterface task via a counting semaphore to send the frames into the stack.

Writes are done directly from the networkinterface.c write interface via EMAC.c.

My traces are done via the SWO at 6Mhz, so while they are very busy, I don’t think they are interfering.

I could use a tested networkinterface.c for Kinetis K60. If I get mine working today, I could make it availale.

BTW, What does “contact FreeRTOS” directly mean - call Richard directly?

I also need to get the FreeRTOS TCP working with SafeRTOS next week - are they any known issues with that? I assume if I map the calls over it should work OK.

Thanks again,

heinbali01 wrote on Sunday, August 09, 2015:

Hi Larry,

BTW, What does “contact FreeRTOS” directly mean - call Richard directly?

Yes or write to h.tibosch at freertos period org.
Unfortunately I have no experience with Freescale products yet (Richard certainly does).
But it will be usefull to have a look at your NetworkInterace.c and FreeRTOSIPConfig.h