api:startBLEPeripheralAdvertisin
设备:安卓
微信版本 8.0.10
fail: {errMsg: "startBLEPeripheralAdvertising:fail:invalid data", errCode: 10013
wx.openBluetoothAdapter({
mode: 'peripheral',
success: (res) => {
wx.createBLEPeripheralServer().then(res => {
res.server.startAdvertising({
advertiseRequest: {
connectable: false,
deviceName: 'newDeviceName',
serviceUuids: [
// '711B7A37-FA9E-1B1B-9C30-423A47BA9923',
// '4552442B-E432-83AA-313A-77CAD052B3EE',
// 'EC7C8C78-B90B-52D5-A4E9-B4146535A4F6',
'ED:67:3B:0B:EA:59'
],
manufacturerData: [{
manufacturerId: '0xFF',
manufacturerSpecificData: buffer
}]
},
powerLevel: 'medium'
}).then(res => {
console.log('success: ', res)
if (res.errCode == 0) {
app.showT('发送成功', 'success', 2000)
}
}, res => {
console.log("fail: ", res)
})
})
},
fail: (res) => {}
})
UUID格式不对