Go Down

Topic: 'class WiFiClass' has no member named 'setDNS' (Read 1 time) previous topic - next topic


According to Arduino WiFi101 library Reference, setDNS() is a method of WiFiClass. However, when compiling a modified version of the WiFiWebClientRepeating example sketch, I get this error message: 'class WiFiClass' has no member named 'setDNS'. I inserted the code after the initial connect delay.

Code: [Select]
  // attempt to connect to Wifi network:
  while ( status != WL_CONNECTED) {
    Serial.print("Attempting to connect to SSID: ");
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
    status = WiFi.begin(ssid, pass);
    // wait 10 seconds for connection:
    WiFi.setDNS(IPAddress (8, 8, 8, 8));

Is this a bug?

Go Up