Version 1.83 wifi.getIP() and wifi.scan()

Posted on
  • get you mac in : stlye

    >var wifi = require("wifi");
    =function () { [native code] }
    >wifi.getIP().mac;
    ="5c:cf:7f:05:9a:33"
    

    and wifi.scan lists the AccessPoints

    >wifi.scan(function(e,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
    Access point: 0 = {"rssi":-45,"channel":1,"authMode":3,"is­Hidden":false,"ssid":"SBITUmts"}
    Access point: 1 = {"rssi":-63,"channel":11,"authMode":4,"i­sHidden":false,"ssid":"SBIT"}
    Access point: 2 = {"rssi":-85,"channel":11,"authMode":4,"i­sHidden":false,"ssid":"SBIT"}
    

    many thanks to those who added and fixed it.

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

Version 1.83 wifi.getIP() and wifi.scan()

Posted by Avatar for MaBe @MaBe

Actions