Skip to content

Conversation

@PaoloP74
Copy link
Contributor

@PaoloP74 PaoloP74 commented Sep 3, 2015

The correct inizialization of Ethernet.begin() is:

  • Ethernet.begin(mac);
  • Ethernet.begin(mac, ip);
  • Ethernet.begin(mac, ip, dns);
  • Ethernet.begin(mac, ip, dns, gateway);
  • Ethernet.begin(mac, ip, dns, gateway, subnet);

Ethernet.begin(mac, ip, gateway, subnet); is a common mistake.
--> https://www.arduino.cc/en/Reference/EthernetBegin

Will need to change the examples in the Reference.

The correct inizialization of Ethernet.begin() is:
- Ethernet.begin(mac);
- Ethernet.begin(mac, ip);
- Ethernet.begin(mac, ip, dns);
- Ethernet.begin(mac, ip, dns, gateway);
- Ethernet.begin(mac, ip, dns, gateway, subnet);

Ethernet.begin(mac, ip, gateway, subnet); is a common mistake.
--> https://www.arduino.cc/en/Reference/EthernetBegin

Will need to change the examples in the Reference.
@RobAtticus
Copy link
Contributor

Would it be clearer to have two vars, dns and gateway, that point to the same IPAddress rather than list gateway twice?

Alternatively, you could add a comment making note that the Gateway is the DNS resolver in this case.

@PaoloP74
Copy link
Contributor Author

PaoloP74 commented Sep 4, 2015

Like this? #3728.

@RobAtticus
Copy link
Contributor

Yes, I think that's a good example.

@cmaglie cmaglie added Type: Bug Library: Ethernet The Ethernet Arduino library labels Sep 18, 2015
@cmaglie cmaglie added this to the Release 1.6.6 milestone Sep 18, 2015
@cmaglie
Copy link
Member

cmaglie commented Sep 18, 2015

I've merged the changes in #3728 that are slightly more clear.

Thank you!

@cmaglie cmaglie closed this Sep 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Library: Ethernet The Ethernet Arduino library Type: Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants