- From: dtknowlove via GitHub <sysbot+gh@w3.org>
- Date: Fri, 09 Oct 2020 10:39:30 +0000
- To: public-web-bluetooth-log@w3.org
i get the same error,this is my code:
`let device = await navigator.bluetooth.requestDevice({
filters: [{
namePrefix: 'Pai',
// services: ['0000fff0-0000-1000-8000-00805f9b34fb','0000fff1-0000-1000-8000-00805f9b34fb','0000fff2-0000-1000-8000-00805f9b34fb','0000fff3-0000-1000-8000-00805f9b34fb'],
optionalServices: ['0000fff0-0000-1000-8000-00805f9b34fb']
}]
});
console.log(1);
console.log('Got device:', device.name);
console.log('id:', device.id);
let server = await device.gatt.connect();
console.log(server);
await delay(10000);
console.log(2);
let services = await server.getPrimaryService('0000fff0-0000-1000-8000-00805f9b34fb')
console.log(3,services);
let characteristic = await services.getCharacteristic('0000fff0-0000-1000-8000-00805f9b34fb');
console.log(characteristic);`
--
GitHub Notification of comment by dtknowlove
Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/513#issuecomment-706107294 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 9 October 2020 10:39:32 UTC