Arduino Function: WiFiLink.config


This function allows you to configure a static IP address, change the DNS, gateway, and subnet addresses on the board manually. (WiFi.begin automatically configures to use DHCP)


WiFi.config(ip, dns);
WiFi.config(ip, dns, gateway);
WiFi.config(ip, dns, gateway, subnet);


  • ip: the IP address of the device (array of 4 bytes)
  • dns: the address for a DNS server.
  • gateway: the IP address of the network gateway (array of 4 bytes).optional: defaults to the device IP address with the last octet set to 1
  • subnet: the subnet mask of the network (array of 4 bytes). optional: defaults to

Based on the reference originally written by Arduino Community, and