随笔 - 2649  文章 - 2452  评论 - 0  阅读 - 80424

setupBlueConnection 根据蓝牙信息建立蓝牙连接

setupBlueConnection ^5.9.0

根据蓝牙信息建立蓝牙连接

提示:扫描到设备之后再建立蓝牙连接

#请求参数

Prop Type Required Default Description
param Object Y {} 属性: name:{ Type: String, Default: N/A, Type: String, Default: N/A, Description: 鉴权密钥(长度32) (可以从getDeviceInfo中读取deviceBtToken<) mac:{ Type: String, Default: N/A, Description: 蓝牙mac地址,((可以使用getDeviceInfo中返回的mac字段)) applianceId:{ Type: String, Default: N/A, Description: 设备id,(可以从getDeviceInfo中读取deviceId<) moduleType: 请求参数

#接口调用示例

let param={
name:"midea_xx_xxxx", //蓝牙名称,从getDeviceInfo中读取ssid
token:"xxxx",//鉴权密钥 长度32,从getDeviceInfo中读取deviceBtToken,

mac:"xxxx"//蓝牙mac地址,从getDeviceInfo中读取mac

applianceId:"xxx"//设备id, getDeviceInfo中读取deviceId
}

this.$bridge
    .setupBlueConnection(params)
    .then(res => {    
    this.$alert(res)
    })
    .catch(err => {
    this.$toast(err)
    })

#返回参数

Prop Type Default Description
errorCode Number N/A 请求失败错误码:-1连接失败 / -2发现服务失败 / -3密钥协商失败/ -4token校验失败 / -510s超时

TIP

该接口基于mSmart 协议,底层由singleBlueToothModule单蓝牙支持

posted on   AtlasLapetos  阅读(8)  评论(0编辑  收藏  举报
编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示