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: [],
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) => {}
})
!!搜索ibeacons设备发现它的serviceUuids为空