This reference page should be changed to reflect the default setting for the dns server in the function Ethernet.begin(mac,ip).
The Arduino programming language Reference, organized into Functions, Variable and Constant, and Structure keywords.
Here is the requested change:
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.
Bump. When you wake up...
edit: Maybe it was the lack of documentation? OK! From IDE v1.0.5 Ethernet.cpp.
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);
}
Is this the place we are supposed to submit changes to the reference pages? Or is there another way of submitting them?
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.
WOW! We're on a roll now!