lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] LwIP PCBs reset


From: goldsimon
Subject: Re: [lwip-users] LwIP PCBs reset
Date: Thu, 09 Jan 2020 17:34:26 +0100
User-agent: K-9 Mail for Android


Amena El Homsi wrote:
>Hello,
>
>After disconnecting from an AP I have to reset the PCBs pools. If I did
>not
>do that and I reconnect to the AP and If I tried to bind a socket to a
>port
>that I already used in the previous connection, binding fails (port in
>use).

That should not be required. Why don't you just close all connections instead 
of such a hack? You might have SO_REUSE or something like that...

>
>To reset the PCBs I have to call memp_init() with MEMP_MEM_INIT set to
>1,
>right?

No, no, no! Hack! Don't do that. And just so that everyone reading your post 
knows this is wrong, I *had* to answer this :-)

>
>When I call memp_init(), even if I did not set MEMP_MEM_INIT to 1, DHCP
>fails.

Ok, that's strange, but your problem lies somewhere else. Just "randomly" 
wiping some memory (memp_init) might make your problems go away for now, but 
others will arise!

>
>According to wireshark capture, we send DHCP discover packet, the AP
>replies with the Offer, however we didn't enter dhcp_handle_offer()
>function.
>
>Do you have any idea what is happening?

No.

Regards,
Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]