cancel
Showing results for 
Search instead for 
Did you mean: 

Working with sockets on the STM3210C-EVAL board

Nadav Popplewell
Associate II
Posted on July 18, 2017 at 09:26

I'm trying to write application on the STM3210C-EVAL that will open multiple tcp connections.

I've started with the VisualGDB STM32 CubeMX sample LwIP_TCP_Echo_Client sample

and it works on my eval board (the application connects to my demo tcp server)

But I want to use sockets, I don't want to have to manage the packets.

I've tried to compile the LwIP with support for sockets but I can't get it to compile.

The flags I've set in lwipopts.h are:

#define LWIP_TIMEVAL_PRIVATE 0

#define LWIP_NETCONN 1

#define LWIP_SOCKET 1

When I try to compile I get an error that lwip/netbuf.h does not exist.

Is there a way to use sockets with lwip 1.4 or is it not supported?

Thanks,

Nadav
4 REPLIES 4
Imen.D
ST Employee
Posted on July 18, 2017 at 12:16

Hello

nadavp

,

The last version of STM32CubeF1 supported LwIP v2.0.0

Have a look to the UM1713 manual for more details about LwIP: “Developing applications on STM32Cube with LwIP TCP/IP stack“.

With Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on July 19, 2017 at 11:19

Hi Imen,

Thanks for your reply,

I've been reading the UM1713 document and it looks very promising

Especially the example of TCP echoserver demonstration using the Netconn API looks good.

Is there some place where I can download the sources of the examples in the document?

Thanks,

Nadav

Posted on July 19, 2017 at 12:12

Hi

nadavp

You can download the

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef1.html

from STMicroelectronics official site, then you find the '

LwIP_TCP_Echo_Server'

example at this path:

STM32Cube_FW_F1_V1.6.0\Projects\STM3210C_EVAL\Applications\LwIP\LwIP_TCP_Echo_Server

Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on July 19, 2017 at 12:34

Hi Imen,

In the UM1713 there is a discussiong of an example of a Tcp echo server using netconn API (section 5.2.2)

This example does not seem to be included in the STM32CubeD1 v1.6

(the LwIP examples included with 

STM32CubeD1 v1.6 are using LwIP Raw API without RTOS )

Thanks,

Nadav