Hi Maybe...
/* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One per active UDP "connection". */ #define MEMP_NUM_UDP_PCB 3 If I recall correct dhcp uses a pcb from the "common" udp pool so you should set it at 3 or above if you want two of your own at the same time. Or you can post your lwipopts.h so we can have a look BR /Jens >----Ursprungligt meddelande---- >Från : [email protected] >Datum : 2015-06-16 - 16:54 (WEDT) >Till : [email protected] >Ämne : [lwip-users] Two UDP kills DHCP? > >Hi all, > >I am picking up an old lwip project to add an extra function via a new >UDP socket. > >The original project runs on lwip 1.4.1 without RTOS. It has one UDP and >one TCP sockets, simple HTTP support, and it acquires its IP via DHCP. > >The orders are like > >http_init; > >udp_new >udp_bind >udp_recv > >tcp_new >tcp_bind >tcp_accept > >It still runs fine > >So I begin to add new codes to support the second UDP socket > >http_init; > >udp_new >udp_bind >udp_recv > >p_pcb=udp_new(); <<< new UDP socket > >tcp_new >tcp_bind >tcp_accept > >but this new line (which did't not return any error) will cause DHCP not >working any more, it will not acquire an IP. > >I assume something may be set up wrong in lwipopts.h, but I couldn't >figure out what > >Can anyone give me a pointer? > >Thanks! > > > > >_______________________________________________ >lwip-users mailing list >[email protected] >https://lists.nongnu.org/mailman/listinfo/lwip-users > _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
