getConnectedBluetoothDevices() {
wx.getConnectedBluetoothDevices({
services: ["0865F001-33B0-4B3E-0831-EF914402D222"],
success: (result) => {
if (result.errMsg == "getConnectedBluetoothDevices:ok") {
console.log("获取到的蓝牙列表:" + JSON.stringify(result));
var btdeivesName = result.devices[0].name;
}
},
fail: (res) => {
},
complete: (res) => {
},
})
},
首先需要确认传入的UUID无误,其次要确认设备是否已经连上手机
估计要工作人员看了,可以先提供代码https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html