nativescript-community / nativescript-community/ble

Filtering for manufacturerId does not work when scanning

Open
#273 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
202
Forks
79
PR merge metrics
No merged PRs in 30d

Description

I try filtering device scan for manufactuerId.

this._bluetooth.startScanning({
            filters: [{manufacturerId:1212}],
            seconds: 4,
            skipPermissionCheck: false,
            onDiscovered: function (peripheral) {
              console.log("found device " + peripheral.localName + " mac " + peripheral.UUID + " Man.Id " +peripheral.manufacturerId);
            }
})

but the scan returns all devices.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the startScanning entry point and trace how the filters option, specifically manufacturerId, is passed into the platform scan. Reproduce the provided scan and verify that only peripherals matching manufacturerId 1212 are returned; done means nonmatching devices are excluded.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.