From 082c23b0dd11f6166fdac4be6395add007491c84 Mon Sep 17 00:00:00 2001 From: twyatt Date: Tue, 30 Jan 2024 01:34:30 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20JuulLabs?= =?UTF-8?q?/kable@769d023fd364db782e2d4f2f267cc9fffa216777=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/com.juul.kable/-filter/-manufacturer-data/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/com.juul.kable/-filter/-manufacturer-data/index.html b/core/com.juul.kable/-filter/-manufacturer-data/index.html index b849a84df..be2dfb10f 100644 --- a/core/com.juul.kable/-filter/-manufacturer-data/index.html +++ b/core/com.juul.kable/-filter/-manufacturer-data/index.html @@ -62,7 +62,7 @@

ManufacturerData

-
class ManufacturerData(val id: Int, val data: ByteArray, val dataMask: ByteArray? = null) : Filter

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 valueBit representationdata only needs to match...
byteArrayOf(0x0F, 0x00)0000 1111 0000 0000bits 0-3 of the first byte of advertisement manufacturer data.
byteArrayOf(0x00, 0xFF)0000 0000 1111 1111the 2nd byte of advertisement manufacturer data.
byteArrayOf(0xF0)1111 0000bits 4-7 of the first byte of advertisement manufacturer data.
PlatformSupportedDetails
AndroidYesSupported natively
AppleYesSupport provided by Kable via flow filter
JavaScriptYesSupported natively

JavaScript support was added in Chrome 92 according to: https://developer.chrome.com/articles/bluetooth/#manufacturer-data-filter

+
class ManufacturerData(val id: Int, val data: ByteArray, val dataMask: ByteArray? = null) : Filter

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 valueBit representationdata only needs to match...
byteArrayOf(0x0F, 0x00)0000 1111 0000 0000bits 0-3 of the first byte of advertisement manufacturer data.
byteArrayOf(0x00, 0xFF)0000 0000 1111 1111the 2nd byte of advertisement manufacturer data.
byteArrayOf(0xF0)1111 0000bits 4-7 of the first byte of advertisement manufacturer data.
PlatformSupportedDetails
AndroidYesSupported natively
AppleYesSupport provided by Kable via flow filter
JavaScriptYesSupported natively

JavaScript support was added in Chrome 92 according to: https://developer.chrome.com/articles/bluetooth/#manufacturer-data-filter