31 #include <FlowScanner.h>
40 static const uint8_t
CS_PIN = 10;
52 Serial.println(F(
"EtherDune DHCP sample"));
53 Serial.print(F(
"Free RAM: ")); Serial.println(ACross::getFreeRam());
54 Serial.println(F(
"Press any key to start..."));
56 while (!Serial.available());
61 ACERROR(
"failed to start EtherDune");
63 ACINFO(
"waiting for link...");
69 Serial.println(
"Obtaining DHCP configuration...");
73 Serial.println(F(
"DHCP setup failed"));
77 Serial.println(F(
"DHCP setup OK"));
79 Serial.println(F(
"DHCP config:"));
80 Serial.print(F(
"Local IP: "));
82 Serial.print(F(
"Network mask: "));
84 Serial.print(F(
"Gateway IP: "));
86 Serial.print(F(
"DNS IP: "));
89 Serial.println(F(
"\nDHCP works!"));
static bool begin(uint8_t cspin)
Initializes EtherDune and the underlying hardware
static IPAddress netmask
Subnet mask.
static IPAddress gatewayIP
IP address of the gateway in this network.
static const uint8_t CS_PIN
bool dhcpSetup()
Attempts to configure the IP settings: local IP, subnet mask, gateway and DNS via DHCP...
static MACAddress_P mymac
static bool isLinkUp()
Determines whether the network link is ready
static IPAddress dnsIP
IP address of the DNS server to use.
static MACAddress localMAC
Ethernet MAC address.
static void loop()
Gives processing time to EtherDune so that it can check for incoming packets or send queued packets...
static IPAddress localIP
IP address of this application.