You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Ok, so I think now you've got the 1.5.4 firmware MDNS should work, but it needs turning on - it's not in the Espruino drivers because the ESP8266 they ship with doesn't have it.

    The actual command handbook is here: https://www.espressif.com/sites/default/­files/documentation/4a-esp8266_at_instru­ction_set_en.pdf

    wifi.setHostname calls AT+CWHOSTNAME, which is to do with WiFi rather than DNS, so I don't think is what you want.

    I believe this will work:

    wifi.enableMDNS = function(hostname, callback) {
      turnOn(MODE.CLIENT, function(err) {
        if (err) return callback(err);
        at.cmd("AT+MDNS=1,"+JSON.stringify(hostn­ame)+',"http",80\r\n',500,function(d) {
          callback(d=="OK"?null:d);
        });
      });
    };
    /// then wifi is connected do
    wifi.enableMDNS("foobar",function() {
     ... done
    });
    

    And you should be able to find your Espruino WiFi as foobar.local

About

Avatar for Gordon @Gordon started