|
本帖最后由 15947553912 于 2022-4-27 20:17 编辑
想设置静态IP要填网关什么的,网络用的是移动的热点。请问这四个数要怎么填gateway subnet primaryDNS secondaryDNS?IPAddress local_IP(192, 168, 1, 184);
IPAddress gateway(192, 168, 72, 180);
IPAddress subnet(255, 255, 0, 0);
IPAddress primaryDNS(192, 168, 72, 6); //optional
IPAddress secondaryDNS(8, 8, 4, 4); //optional
if(!WiFi.config(local_IP, gateway, subnet, primaryDNS, secondaryDNS)) {
Serial.println("STA Failed to configure");
}
WiFi.begin(ssid, pswd);
gate
|
|