We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fc6ab9 commit 01daa05Copy full SHA for 01daa05
index.html
@@ -13,7 +13,10 @@
13
14
document.getElementById('connect').addEventListener('click', async () => {
15
try {
16
- device = await navigator.bluetooth.requestDevice({acceptAllDevices: true});
+ device = await navigator.bluetooth.requestDevice({
17
+ acceptAllDevices: true,
18
+ optionalServices: ['cae55316-6575-413c-9858-0f76c95f6590']
19
+ });
20
const server = await device.gatt.connect();
21
console.log("server is connected")
22
const service = await server.getPrimaryService('cae55316-6575-413c-9858-0f76c95f6590');
0 commit comments