Skip to content

Commit

Permalink
Fix abandonware@bleno issue-51 by skipping 2902 peripheral declared c…
Browse files Browse the repository at this point in the history
…haracteristic descriptor
  • Loading branch information
gareth-evans-sniper committed Jan 12, 2025
1 parent ddcb52b commit 85be1ea
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/hci-socket/gatt.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,15 @@ class Gatt extends EventEmitter {

for (let k = 0; k < characteristic.descriptors.length; k++) {
const descriptor = characteristic.descriptors[k];

//https://github.com/abandonware/bleno/issues/51
//above, if the characteristic defines notify, the 2902 characteristic descriptor is added automatically
//if the peripheral also declares this, we don't want to add it again
//flags (properties, secure etc) above are better defined
if(descriptor.uuid == '2902')
{
continue;
}

handle++;
const descriptorHandle = handle;
Expand Down

0 comments on commit 85be1ea

Please sign in to comment.