• Wifi is pretty compatible in Espruino with ESP8266 as well as in Espruino on ESP8266... including wifi.getIP(), which works in callback style the same way, even though for Espruino on ESP8266 the direct approach is still available (see my ddddooohhh-post at
    Espruino/Wifi - getIP() returns undefined but callback receives null,ip... - LOL).

    The uniform way for getIP() looks as follows:

                if (err) { // ...ever in ESP8266?
                  console.log(`error on getIP: ${err}`);
                } else {
                  // ... application code / invocation here...

    ...But it falls all apart when I setHostname(...) before (before connecting). With Espruino Wifi I still get the IP... but on ESP8266 I get May be I do not understand setting the hostName yet... have to play a bit more...

    ...to be continued.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

How to apply Wifi in an Espruino and ESP8266 contexts uniform?

Posted by Avatar for allObjects @allObjects