EspruinoWifi - Ping function / Default gateway

Posted on
  • Dear Gordon

    Besides the udp send/receive functions i have another wish for 1.95 ;-).
    Could you please implement the ping function in the wifi library as well.

    Is there a way to get the default gateway address received by the dhcp protocoll ?



  • Hi,

    It looks like something like this will work to add Ping if you need it: = function(addr, callback) {
      var time;'AT+PING="'+addr+'"\r\n',100­0,function(d) {
        if (d && d[0]=="+") time=d.substr(1);
        else if (d=="OK") callback(time); else callback();  

    but I'll see about adding that to the Espruino WiFi library.

    I'm afraid I can't see a way of getting the default gateway address - but if you figure out how to get it from the ESP8266 via AT commands then I'm happy to add that.

  • You are always helpfull Gordon. This is the reason why i like to be a patreon.


  • Thanks! :)

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

EspruinoWifi - Ping function / Default gateway

Posted by Avatar for Sacha @Sacha