Can't connect sockets to send data with FreeRTOS-TCP

Yeah I don’t understan why I’ve got this address IP (168.97.10.174 and 96.24.149.22). That comes from emac_process_ip_packet(...) which is call by emac_process_eth_packet(...) due to these lines :

	printf("-- IP  %d.%d.%d.%d\n\r", p_eth->et_dest[0], p_eth->et_dest[1],
			p_eth->et_dest[2], p_eth->et_dest[3]);

	printf("-- IP  %d.%d.%d.%d\n\r",
			p_eth->et_src[0], p_eth->et_src[1], p_eth->et_src[2],
			p_eth->et_src[3]);

but after with the function emac_display_ip_packet(...) which is call just after emac_process_ip_packet(...) by emac_process_eth_packet(...) I’ve got the good Ip source and dest.

The protocol number is weird too because he changes all the time when I try to connect my PC to my card (one time it will be 0x1CE, after 0x1C8, …) but still print TCP just underneath.
But the Header Length never change it’s always 5

As far as I know, FreeRTOS+TCP has no official support for the SAM3x yet. Can you show me where to find the NetworkInterface that you are using? Or can you post it?

I post it at the 16th post. With the emac_process_ip_packet(…) and emac_process_eth_packet(…), …

My Network interface do not a lot of things, I didn’t understan how to use it.

I wonder if you are using an IP-stack from the ASF library, or are you using FreeRTOS+TCP?

I use the IP-stack task of FreeRTOS+TCP

PS. which driver does it use? Does it have a NetworkInterface.c?
Like for instance, we have a driver for SAM4E/SAM70, but that won’t work for SAM3x, I assume.

I use SAM3X8E but yeah I don’t find a driver which fit with this microcontroller so I take the board_family driver (FreeRTOS-Plus-TCP/portable/NetworkInterface/board_family at main · FreeRTOS/FreeRTOS-Plus-TCP · GitHub). And I change a little the NetworkInterface.c :

/* FreeRTOS includes. */
#include "FreeRTOS.h"
#include "list.h"

/* FreeRTOS+TCP includes. */
#include "FreeRTOS_IP.h"

/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1, then the Ethernet
 * driver will filter incoming packets and only pass the stack those packets it
 * considers need processing. */
#if ( ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES == 0 )
    #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer )    eProcessBuffer
#else
    #define ipCONSIDER_FRAME_FOR_PROCESSING( pucEthernetBuffer )    eConsiderFrameForProcessing( ( pucEthernetBuffer ) )
#endif

BaseType_t xNetworkInterfaceInitialise( void )
{
    return pdTRUE;
}

BaseType_t xNetworkInterfaceOutput( NetworkBufferDescriptor_t * const pxNetworkBuffer,
                                    BaseType_t xReleaseAfterSend )
{
    return pdTRUE;
}

I put it like this because I thought I don’t need a network interface because I receive ICMP request thanks to emac.c functions

But… this is not like a driver, these are just stubs.
ICMP requests are normally handled by the FreeRTOS+TCP stack. As for the SAM3x you will really need a complete new network driver.

Do you think I can find a Network for SAM3x or do I need to create it form nothing ?

I don’t have the hardware, and neither I have the time to develop it. But I would be happy to assist you in case you want to develop this driver,

I will try to develop the driver. It shouldn’t be so complicate because I still have the function to handled ICMP request. I will keep you informed on this post !