esptouch
概述
esptouch is one way for Android Phone to tell the connected Router’s Ssid, Password and etc. to make IOT devices to connect to the same Router. EspTouch is developed and maintained by Espressif Corp.githubAddress
iOS注意
- 您需要打开位置权限才能获取Wi Fi信息。请转到设置->隐私->定位服务以打开[esptouch]定位服务。
- 启动后设备已连接,请确保网络为2.4G,设备仅支持2.4G。
配置包名
在 iOS 平台上使用本功能,需要在 的时候,勾选 Access WiFi Information 功能。如下图:
注意:若配置已经在使用中的包名,需重新生成描述文件,打包证书不用动。
配置 entitlement 文件
配送参数如下:
注意:本模块 iOS 平台上最低适配系统版本为 iOS 8.0
find
查找设备
find(callback(ret))
params
apSsid:
- 类型:字符串类型
- 描述:路由ssid
apBssid:
- 类型:字符串类型
- 描述:路由bssid
apPassword:
- 类型:字符串类型
- 描述:密码
- 类型:数字类型
- 默认值:-1
type:
- 类型:数字类型
- 描述:(可选项)广播或者组播
- 取值范围:0/组播,1/广播
- 默认值:1
ret:
- 类型:JSON 对象
- 内部字段:
- 说明:iOS可能会多次返回
err:
- 类型:JSON 对象
示例代码
iOS系统,Android系统
可提供的1.0.0及更高版本
cancel
取消
cancel(callback(ret))
示例代码
可提供的1.0.0及更高版本