# 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)
    })
1
2
3
4
5
6
7
8
9

# 返回参数

  • 成功时返回

Callback:result{
errorCode:0//发送成功
}
callbackFail:{
errorCode:1//发送失败、2蓝牙未连接
errorMsg:"失败原因描述"
}

1
2
3
4
5
6
7
8
9
Last Updated: 6/16/2021, 10:50:48 AM