Intent to Prototype and Ship: Web Bluetooth manufacturer data filter

Skip to first unread message

François Beaufort 🇫🇷

May 5, 2021, 5:00:26 AM5/5/21
to blink-dev, Reilly Grant

Contact emails


This is a small addition to the existing filtering feature which is quite documented with examples.


TAG review

Web Bluetooth API:

Changes since TAG review:


Being able to filter based on manufacturer specific data (such as vendor ID and product ID) will enable e.g. to configure/select only its own Bluetooth devices and present them to users, instead of showing unrelated Bluetooth devices in the browser picker.


Today, developers can prompt users through a browser picker to select a nearby Bluetooth device that matches their advertised name and services. However it’s not possible for them to filter nearby Bluetooth devices based on advertised manufacturer specific data, used in advertising packets to add custom data (always starting with a Bluetooth company identifier).

The Web Bluetooth spec always had manufacturer data filter support but it wasn’t implemented due to the lack of developer need when it shipped. This is no longer the case. See the “Web / Framework developers” signal section.

// Simplest form.

let manufacturerData = [{ companyIdentifier: 0xffff }];

navigator.bluetooth.requestDevice({ filters: [{ manufacturerData }] });


// Filter on manufacturer data starting with [0x01, 0x02].

let manufacturerData = [{

  companyIdentifier: 0xffff,

  dataPrefix: new Uint8Array([0x91, 0xaa]), // 10010001 10101010

  mask: new Uint8Array([0x0f, 0x57])        // 00001111 01010111


navigator.bluetooth.requestDevice({ filters: [{ manufacturerData }] });

Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

No. It will be supported on all platforms that Web Bluetooth supports currently. This excludes Android WebView. See

Demo link


No extra DevTools support is needed. Developers can use the about:bluetooth-internals page to debug their Bluetooth devices.


The WebBluetoothManufacturerDataFilter WebFeature will track the presence of manufacturer data filters.


Interoperability and Compatibility
This small addition to the existing filtering feature does not change the overall status of Web Bluetooth interoperability or compatibility.. 

Signals from other implementations (Gecko, WebKit): 

Gecko: No Signal [1]

WebKit: No Signal [1]

Web / Framework developers: Positive

[1] Both Gecko and Webkit are unlikely to object to this specifically, but object to the overall Web Bluetooth API as a whole, hence doesn't make sense to bug them with specific questions on this.




It should be fairly trivial for developers to adopt this new manufacturer data filter as it’s just another filter to the existing options in navigator.bluetooth.requestDevice(). If backwards compatibility with older browsers is desired though, developers will have to use some fallback options as the new manufacturer data filter will be considered empty.

let manufacturerData = [{ companyIdentifier: 0x00e0 }];

navigator.bluetooth.requestDevice({ filters: [{ manufacturerData }] })

.catch((error) => {

  if ( != "TypeError") return;

  let fallbackOptions = { acceptAllDevices: true };

  return navigator.bluetooth.requestDevice(fallbackOptions);


Is this feature fully tested by web-platform-tests? Link to test suite results from
Yes. This feature will be fully tested at

Entry on the feature dashboard

Yoav Weiss

May 5, 2021, 8:35:18 AM5/5/21
to François Beaufort 🇫🇷, blink-dev, Reilly Grant

This seems like a small and useful addition to the existing API.

You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Rick Byers

May 5, 2021, 4:22:01 PM5/5/21
to Yoav Weiss, François Beaufort 🇫🇷, blink-dev, Reilly Grant

Chris Harrelson

May 5, 2021, 4:27:42 PM5/5/21
to Rick Byers, Yoav Weiss, François Beaufort 🇫🇷, blink-dev, Reilly Grant
Reply all
Reply to author
0 new messages