-->
Page 4 of 5

Re: Extending DHCP Options

PostPosted: Sat Feb 25, 2017 1:26 am
by quiet_coder
Ok, it compiled finally. I had to rewrite the Makefile to use only relative paths on the includes but it finished and then transferred the library over to the Arduino machine. There it compiled and did not complain about missing functions. All that's left is to upload to the chip and test. That'll probalby need to wait a bit but I'll report back when it works.

Thanks again for the pointers!

Re: Extending DHCP Options

PostPosted: Sat Feb 25, 2017 4:40 am
by quiet_coder
Works great. It picks up the NTP server from the DHCP lease and my test code can use it. I'll be expanding the code to add a few more options. There are several user defined options slots available starting with Option 244. The goal is to use these to pass things like the data logging server to the device at startup instead of hard coding it. That way I can migrate databases from one machine to the other and only need to update the DHCP server configuration to point to the new IP. Passing the NTP server will help, too, for some of my boards that are using a tick counter but no real time clock. I just have to work out the details of time zones and daylight saving.

Re: Extending DHCP Options

PostPosted: Sat Aug 26, 2017 10:42 am
by yo2lio
quiet_coder wrote:Works great. It picks up the NTP server from the DHCP lease and my test code can use it. I'll be expanding the code to add a few more options. There are several user defined options slots available starting with Option 244. The goal is to use these to pass things like the data logging server to the device at startup instead of hard coding it. That way I can migrate databases from one machine to the other and only need to update the DHCP server configuration to point to the new IP. Passing the NTP server will help, too, for some of my boards that are using a tick counter but no real time clock. I just have to work out the details of time zones and daylight saving.

Hi,

I want to add option 160 in dhcpserver. (Captive Portal option)
I changed the dhcpserver.c file, but now I need to recompile the lwip library.
Can you help me, step by step, to recompile the lwip?

Thank you very much.

Re: Extending DHCP Options

PostPosted: Mon Aug 28, 2017 6:17 am
by yo2lio
I managed to re compile the lwip lib with changed dhcpserver.c file.

Now, I have CaptivePortal option.

Thank you.