This seems to be some memory management/conflict problem between FreeRTOS, lwIP and AVR

Will report if I can pin-point the problem


Message: 2
Date: Tue, 18 Sep 2012 12:54:08 -0400
From: Chen <[email protected]>
To: [email protected]
Subject: [lwip-users] DHCP OK but TCP not?
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"; Format="flowed"

Hi there,

I have been developing my project using static IP and every works
great, now I wanted to turn on DHCP

Bad news, DHCP got the IP assigned, but I can't connect to it via TCP
anymore (UDP works fine), and the only difference in codes are

    if (DHCP){
         //This gets the IP, but I can't open via TCP
            IP4_ADDR( &xIpAddr,0,0,0,0 );
            IP4_ADDR( &xNetMask,255,255,255,0 );
            IP4_ADDR( &xGateway,0,0,0,0 );
            netif_add( &MACB_if, &xIpAddr, &xNetMask, &xGateway,
NULL, ethernetif_init, tcpip_input );

            netif_set_default( &MACB_if );

            dhcp_start(&MACB_if);
    }
    else{
         //This works perfectly
            IP4_ADDR( &xIpAddr,myIP[0],myIP[1],myIP[2],myIP[3]);
            IP4_ADDR( &xNetMask,255,255,255,0 );
            IP4_ADDR( &xGateway,0,0,0,0 );
            netif_add( &MACB_if, &xIpAddr, &xNetMask, &xGateway,
NULL, ethernetif_init, tcpip_input );

            netif_set_default( &MACB_if );
            netif_set_up( &MACB_if );
    }

......
//If DHCP is used, it will not returned from this call
clientfd = lwip_accept(lSocket, (struct sockaddr*)&client_addr,
(socklen_t)&addrlen);


I am using lwip 1.32 on AVR32. Is there a known bug like this?

Thanks for your time!
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to