You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please see the attached sketch which reproduces the issue. This is the output with and without a manual DNS address:
// With default/GW DNS address.
00:37:09.929 -> Attempting to connect to SSID: ***
00:37:22.549 -> Connected to WiFi
00:37:22.615 -> IP Address: 142.251.37.196
// With manual DNS address.
00:36:10.968 -> Attempting to connect to SSID: ***
00:36:23.673 -> Connected to WiFi
00:36:23.673 -> Setting DNS address
00:36:30.672 -> IP Address: 0.0.0.0
Sketch:
#include<SPI.h>
#include<WiFiNINA.h>
#include"arduino_secrets.h"char ssid[] = SECRET_SSID; // your network SSID (name)char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
WiFiClient client;
int status = WL_IDLE_STATUS;
char server[] = "www.google.com"; // name address for Google (using DNS)voidsetup() {
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
// check for the WiFi module:if (WiFi.status() == WL_NO_MODULE) {
Serial.println("Communication with WiFi module failed!");
// don't continuewhile (true);
}
String fv = WiFi.firmwareVersion();
if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
Serial.println("Please upgrade the firmware");
}
// 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);
}
Serial.println("Connected to WiFi");
Serial.println("Setting DNS address");
WiFi.config(IPAddress(192, 168, 1, 200), IPAddress(8, 8, 8, 8));
IPAddress host_ip;
WiFi.hostByName("www.google.com", host_ip);
Serial.print("IP Address: ");
Serial.println(host_ip);
}
voidloop() {
// do nothing forevermore:while (true);
}
The text was updated successfully, but these errors were encountered:
Please see the attached sketch which reproduces the issue. This is the output with and without a manual DNS address:
Sketch:
The text was updated successfully, but these errors were encountered: