try to get a list of Access Points but list is empty, any idea ?
>reset(); =undefined 1v81.tve_unify_350abe6 Copyright 2015 G.Williams WARNING: the esp8266 port is in beta, do not expect everything to work Flash map 4MB:512/512, manuf 0xe0 chip 0x4016 var wifi = require("wifi"); =function () { [native code] } >// no crash if list is empty =undefined >wifi.scan(function(arrayOfAcessPoints) { : if ( arrayOfAcessPoints != null) { : for (var i=0; i<arrayOfAcessPoints.length; i++) { : print("Access point: " + i + " = " + JSON.stringify(arrayOfAcessPoints[i])); : } : } : else { : print("no Access points found"); : } :}); =undefined no Access points found >
connecting to a non hidden access point works
>var esp = require("ESP8266"); =function () { [native code] } >var wifi = require("wifi"); =function () { [native code] } >wifi.connect("SSSID", "password", true, function(err, ipInfo) { : if (err) { : print("not connected to requested AP"); : } : else { : print("We are now connected!"); : print("ipInfo: " + esp.getAddressAsString(ipInfo.ip)); : } :}); =undefined We are now connected! ipInfo: 192.168.0.100
@MaBe started
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.
try to get a list of Access Points but list is empty, any idea ?
connecting to a non hidden access point works