Skip to content

Correct Ethernet.begin() #3764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Correct Ethernet.begin() #3764

wants to merge 1 commit into from

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