lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] How do I receive UDP packets with unconfigred IP address.


From: Rogier Wolff
Subject: [lwip-users] How do I receive UDP packets with unconfigred IP address.
Date: Wed, 20 Jan 2021 23:03:42 +0100

Hi, 

I have an application where an UDP server listens on a port. When I've
got the IP address configured, everything works. But I want to be able
to broadcast to the device on that port to configure the IP
address. Lwip seems to recieve the broadcast, but it doesn't call my
incoming-udp-callback when no IP address is configured. DHCP is not an
option. (I want to reinvent the wheel :-) ).

I would have hoped that even with ip address wronly configured, it
would pass the packet on to my udp-recieve function and that I could
then decide what to do. But it seems that the packet is discarded as
"not for me". 

How can I provisionally configure lwip to accept broadcast packets if
I don't know an IP address yet? Or maybe I should specify another
"bind-address" when creating the UDP socket? I now specify "any"
(0.0.0.0)...

        Roger.

-- 
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.



reply via email to

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