I have a problem with WiFiClientSecure, it can’t make a connection to HTTPS and HTTP servers (port 443 and 80). I know that I have to set the DNS server IP, however, since we have many nodes that connect to a router, dedicating a static IP for each one is not a good solution. All of them have the same code and the IP must be set dynamically by the router. The point is, I want to set the DNS server IP manually but there is not such a command for this purpose.
I’ve read about the Arduino WiFi shield and it has a command to set one or two DNS servers without setting static IP. I want to know how to set the dns server like “Wifi Shield”?!!
WiFi.setDNS(dns1); or WiFi.setDNS(dns1, dns2);