Arduino Forum

Products => WiFi Shield 101 => Topic started by: marcocollado on Feb 29, 2016, 06:42 pm

Title: 'class WiFiClass' has no member named 'setDNS'
Post by: marcocollado on Feb 29, 2016, 06:42 pm
According to Arduino WiFi101 library Reference (https://www.arduino.cc/en/Reference/WiFi101), 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: ");
    Serial.println(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:
    delay(10000);
    WiFi.setDNS(IPAddress (8, 8, 8, 8));
  }


Is this a bug?