Skip to main content
trancercom
Associate
October 21, 2014
Question

STM32Cube, LwIP, not work TCP?

  • October 21, 2014
  • 2 replies
  • 915 views
Posted on October 21, 2014 at 15:28

Hello. Please help.

I uses: STM32Cube 4.3.1 + STM32F407 (STM3240G_EVAL) + Keil

I configures: Ethernet MII + LwIP

I adds ''tcp_echoclient.?'' and ''udp_echoserver.?'' from an example (http://www.st.com/web/en/catalog/tools/PF259243♯)

UDP worked correctly.

TCP did not work (cmd: ''ping 192.168.0.10'': Interval of expectation for inquiry is exceeded)

https://drive.google.com/file/d/0B20gq_La47EANFl4VDlCNi15Ukk/view?usp=sharing

https://drive.google.com/file/d/0B20gq_La47EARWFKd1F0ekU0NVE/view?usp=sharing

What doing I make incorrectly?

Excuse for my English

#stm32 #lwip #tcp/ip #stm32cubemx
This topic has been closed for replies.

2 replies

Oussema Hajjem_O
Visitor II
October 22, 2014
Posted on October 22, 2014 at 15:24

Hi  Vladimir,

This doesn't work because you are using the same port 7(in main.h) for both TCP and UDP connections, so try to use different values 

Regards.
trancercom
Associate
October 23, 2014
Posted on October 23, 2014 at 13:52

Thanks you LEO!

Finding a problem in other: 

It were necessary to set CHECKSUM_GEN - disabled:

/*----- Default Value for CHECKSUM_GEN_IP: 1 -----*/

#define CHECKSUM_GEN_IP   0

/*----- Default Value for CHECKSUM_GEN_UDP: 1 -----*/

#define CHECKSUM_GEN_UDP   0

/*----- Default Value for CHECKSUM_GEN_TCP: 1 -----*/

#define CHECKSUM_GEN_TCP   0

/*----- Default Value for CHECKSUM_GEN_ICMP: 1 -----*/

#define CHECKSUM_GEN_ICMP   0

/*----- Default Value for CHECKSUM_CHECK_IP: 1 -----*/

#define CHECKSUM_CHECK_IP   0

/*----- Default Value for CHECKSUM_CHECK_UDP: 1 -----*/

#define CHECKSUM_CHECK_UDP   0

/*----- Default Value for CHECKSUM_CHECK_TCP: 1 -----*/

#define CHECKSUM_CHECK_TCP   0

And for link callback function (netif_set_link_callback(&gnetif, ethernetif_update_config);) to establish a low priority:

HAL_NVIC_SetPriority(EXTI15_10_IRQn, 15, 0);