Pages: [1]   Go Down
Author Topic: Ethernet library reference change  (Read 2431 times)
0 Members and 1 Guest are viewing this topic.
Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 138
Posts: 5837
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This reference page should be changed to reflect the default setting for the dns server in the function Ethernet.begin(mac,ip).
http://arduino.cc/en/Reference/EthernetBegin
Here is the requested change:
Quote
ip: the IP address of the device (array of 4 bytes)

dns: the IP address of the dns server (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1

gateway: the IP address of the network gateway (array of 4 bytes). optional: defaults to the device IP address with the last octet set to 1

subnet: the subnet mask of the network (array of 4 bytes). optional: defaults to 255.255.255.0

edit: Changed wording. My bad.  smiley-red
« Last Edit: July 05, 2013, 06:25:21 am by SurferTim » Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 138
Posts: 5837
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Bump. When you wake up...

edit: Maybe it was the lack of documentation? OK! From IDE v1.0.5 Ethernet.cpp.
Code:
void EthernetClass::begin(uint8_t *mac_address, IPAddress local_ip)
{
  // Assume the DNS server will be the machine on the same network as the local IP
  // but with last octet being '1'
  IPAddress dns_server = local_ip;
  dns_server[3] = 1;
  begin(mac_address, local_ip, dns_server);
}
« Last Edit: July 10, 2013, 06:40:20 am by SurferTim » Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 138
Posts: 5837
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is this the place we are supposed to submit changes to the reference pages? Or is there another way of submitting them?
Logged

Global Moderator
Milano, Italy
Offline Offline
Edison Member
*****
Karma: 19
Posts: 1175
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have added it as well as you wrote it.
thanks again!

Until we find a better method for "bug reporting" in the documentation I promise I'll take a look weekly to this section of the forum.
Logged

F

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 138
Posts: 5837
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

WOW! We're on a roll now!  smiley
Logged

Pages: [1]   Go Up
Jump to: