lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] DHCP Server with LWIP


From: Artem Moroz
Subject: Re: [lwip-users] DHCP Server with LWIP
Date: Mon, 31 Oct 2022 18:33:09 +0200

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 <artem.moroz@gmail.com> 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?


reply via email to

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