You are reading a single comment by @tve and its replies. Click here to read the full conversation.
  • FYI, getIP on the esp8266 also accepts a callback function, so if you want to write portable code you can stick to the async callback:

    wifi.getIP(function(x){console.log("got", x);})
    ={
      "ip": "192.168.0.197",
      "netmask": "255.255.255.0",
      "gw": "192.168.0.1",
      "mac": "5c:cf:7f:10:a2:42"
     }
    got {
      "ip": "192.168.0.197",
      "netmask": "255.255.255.0",
      "gw": "192.168.0.1",
      "mac": "5c:cf:7f:10:a2:42"
     }
    

    Collectively we spent days discussing Wifi for ESP8266, and made a
    huge wiki page where we agreed on an API that would work for both.

    Ultimately it got totally ignored when ESP8266 was implemented though,
    and sadly it's stuck since I have no time to fix it :)

    I'm not sure why you feel this way. Some of the stuff specified on that page didn't work or didn't mesh with reality. I tried to stick to it, but some of it neither made sense nor was it consistent.

About

Avatar for tve @tve started