cancel
Showing results for 
Search instead for 
Did you mean: 

LWIP Udp Maximum Payload Length

mohamad_armoon
Associate III
Posted on August 21, 2017 at 15:18

hi everybody

i am trying to transfer large amount of data through UDP to PC from my STM32F407.

the problem is when i want to send more than 1500 bytes , i get nothing on PC side.

it seems LWIP (which is generated and configured by CubeMX) is limiting the packet size. by default UDP packet should transfer about 64kb in each packet.

i found in stm32f4xx_hal_conf.h these 2 lines :

&sharpdefine ETH_RX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for receive               */

&sharpdefine ETH_TX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for transmit              */

&sharpdefine ETH_RXBUFNB                    ((uint32_t)4)       /* 4 Rx buffers of size ETH_RX_BUF_SIZE  */

&sharpdefine ETH_TXBUFNB                    ((uint32_t)4)       /* 4 Tx buffers of size ETH_TX_BUF_SIZE  */

i increased the value of ETH_TXBUFNB to 10 but i still can not send about 2k packet.

any help would be great.

Thanks in Advance

M.A.

#lwip-stm32 #stm32f4 #hal #cube-mx #lwip*
0 REPLIES 0