distributeWifi method
开启 WIFI 配网
mac 设备 mac 地址
ssid WIFI名称
password WIFI密码
1.蓝牙链接设备并建立监听
2.向设备 写入 WIFI信息
3.等待设备配网成功通过蓝牙返回设备信息
4.配网成功,通过 Controller 获取设备信息
Implementation
void distributeWifi(String mac, String ssid, String password) async {
this.mac = mac;
this.ssid = ssid;
this.password = password;
_distributeChannel.setMethodCallHandler(_methodCall);
await execute();
}