sendBlueToothData ss向蓝牙设备写数据
sendBlueToothData ^7.6.0
ss向蓝牙设备写数据
#请求参数
| Prop | Type | Default | Description |
|---|---|---|---|
param |
Object |
mac: "xxxx"//蓝牙mac地址, serviceUuid: "xxxx"//服务通道的uuid, writeUuid: "xxxx"//写通道的uuid, data: "xxxx"//数据的16进制字符串, | 请求参数 |
#接口调用示例
this.$bridge
.sendBlueToothData(params)
.then(res => {
this.$alert(res)
})
.catch(err => {
this.$toast(err)
})
#返回参数
- 成功时返回
Callback:result{
errorCode:0//发送成功
}
callbackFail:{
errorCode:1//发送失败、2蓝牙未连接
errorMsg:"失败原因描述"
}
浙公网安备 33010602011771号