Hello,
I am using the MKR1000 and would like to find out which DNS server is used in the WiFI class.
The WiFi library only has a call to set the DNS server but not to get it.
Is there a trick to do this?
Thanks
Markus
Hello,
I am using the MKR1000 and would like to find out which DNS server is used in the WiFI class.
The WiFi library only has a call to set the DNS server but not to get it.
Is there a trick to do this?
Thanks
Markus
Is there a trick to do this?
Is this a trick question? Why can't you remember what DNS server YOU told the class to use?
PaulS:
Is this a trick question? Why can't you remember what DNS server YOU told the class to use?
Why would I do that?
The standard example to open a connection will get the DNS via DHCP, right?
I am not using WiFi.config(), so which is used?
// attempt to connect to Wifi network:
while ( status != WL_CONNECTED) {
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);
status = WiFi.begin(ssid, pass);
Serial.print("Wifi Status:"); Serial.println(status);
}
Hi,
I'd like to bring this question back to live. Same question in regards to NodeMCU:
In case I use DHCP to get TCP/IP settings, how do I read the assigned nameserver?
I use already:
WiFi.localIP().toString()
WiFi.subnetMask().toString()
WiFi.gatewayIP().toString()
but how do I read DNS?
Stefan
Seems you are not alone. These questions are all over this forum but I have not found they are answered. I too am looking for how to "validate" what the current DNS server is assigned to the WiFi device.