signup() {
uni.openBluetoothAdapter({
success: (res) => {
console.log(res)
uni.startBluetoothDevicesDiscovery({
services: [],
allowDuplicatesKey: false,
success: (result) => {
console.log(result)
uni.onBluetoothDeviceFound(device => {
// console.log(device.devices[0].deviceId)
// console.log(this.ab2hex(device.devices[0].advertisData))
console.log(device.devices[0].deviceId, device.devices[0].deviceId == 'F8:9A:B4:47:70:E2')
})
},
fail: (error) => {
console.log(error)
}
})
},
fail: (err) => {
console.log(err)
}
})
},
0 个回复