Dear All, I have a basic scenario where my MBEDTLS application uses LWIP sockets. So far I have used static IP address with my mbedtls application and it worked well, and today, I wanted to use DCHP to replace the static configuration with dynamic address config and I do not get any address because the DHCP process keeps sending DHCP Discover. Bellow I have a DHCP Debug Log and also Wireshark.
Thanks in advance. Here is where I call the DHCP process.. static void tcpip_init_done(void* arg){ ip4_addr_t zero = {0}; netif_set_default(netif_add(&netif_tap, &zero, &zero, &zero, NULL, tapif_init, tcpip_input)); netif_set_up(&netif_tap); mbedtls_printf("===>LWIP_HTTPS::Interface [%c%c] set.\n", netif_tap.name[0], netif_tap.name[1]); if(dhcp_start(&netif_tap) == ERR_OK){ mbedtls_printf("===>LWIP_HTTPS::dhcp start OK\n"); } //ready to go //os_sem_post(sem); } Further inspection, the Debug messages show ===>LWIP_HTTPS::Interface [tp] set. dhcp_start(netif=0x000401c8) tp1 dhcp_start(): starting new DHCP client dhcp_start(): allocated dhcpdhcp_start(): starting DHCP configuration dhcp_discover() transaction id xid(0) 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 ===>LWIP_HTTPS::dhcp start OK dhcp_arp_reply() dhcp_fine_tmr(): request timeout dhcp_timeout() dhcp_timeout(): restarting discovery dhcp_discover() transaction id xid(0) dhcp_discover: making request dhcp_discover: realloc()ing dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT) ........... and I also confirmed it using Wireshark. 8 7.964857416 0.0.0.0 255.255.255.255 DHCP 350 DHCP Discover - Transaction ID 0x0 Frame 8: 350 bytes on wire (2800 bits), 350 bytes captured (2800 bits) on interface 0 Ethernet II, Src: Woonsang_04:05:06 (00:02:03:04:05:06), Dst: Broadcast (ff:ff:ff:ff:ff:ff) Internet Protocol Version 4, Src: 0.0.0.0, Dst: 255.255.255.255 User Datagram Protocol, Src Port: 68, Dst Port: 67 Bootstrap Protocol (Discover) Message type: Boot Request (1) Hardware type: Ethernet (0x01) Hardware address length: 6 Hops: 0 Transaction ID: 0x00000000 Seconds elapsed: 0 Bootp flags: 0x0000 (Unicast) Client IP address: 0.0.0.0 Your (client) IP address: 0.0.0.0 Next server IP address: 0.0.0.0 Relay agent IP address: 0.0.0.0 Client MAC address: Woonsang_04:05:06 (00:02:03:04:05:06) Client hardware address padding: 00000000000000000000 Server host name not given Boot file name not given Magic cookie: DHCP Option: (53) DHCP Message Type (Discover) Option: (57) Maximum DHCP Message Size Option: (55) Parameter Request List Option: (255) End Padding: 000000000000000000000000000000000000000000000000... -- View this message in context: http://lwip.100.n7.nabble.com/LWIP-1-4-1-DHCP-not-working-tp30572.html Sent from the lwip-users mailing list archive at Nabble.com. _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users