Pages: [1]   Go Down
Author Topic: Ethernet: using DHCP to configure board at runtime  (Read 227 times)
0 Members and 1 Guest are viewing this topic.
Russia
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello everyone,

To let you know I have implemented a feature to allow Ethernet library user to supply and read DHCP options.

This functionality is very useful when you need to provide run-time configuration to the Arduino board. Since objective of DHCP is "host configuration" it is an ideal choice to use to pass parameters to the board. This commit also allows board to send additional options as part of the request. In my case, for example, it was necessary to provide additional Vendor Class Identifier (option 60) for the DHCP server to answer.

The sample code is available at GitHub at the link below. To summarize - you'll need to implement one or two additional functions in your sketch code and update a call to Ethernet.begin(...).

The code is pending a pull request now at https://github.com/arduino/Arduino/pull/1244. Feel free to use, comment and blame!

V.
Logged

Pages: [1]   Go Up
Jump to: