Regarding Netconn API sample example for atme
Posted by Anurag
on July 5, 2012
Is their any example for support Netconn API sample like echo server or webserver for Atmel microcontroller AT91SAM9XE-EK.i have done changes example as per LwIP TCP/IP stack demonstration
for STM32F2x7xx microcontrollers Application for echo using netconn API.code is compile and echo server is not running.please guide me How i can fixed this issue.
Sampple code is
Example of a TCP echoserver demo using the Netconn API
From the application point of view, the Netconn API offers a simpler way for developing
TCP/IP applications than the raw API. This is because it has a more intuitive sequential API.
The following example shows a TCP echoserver demo developed with the Netconn API. It is
an extract of the main.c file.
/* configure Ethernet (GPIOs, clocks, MAC, DMA) */
/* Initilaize the LwIP stack */
/* Initialize tcp echo server */
/* Start scheduler */
/* We should never get here as control is now taken by the
for( ;; );
sys_thread_new("tcpecho_thread", tcpecho_thread, NULL,\
static void tcpecho_thread(void *arg)
struct netconn *conn, *newconn;
/* Create a new connection identifier. */
conn = netconn_new(NETCONN_TCP);
/* Bind connection to well known port number 7. */
err = netconn_bind(conn, NULL, 7);
if (err == ERR_OK)
/* Tell connection to go into listening mode. */
/* Grab new connection. */
newconn = netconn_accept(conn);
/* Process the new connection. */
struct netbuf *buf;
while ((buf = netconn_recv(newconn)) != NULL)
netbuf_data(buf, &data, &len);
netconn_write(newconn, data, len, NETCONN_COPY);
while (netbuf_next(buf) >= 0);
/* Close connection and discard connection identifier. */
printf(" can not bind TCP netconn");
printf("can not create TCP netconn");
RE: Regarding Netconn API sample example for atme
Posted by Richard
on July 5, 2012
Sorry - I cannot provide free support for other peoples code.
Previous responses on questions regarding the Netconn API can be seen here
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.