ManufacturerData
Provides support for filtering against advertisement manufacturer data.
If only portions of the manufacturer data needs to match, then dataMask can be used to identify the relevant bits.
Some examples to demonstrate the dataMask functionality:
dataMask value | Bit representation | data only needs to match... |
---|---|---|
byteArrayOf(0x0F, 0x00) | 0000 1111 0000 0000 | bits 0-3 of the first byte of advertisement manufacturer data. |
byteArrayOf(0x00, 0xFF) | 0000 0000 1111 1111 | the 2nd byte of advertisement manufacturer data. |
byteArrayOf(0xF0) | 1111 0000 | bits 4-7 of the first byte of advertisement manufacturer data. |
Platform | Supported | Details |
---|---|---|
Android | Yes | Supported natively |
Apple | Yes | Support provided by Kable via flow filter |
JavaScript | Yes | Supported natively |
JavaScript support was added in Chrome 92 according to: https://developer.chrome.com/articles/bluetooth/#manufacturer-data-filter