-
Notifications
You must be signed in to change notification settings - Fork 7.6k
WiFi.config() can not set DNS. #553
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
Comments
Nice catch! |
Raienryu97
pushed a commit
to Raienryu97/arduino-esp32
that referenced
this issue
Aug 2, 2017
WiFi.setDNS() isn't recognized as function... It is once called in the esp32 WIFI library as keyword but never used. |
blue-2357
pushed a commit
to blue-2357/arduino-esp32
that referenced
this issue
Jul 17, 2024
dash0820
added a commit
to dash0820/arduino-esp32-stripped
that referenced
this issue
Mar 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hardware:
Board: ESP32 Dev Module
Core Installation/update date: 1/Aug/2017
IDE name: Arduino IDE
Flash Frequency: ?
Upload Speed: 115200
Description:
I am trying to set DNS with
WiFi.config()
, but DNS lookup (gethostbyname()
) fails.I tried debugging ESP-IDF. and I have found that DNS response was dropped.
This is the code below.
esp-idf/components/lwip/core/dns.c
ip_addr_cmp()
checks thataddr->type
matches, but they were not the same.I checked how to set up DNS with
WiFi.config()
. Nothing is set toaddr->type
, it is undefined value.arduino-esp32/libraries/WiFi/src/WiFiSTA.cpp
I also found that DNS works correctly when I modify the code as follows.
By the way, I think that
ip_addr_set_ip4_u32()
should be used,It is not possible because the following build error appears due to
gcc option [- Werror = address]
.The text was updated successfully, but these errors were encountered: