Go Down

Topic: Ethernet library reference change (Read 2644 times) previous topic - next topic

SurferTim

Jul 05, 2013, 01:22 pm Last Edit: Jul 05, 2013, 01:25 pm by SurferTim Reason: 1
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:

SurferTim

#1
Jul 10, 2013, 01:00 pm Last Edit: Jul 10, 2013, 01:40 pm by SurferTim Reason: 1
Bump. When you wake up...

edit: Maybe it was the lack of documentation? OK! From IDE v1.0.5 Ethernet.cpp.
Code: [Select]
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);
}

SurferTim

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

Federico Vanzati

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.
F

SurferTim


Go Up