Skip to content
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

Fix DNS resolution errors on AP reconnection #13

Merged
merged 4 commits into from Mar 26, 2019

Conversation

sandeepmistry
Copy link
Contributor

This change in combination with #12, seems to resolve arduino-libraries/WiFiNINA#49 for me.

@Rocketct could you please test?

@sandeepmistry sandeepmistry changed the title Replace gethostbyname calls with getaddrinfo Fix DNS resolution errors on AP reconnection Mar 25, 2019
@sandeepmistry
Copy link
Contributor Author

@Rocketct can you please re-test this, I've the issue and have better address it. When the issue occurs the DNS server of the module is 0.0.0.0. This was happening in 2 conditions:

  1. We thought a static IP was assigned, because _ipInfo.ip.addr was set with a value from the previous DHCP release, so the DNS servers were set to 0.0.0.0. In d458b90 I've added a separate variable to track if a static IP is configured.

  2. Calling tcpip_adapter_dhcpc_start(TCPIP_ADAPTER_IF_STA) were sometimes also clear the DNS servers, in 04ec799 this has been removed.

@Rocketct
Copy link
Contributor

Rocketct commented Mar 26, 2019

Tested with a Uno wifi rev 2 the fix works fine!! the boards is able to resolve the DNS each time that i disconnect the AP and is able to reconnect to the server domain.

@sandeepmistry sandeepmistry merged commit 4ec78c6 into arduino:master Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DNS not resolve the URL name after AP reconnection
2 participants