Question
STM32F769 Disco LWIP DHCP Can not get IP address
Hello,
I am currently working on the project with STM32F769 Disco and i want to use ethernet (with RTOS).
I configured all the options in CubeMX and I have a problem with getting IP address using DHCP.
The problem is that I get the IP address only in 50% of my tries.
I turned on LWIP Stats, this is example when I get ip address:
dhcp_start(netif=20003314) st0
dhcp_start(): mallocing new DHCP client
dhcp_start(): allocated dhcpdhcp_start(): starting DHCP configuration
dhcp_discover()
transaction id xid(181c)
dhcp_discover: making request
dhcp_discover: realloc()ing
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)
dhcp_discover: deleting()ing
Assertion "dhcp_delete_msg: dhcp->p_out != NULL" failed at line 1902 in ../Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.c
Assertion "dhcp_delete_msg: dhcp->msg_out != NULL" failed at line 1903 in ../Middlewares/Third_Party/LwIP/src/core/ipv4/dhcp.c
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 4000 msecs
dhcp_recv(pbuf = 2000a53c) from DHCP server 192.168.63.2 port 67
pbuf->len = 308
pbuf->tot_len = 308
netif->hwaddr[0]==12 != reply_msg->chaddr[0]==2c
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): CHECKING, ARP request timed out
dhcp_bind(netif=20003314) st0
dhcp_bind(): t0 renewal timer 691200 secs
dhcp_bind(): set request timeout 691200000 msecs
dhcp_bind(): t1 renewal timer 345600 secs
dhcp_bind(): set request timeout 345600000 msecs
dhcp_bind(): t2 rebind timer 604800 secs
dhcp_bind(): set request timeout 604800000 msecs
dhcp_bind(): IP: 0x7f3fa8c0 SN: 0x00ffffff GW: 0x0b3fa8c0And this is the example when I can not get IP address
dhcp_start(netif=20003314) st0
dhcp_start(): mallocing new DHCP client
dhcp_start(): allocated dhcpdhcp_start(): starting DHCP configuration
dhcp_discover()
transaction id xid(181c)
dhcp_discover: making request
dhcp_discover: realloc()ing
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 2000 msecs
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
transaction id xid(181c)
dhcp_discover: making request
dhcp_discover: realloc()ing
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 4000 msecs
dhcp_fine_tmr(): request timeout
dhcp_timeout()
dhcp_timeout(): restarting discovery
dhcp_discover()
transaction id xid(181c)
dhcp_discover: making request
dhcp_discover: realloc()ing
dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)
dhcp_discover: deleting()ing
dhcp_discover: SELECTING
dhcp_discover(): set request timeout 8000 msecsWhat could be a solution for such problem?
Thnak you,
Anton
