Skip to content

Commit

Permalink
Added Bluetooth
Browse files Browse the repository at this point in the history
  • Loading branch information
puttley committed Dec 5, 2023
1 parent 9a0f823 commit 1046ae4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bt.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ async function connect() {
}
navigator.bluetooth.requestDevice({

filters: [{namePrefix: [DEVICE_BT_NAME_PREFIX] }],
// filters: [{name: [DEVICE_BT_NAME] }],
// acceptAllDevices: true,
// optionalServices: [NUS_SERVICE_UUID],
// ],
filters:[
{namePrefix: [DEVICE_BT_NAME_PREFIX]},

],
optionalServices: [NUS_SERVICE_UUID]

}).then(onScanResult).catch(function(e) {
console.warn('failed to find a device:', e);
disconnect();
Expand Down

0 comments on commit 1046ae4

Please sign in to comment.