Skip to content

Commit 01daa05

Browse files
authored
Update index.html
1 parent 3fc6ab9 commit 01daa05

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313

1414
document.getElementById('connect').addEventListener('click', async () => {
1515
try {
16-
device = await navigator.bluetooth.requestDevice({acceptAllDevices: true});
16+
device = await navigator.bluetooth.requestDevice({
17+
acceptAllDevices: true,
18+
optionalServices: ['cae55316-6575-413c-9858-0f76c95f6590']
19+
});
1720
const server = await device.gatt.connect();
1821
console.log("server is connected")
1922
const service = await server.getPrimaryService('cae55316-6575-413c-9858-0f76c95f6590');

0 commit comments

Comments
 (0)