2014-10-21 06:28 AM
Hello. Please help.
I uses: STM32Cube 4.3.1 + STM32F407 (STM3240G_EVAL) + KeilI configures: Ethernet MII + LwIPI 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 #stm32cubemx2014-10-22 06:24 AM
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.2014-10-23 04:52 AM
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);