[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Two UDP kills DHCP?
From: |
Jens Nielsen |
Subject: |
Re: [lwip-users] Two UDP kills DHCP? |
Date: |
Tue, 16 Jun 2015 17:46:39 +0200 (CEST) |
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 : address@hidden
>Datum : 2015-06-16 - 16:54 (WEDT)
>Till : address@hidden
>Ä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
>address@hidden
>https://lists.nongnu.org/mailman/listinfo/lwip-users
>