I tried this on a ESP8266 where it is working with a ip address. In the docs it states the parameter should be 'hostname', but when I try with a hostname I get an error:
w.ping('google.com', (details) => { console.log(details) });
Uncaught Error: Not a valid IP address.
When I try this on a ESP32 I get:
w=require('Wifi')
=function () { [native code] }
>w.ping('212.51.158.12', (details) => { console.log(details) });
Uncaught Error: Function "ping" not found!
Both ESP's are running espruino 2v00
The ping method may work for me when it would be available on both platforms however it's somewhat tricky, because you can not decide how many pings are issued.
Where could I find the source code of the 'net' Library?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I tried this on a ESP8266 where it is working with a ip address. In the docs it states the parameter should be 'hostname', but when I try with a hostname I get an error:
When I try this on a ESP32 I get:
Both ESP's are running espruino 2v00
The ping method may work for me when it would be available on both platforms however it's somewhat tricky, because you can not decide how many pings are issued.
Where could I find the source code of the 'net' Library?