Module wifiScan

模块功能:wifi扫描功能 支持wifi热点扫描

Info:

  • Copyright: openLuat
  • Release: 2020.5.21
  • License: MIT
  • Author: openLuat

Functions

request (cbFnc[, timeout=10000]) wifi扫描热点请求


Functions

request (cbFnc[, timeout=10000])
wifi扫描热点请求

Parameters:

  • cbFnc function
    扫描到热点返回或者超时未返回的回调函数,回调函数的调用形式为:
          cbFnc(result,cnt,info)
          result:true或者false,true表示扫描成功,false表示扫描失败或者超时失败
          cnt:number类型,表示扫描到的热点个数
          info:table或者nil类型;result为false时,为nil;result为true时,表示扫码到的热点mac和信号信息,table类型,例如:
          {
              ["1a:fe:34:9e:a1:77"] = -63,
              ["8c:be:be:2d:cd:e9"] = -81,
              ["20:4e:7f:82:c2:c4"] = -70,
          }
  • timeout number [此参数可选,默认值为: 10000]
    等待扫描热点返回的超时时间,单位毫秒,默认为10秒

Usage:

  • wifiScan.request(cbFnc)
    wifiScan.request(cbFnc,5000)
generated by LDoc 1.4.6 Last updated 2020-12-22 10:37:08