Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By lethe
#44001
martinayotte wrote:
Code: Select allIPAddress ipaddr;
if (WiFi.hostByName("google.com", &ipddr) = 1) {
    Serial.println(String("IP is ") + ipaddr);
}

&ipaddr is wrong here. The function signature you posted above is using a C++ reference to the IPAddress object, not a pointer. So if you use &ipaddr the argument has the wrong type (IPAddress* instead of IPAddress).
The function call should read
Code: Select allWiFi.hostByName("google.com", ipddr)

There's also a typo in the comparison ("= 1" instead of "== 1").
User avatar
By shery
#44011 can any body tell me..
asume there are two wifi router..on the same network.. i've connected ESP8266 connected to 1st router after i moved the chip to other room and it come uuder the range of 2nd router.. so thus the esp8266 does automatically connect it self aur i have to re-configure again manually..??
plz help me..