Today I got to work this LWIP DHCP server code :
https://github.com/avrxml/asf/blob/master/thirdparty/lwip/lwip-tinyservices/tinydhcpserver.c
It is slightly bigger than the previous one, but it works like a charm.
I am not sure what is the difference between the packets of the previous
code and this one. At a first glance this code sends the broadcast packets
to
192.168.5.255 address which is accepted by Windows machine.   Maybe I will
compare both when I have time



On Sat, Oct 29, 2022 at 11:40 AM Artem Moroz <[email protected]> wrote:

> Hi guys!
>
> I am looking for an example of a simple DHCP Server to run on my
> STM32F746DISCO board.
> I have tried this code
> https://lists.gnu.org/archive/html/lwip-users/2012-12/msg00016.html but
> it does not work for my Windows 10 machine client.
> I have investigated the packets with Wireshark and it seems like Windows
> does not accept ACK packets from the server. The difference between the
> behaviour of this code and a standard router is that the router sends ACK
> packets to the client MAC and a newly assigned IP while the lwip sends ACK
> packets to broadcast MAC and IP addresses.
> I also know about this example
> https://github.com/nodemcu/nodemcu-firmware/blob/master/app/lwip/app/dhcpserver.c
> but it is also sending ACK brackets as broadcast. Did anybody test this?
> I believe there is a need to send packets in RAW mode to specify the IP
> and MAC of the target computer.
> Has anybody succeeded in running a working DHCP server with LWIP?
>
>
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to