DHCP Server with Arduino v0.04

This library implements DHCP and DNS servers you can run on Arduino. This library should be used when you have your Arduino running an ad-hoc (IBSS) network and want to assign IP addresses to other devices that connect to the same network. The usage is simple:

#include <RedFly.h>
  uint8_t buf[590];
  byte serverIP[]  = { 192, 168, 2, 1 }; 
  char domainName[] = "mshome.net";
  char serverName[] = "arduino\x06mshome\x03net";
  buf_len = DHCPreply((RIP_MSG*)buf, buf_len, serverIP, domainName);
  buf_len = DNSreply((DNS_MSG*)buf, buf_len, serverIP, serverName);

The library is available here. The package also includes a complete example (using RedFly Wifi shield) that implements DHCP, DNS, and HTTP servers.

Leave a comment

what will you say?