Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
justinbmeyer authored Nov 11, 2024
1 parent 3fc6ab9 commit 01daa05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@

document.getElementById('connect').addEventListener('click', async () => {
try {
device = await navigator.bluetooth.requestDevice({acceptAllDevices: true});
device = await navigator.bluetooth.requestDevice({
acceptAllDevices: true,
optionalServices: ['cae55316-6575-413c-9858-0f76c95f6590']
});
const server = await device.gatt.connect();
console.log("server is connected")
const service = await server.getPrimaryService('cae55316-6575-413c-9858-0f76c95f6590');
Expand Down

0 comments on commit 01daa05

Please sign in to comment.