@capacitor-community/bluetooth-le 7.3.0 → 7.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs.json +22 -22
- package/dist/esm/bleClient.js +1 -0
- package/dist/esm/bleClient.js.map +1 -1
- package/dist/plugin.cjs.js +1 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +1 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/DeviceManager.swift +2 -90
- package/ios/Plugin/Plugin.swift +0 -12
- package/ios/Plugin/ScanFilters.swift +114 -0
- package/package.json +1 -1
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/conversion.js","esm/plugin.js","esm/queue.js","esm/validators.js","esm/bleClient.js","esm/timeout.js","esm/web.js"],"sourcesContent":["/**\r\n * Android scan mode\r\n */\r\nexport var ScanMode;\r\n(function (ScanMode) {\r\n /**\r\n * Perform Bluetooth LE scan in low power mode. This mode is enforced if the scanning application is not in foreground.\r\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_POWER\r\n */\r\n ScanMode[ScanMode[\"SCAN_MODE_LOW_POWER\"] = 0] = \"SCAN_MODE_LOW_POWER\";\r\n /**\r\n * Perform Bluetooth LE scan in balanced power mode. (default) Scan results are returned at a rate that provides a good trade-off between scan frequency and power consumption.\r\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_BALANCED\r\n */\r\n ScanMode[ScanMode[\"SCAN_MODE_BALANCED\"] = 1] = \"SCAN_MODE_BALANCED\";\r\n /**\r\n * Scan using highest duty cycle. It's recommended to only use this mode when the application is running in the foreground.\r\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_LATENCY\r\n */\r\n ScanMode[ScanMode[\"SCAN_MODE_LOW_LATENCY\"] = 2] = \"SCAN_MODE_LOW_LATENCY\";\r\n})(ScanMode || (ScanMode = {}));\r\n/**\r\n * Android connection priority used in `requestConnectionPriority`\r\n */\r\nexport var ConnectionPriority;\r\n(function (ConnectionPriority) {\r\n /**\r\n * Use the connection parameters recommended by the Bluetooth SIG. This is the default value if no connection parameter update is requested.\r\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_BALANCED\r\n */\r\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_BALANCED\"] = 0] = \"CONNECTION_PRIORITY_BALANCED\";\r\n /**\r\n * Request a high priority, low latency connection. An application should only request high priority connection parameters to transfer large amounts of data over LE quickly. Once the transfer is complete, the application should request CONNECTION_PRIORITY_BALANCED connection parameters to reduce energy use.\r\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_HIGH\r\n */\r\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_HIGH\"] = 1] = \"CONNECTION_PRIORITY_HIGH\";\r\n /**\r\n * Request low power, reduced data rate connection parameters.\r\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_LOW_POWER\r\n */\r\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_LOW_POWER\"] = 2] = \"CONNECTION_PRIORITY_LOW_POWER\";\r\n})(ConnectionPriority || (ConnectionPriority = {}));\r\n//# sourceMappingURL=definitions.js.map","/**\r\n * Convert an array of numbers into a DataView.\r\n */\r\nexport function numbersToDataView(value) {\r\n return new DataView(Uint8Array.from(value).buffer);\r\n}\r\n/**\r\n * Convert a DataView into an array of numbers.\r\n */\r\nexport function dataViewToNumbers(value) {\r\n return Array.from(new Uint8Array(value.buffer, value.byteOffset, value.byteLength));\r\n}\r\n/**\r\n * Convert a string into a DataView.\r\n */\r\nexport function textToDataView(value) {\r\n return numbersToDataView(value.split('').map((s) => s.charCodeAt(0)));\r\n}\r\n/**\r\n * Convert a DataView into a string.\r\n */\r\nexport function dataViewToText(value) {\r\n return String.fromCharCode(...dataViewToNumbers(value));\r\n}\r\n/**\r\n * Convert a 16 bit UUID into a 128 bit UUID string\r\n * @param value number, e.g. 0x180d\r\n * @return string, e.g. '0000180d-0000-1000-8000-00805f9b34fb'\r\n */\r\nexport function numberToUUID(value) {\r\n return `0000${value.toString(16).padStart(4, '0')}-0000-1000-8000-00805f9b34fb`;\r\n}\r\n/**\r\n * Convert a string of hex into a DataView of raw bytes.\r\n * Note: characters other than [0-9a-fA-F] are ignored\r\n * @param hex string of values, e.g. \"00 01 02\" or \"000102\"\r\n * @return DataView of raw bytes\r\n */\r\nexport function hexStringToDataView(hex) {\r\n const bin = [];\r\n let i, c, isEmpty = 1, buffer = 0;\r\n for (i = 0; i < hex.length; i++) {\r\n c = hex.charCodeAt(i);\r\n if ((c > 47 && c < 58) || (c > 64 && c < 71) || (c > 96 && c < 103)) {\r\n buffer = (buffer << 4) ^ ((c > 64 ? c + 9 : c) & 15);\r\n if ((isEmpty ^= 1)) {\r\n bin.push(buffer & 0xff);\r\n }\r\n }\r\n }\r\n return numbersToDataView(bin);\r\n}\r\nexport function dataViewToHexString(value) {\r\n return dataViewToNumbers(value)\r\n .map((n) => {\r\n let s = n.toString(16);\r\n if (s.length == 1) {\r\n s = '0' + s;\r\n }\r\n return s;\r\n })\r\n .join('');\r\n}\r\nexport function webUUIDToString(uuid) {\r\n if (typeof uuid === 'string') {\r\n return uuid;\r\n }\r\n else if (typeof uuid === 'number') {\r\n return numberToUUID(uuid);\r\n }\r\n else {\r\n throw new Error('Invalid UUID');\r\n }\r\n}\r\nexport function mapToObject(map) {\r\n const obj = {};\r\n if (!map) {\r\n return undefined;\r\n }\r\n map.forEach((value, key) => {\r\n obj[key.toString()] = value;\r\n });\r\n return obj;\r\n}\r\n/**\r\n * Convert Data or Uint8Array to Uint8Array.\r\n * @param value DataView, Uint8Array, or undefined\r\n * @return Uint8Array or undefined\r\n */\r\nexport function toUint8Array(value) {\r\n if (value === undefined) {\r\n return undefined;\r\n }\r\n if (typeof value === 'string') {\r\n const dataView = hexStringToDataView(value);\r\n return new Uint8Array(dataView.buffer, dataView.byteOffset, dataView.byteLength);\r\n }\r\n if (value instanceof DataView) {\r\n return new Uint8Array(value.buffer, value.byteOffset, value.byteLength);\r\n }\r\n return value; // Already Uint8Array\r\n}\r\n/**\r\n * Convert Data, Uint8Array, or string to hex string.\r\n * @param value DataView, Uint8Array, or undefined\r\n * @return hex string or undefined\r\n */\r\nexport function toHexString(value) {\r\n if (value === undefined) {\r\n return undefined;\r\n }\r\n if (value instanceof DataView) {\r\n return dataViewToHexString(value);\r\n }\r\n // Uint8Array\r\n return dataViewToHexString(new DataView(value.buffer, value.byteOffset, value.byteLength));\r\n}\r\n//# sourceMappingURL=conversion.js.map","import { registerPlugin } from '@capacitor/core';\r\nexport const BluetoothLe = registerPlugin('BluetoothLe', {\r\n web: () => import('./web').then((m) => new m.BluetoothLeWeb()),\r\n});\r\n//# sourceMappingURL=plugin.js.map","const makeQueue = () => {\r\n let currentTask = Promise.resolve();\r\n // create a new promise so that errors can be bubbled\r\n // up to the caller without being caught by the queue\r\n return (fn) => new Promise((resolve, reject) => {\r\n currentTask = currentTask\r\n .then(() => fn())\r\n .then(resolve)\r\n .catch(reject);\r\n });\r\n};\r\nexport function getQueue(enabled) {\r\n if (enabled) {\r\n return makeQueue();\r\n }\r\n return (fn) => fn();\r\n}\r\n//# sourceMappingURL=queue.js.map","export function parseUUID(uuid) {\r\n if (typeof uuid !== 'string') {\r\n throw new Error(`Invalid UUID type ${typeof uuid}. Expected string.`);\r\n }\r\n uuid = uuid.toLowerCase();\r\n const is128BitUuid = uuid.search(/^[0-9a-f]{8}\\b-[0-9a-f]{4}\\b-[0-9a-f]{4}\\b-[0-9a-f]{4}\\b-[0-9a-f]{12}$/) >= 0;\r\n if (!is128BitUuid) {\r\n throw new Error(`Invalid UUID format ${uuid}. Expected 128 bit string (e.g. \"0000180d-0000-1000-8000-00805f9b34fb\").`);\r\n }\r\n return uuid;\r\n}\r\n//# sourceMappingURL=validators.js.map","import { Capacitor } from '@capacitor/core';\r\nimport { dataViewToHexString, hexStringToDataView, toUint8Array, toHexString } from './conversion';\r\nimport { BluetoothLe } from './plugin';\r\nimport { getQueue } from './queue';\r\nimport { parseUUID } from './validators';\r\nclass BleClientClass {\r\n constructor() {\r\n this.scanListener = null;\r\n this.eventListeners = new Map();\r\n this.queue = getQueue(true);\r\n }\r\n enableQueue() {\r\n this.queue = getQueue(true);\r\n }\r\n disableQueue() {\r\n this.queue = getQueue(false);\r\n }\r\n async initialize(options) {\r\n await this.queue(async () => {\r\n await BluetoothLe.initialize(options);\r\n });\r\n }\r\n async isEnabled() {\r\n const enabled = await this.queue(async () => {\r\n const result = await BluetoothLe.isEnabled();\r\n return result.value;\r\n });\r\n return enabled;\r\n }\r\n async requestEnable() {\r\n await this.queue(async () => {\r\n await BluetoothLe.requestEnable();\r\n });\r\n }\r\n async enable() {\r\n await this.queue(async () => {\r\n await BluetoothLe.enable();\r\n });\r\n }\r\n async disable() {\r\n await this.queue(async () => {\r\n await BluetoothLe.disable();\r\n });\r\n }\r\n async startEnabledNotifications(callback) {\r\n await this.queue(async () => {\r\n var _a;\r\n const key = `onEnabledChanged`;\r\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\r\n const listener = await BluetoothLe.addListener(key, (result) => {\r\n callback(result.value);\r\n });\r\n this.eventListeners.set(key, listener);\r\n await BluetoothLe.startEnabledNotifications();\r\n });\r\n }\r\n async stopEnabledNotifications() {\r\n await this.queue(async () => {\r\n var _a;\r\n const key = `onEnabledChanged`;\r\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\r\n this.eventListeners.delete(key);\r\n await BluetoothLe.stopEnabledNotifications();\r\n });\r\n }\r\n async isLocationEnabled() {\r\n const enabled = await this.queue(async () => {\r\n const result = await BluetoothLe.isLocationEnabled();\r\n return result.value;\r\n });\r\n return enabled;\r\n }\r\n async openLocationSettings() {\r\n await this.queue(async () => {\r\n await BluetoothLe.openLocationSettings();\r\n });\r\n }\r\n async openBluetoothSettings() {\r\n await this.queue(async () => {\r\n await BluetoothLe.openBluetoothSettings();\r\n });\r\n }\r\n async openAppSettings() {\r\n await this.queue(async () => {\r\n await BluetoothLe.openAppSettings();\r\n });\r\n }\r\n async setDisplayStrings(displayStrings) {\r\n await this.queue(async () => {\r\n await BluetoothLe.setDisplayStrings(displayStrings);\r\n });\r\n }\r\n async requestDevice(options) {\r\n options = options ? this.validateRequestBleDeviceOptions(options) : undefined;\r\n const result = await this.queue(async () => {\r\n const device = await BluetoothLe.requestDevice(options);\r\n return device;\r\n });\r\n return result;\r\n }\r\n async requestLEScan(options, callback) {\r\n options = this.validateRequestBleDeviceOptions(options);\r\n await this.queue(async () => {\r\n var _a;\r\n await ((_a = this.scanListener) === null || _a === void 0 ? void 0 : _a.remove());\r\n this.scanListener = await BluetoothLe.addListener('onScanResult', (resultInternal) => {\r\n const result = Object.assign(Object.assign({}, resultInternal), { manufacturerData: this.convertObject(resultInternal.manufacturerData), serviceData: this.convertObject(resultInternal.serviceData), rawAdvertisement: resultInternal.rawAdvertisement\r\n ? this.convertValue(resultInternal.rawAdvertisement)\r\n : undefined });\r\n callback(result);\r\n });\r\n await BluetoothLe.requestLEScan(options);\r\n });\r\n }\r\n async stopLEScan() {\r\n await this.queue(async () => {\r\n var _a;\r\n await ((_a = this.scanListener) === null || _a === void 0 ? void 0 : _a.remove());\r\n this.scanListener = null;\r\n await BluetoothLe.stopLEScan();\r\n });\r\n }\r\n async getDevices(deviceIds) {\r\n if (!Array.isArray(deviceIds)) {\r\n throw new Error('deviceIds must be an array');\r\n }\r\n return this.queue(async () => {\r\n const result = await BluetoothLe.getDevices({ deviceIds });\r\n return result.devices;\r\n });\r\n }\r\n async getConnectedDevices(services) {\r\n if (!Array.isArray(services)) {\r\n throw new Error('services must be an array');\r\n }\r\n services = services.map(parseUUID);\r\n return this.queue(async () => {\r\n const result = await BluetoothLe.getConnectedDevices({ services });\r\n return result.devices;\r\n });\r\n }\r\n async getBondedDevices() {\r\n return this.queue(async () => {\r\n const result = await BluetoothLe.getBondedDevices();\r\n return result.devices;\r\n });\r\n }\r\n async connect(deviceId, onDisconnect, options) {\r\n await this.queue(async () => {\r\n var _a;\r\n if (onDisconnect) {\r\n const key = `disconnected|${deviceId}`;\r\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\r\n const listener = await BluetoothLe.addListener(key, () => {\r\n onDisconnect(deviceId);\r\n });\r\n this.eventListeners.set(key, listener);\r\n }\r\n await BluetoothLe.connect(Object.assign({ deviceId }, options));\r\n });\r\n }\r\n async createBond(deviceId, options) {\r\n await this.queue(async () => {\r\n await BluetoothLe.createBond(Object.assign({ deviceId }, options));\r\n });\r\n }\r\n async isBonded(deviceId) {\r\n const isBonded = await this.queue(async () => {\r\n const result = await BluetoothLe.isBonded({ deviceId });\r\n return result.value;\r\n });\r\n return isBonded;\r\n }\r\n async disconnect(deviceId) {\r\n await this.queue(async () => {\r\n await BluetoothLe.disconnect({ deviceId });\r\n });\r\n }\r\n async getServices(deviceId) {\r\n const services = await this.queue(async () => {\r\n const result = await BluetoothLe.getServices({ deviceId });\r\n return result.services;\r\n });\r\n return services;\r\n }\r\n async discoverServices(deviceId) {\r\n await this.queue(async () => {\r\n await BluetoothLe.discoverServices({ deviceId });\r\n });\r\n }\r\n async getMtu(deviceId) {\r\n const value = await this.queue(async () => {\r\n const result = await BluetoothLe.getMtu({ deviceId });\r\n return result.value;\r\n });\r\n return value;\r\n }\r\n async requestConnectionPriority(deviceId, connectionPriority) {\r\n await this.queue(async () => {\r\n await BluetoothLe.requestConnectionPriority({ deviceId, connectionPriority });\r\n });\r\n }\r\n async readRssi(deviceId) {\r\n const value = await this.queue(async () => {\r\n const result = await BluetoothLe.readRssi({ deviceId });\r\n return parseFloat(result.value);\r\n });\r\n return value;\r\n }\r\n async read(deviceId, service, characteristic, options) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n const value = await this.queue(async () => {\r\n const result = await BluetoothLe.read(Object.assign({ deviceId,\r\n service,\r\n characteristic }, options));\r\n return this.convertValue(result.value);\r\n });\r\n return value;\r\n }\r\n async write(deviceId, service, characteristic, value, options) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n return this.queue(async () => {\r\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\r\n throw new Error('Invalid data.');\r\n }\r\n let writeValue = value;\r\n if (Capacitor.getPlatform() !== 'web') {\r\n // on native we can only write strings\r\n writeValue = dataViewToHexString(value);\r\n }\r\n await BluetoothLe.write(Object.assign({ deviceId,\r\n service,\r\n characteristic, value: writeValue }, options));\r\n });\r\n }\r\n async writeWithoutResponse(deviceId, service, characteristic, value, options) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n await this.queue(async () => {\r\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\r\n throw new Error('Invalid data.');\r\n }\r\n let writeValue = value;\r\n if (Capacitor.getPlatform() !== 'web') {\r\n // on native we can only write strings\r\n writeValue = dataViewToHexString(value);\r\n }\r\n await BluetoothLe.writeWithoutResponse(Object.assign({ deviceId,\r\n service,\r\n characteristic, value: writeValue }, options));\r\n });\r\n }\r\n async readDescriptor(deviceId, service, characteristic, descriptor, options) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n descriptor = parseUUID(descriptor);\r\n const value = await this.queue(async () => {\r\n const result = await BluetoothLe.readDescriptor(Object.assign({ deviceId,\r\n service,\r\n characteristic,\r\n descriptor }, options));\r\n return this.convertValue(result.value);\r\n });\r\n return value;\r\n }\r\n async writeDescriptor(deviceId, service, characteristic, descriptor, value, options) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n descriptor = parseUUID(descriptor);\r\n return this.queue(async () => {\r\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\r\n throw new Error('Invalid data.');\r\n }\r\n let writeValue = value;\r\n if (Capacitor.getPlatform() !== 'web') {\r\n // on native we can only write strings\r\n writeValue = dataViewToHexString(value);\r\n }\r\n await BluetoothLe.writeDescriptor(Object.assign({ deviceId,\r\n service,\r\n characteristic,\r\n descriptor, value: writeValue }, options));\r\n });\r\n }\r\n async startNotifications(deviceId, service, characteristic, callback, options) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n await this.queue(async () => {\r\n var _a;\r\n const key = `notification|${deviceId}|${service}|${characteristic}`;\r\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\r\n const listener = await BluetoothLe.addListener(key, (event) => {\r\n callback(this.convertValue(event === null || event === void 0 ? void 0 : event.value));\r\n });\r\n this.eventListeners.set(key, listener);\r\n await BluetoothLe.startNotifications(Object.assign({ deviceId,\r\n service,\r\n characteristic }, options));\r\n });\r\n }\r\n async stopNotifications(deviceId, service, characteristic) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n await this.queue(async () => {\r\n var _a;\r\n const key = `notification|${deviceId}|${service}|${characteristic}`;\r\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\r\n this.eventListeners.delete(key);\r\n await BluetoothLe.stopNotifications({\r\n deviceId,\r\n service,\r\n characteristic,\r\n });\r\n });\r\n }\r\n validateRequestBleDeviceOptions(options) {\r\n if (options.services) {\r\n options.services = options.services.map(parseUUID);\r\n }\r\n if (options.optionalServices) {\r\n options.optionalServices = options.optionalServices.map(parseUUID);\r\n }\r\n if (options.serviceData && Capacitor.getPlatform() !== 'web') {\r\n // Native platforms: convert to hex strings\r\n options.serviceData = options.serviceData.map((filter) => (Object.assign(Object.assign({}, filter), { serviceUuid: parseUUID(filter.serviceUuid), dataPrefix: toHexString(filter.dataPrefix), mask: toHexString(filter.mask) })));\r\n }\r\n if (options.manufacturerData) {\r\n if (Capacitor.getPlatform() !== 'web') {\r\n // Native platforms: convert to hex strings\r\n options.manufacturerData = options.manufacturerData.map((filter) => (Object.assign(Object.assign({}, filter), { dataPrefix: toHexString(filter.dataPrefix), mask: toHexString(filter.mask) })));\r\n }\r\n else {\r\n // Web platform: convert to Uint8Array for Web Bluetooth API\r\n options.manufacturerData = options.manufacturerData.map((filter) => (Object.assign(Object.assign({}, filter), { dataPrefix: toUint8Array(filter.dataPrefix), mask: toUint8Array(filter.mask) })));\r\n }\r\n }\r\n return options;\r\n }\r\n convertValue(value) {\r\n if (typeof value === 'string') {\r\n return hexStringToDataView(value);\r\n }\r\n else if (value === undefined) {\r\n return new DataView(new ArrayBuffer(0));\r\n }\r\n return value;\r\n }\r\n convertObject(obj) {\r\n if (obj === undefined) {\r\n return undefined;\r\n }\r\n const result = {};\r\n for (const key of Object.keys(obj)) {\r\n result[key] = this.convertValue(obj[key]);\r\n }\r\n return result;\r\n }\r\n}\r\nexport const BleClient = new BleClientClass();\r\n//# sourceMappingURL=bleClient.js.map","export async function runWithTimeout(promise, time, exception) {\r\n let timer;\r\n return Promise.race([\r\n promise,\r\n new Promise((_, reject) => {\r\n timer = setTimeout(() => reject(exception), time);\r\n }),\r\n ]).finally(() => clearTimeout(timer));\r\n}\r\n//# sourceMappingURL=timeout.js.map","import { WebPlugin } from '@capacitor/core';\r\nimport { hexStringToDataView, mapToObject, webUUIDToString } from './conversion';\r\nimport { runWithTimeout } from './timeout';\r\nexport class BluetoothLeWeb extends WebPlugin {\r\n constructor() {\r\n super(...arguments);\r\n this.deviceMap = new Map();\r\n this.discoveredDevices = new Map();\r\n this.scan = null;\r\n this.DEFAULT_CONNECTION_TIMEOUT = 10000;\r\n this.onAdvertisementReceivedCallback = this.onAdvertisementReceived.bind(this);\r\n this.onDisconnectedCallback = this.onDisconnected.bind(this);\r\n this.onCharacteristicValueChangedCallback = this.onCharacteristicValueChanged.bind(this);\r\n }\r\n async initialize() {\r\n if (typeof navigator === 'undefined' || !navigator.bluetooth) {\r\n throw this.unavailable('Web Bluetooth API not available in this browser.');\r\n }\r\n const isAvailable = await navigator.bluetooth.getAvailability();\r\n if (!isAvailable) {\r\n throw this.unavailable('No Bluetooth radio available.');\r\n }\r\n }\r\n async isEnabled() {\r\n // not available on web\r\n return { value: true };\r\n }\r\n async requestEnable() {\r\n throw this.unavailable('requestEnable is not available on web.');\r\n }\r\n async enable() {\r\n throw this.unavailable('enable is not available on web.');\r\n }\r\n async disable() {\r\n throw this.unavailable('disable is not available on web.');\r\n }\r\n async startEnabledNotifications() {\r\n // not available on web\r\n }\r\n async stopEnabledNotifications() {\r\n // not available on web\r\n }\r\n async isLocationEnabled() {\r\n throw this.unavailable('isLocationEnabled is not available on web.');\r\n }\r\n async openLocationSettings() {\r\n throw this.unavailable('openLocationSettings is not available on web.');\r\n }\r\n async openBluetoothSettings() {\r\n throw this.unavailable('openBluetoothSettings is not available on web.');\r\n }\r\n async openAppSettings() {\r\n throw this.unavailable('openAppSettings is not available on web.');\r\n }\r\n async setDisplayStrings() {\r\n // not available on web\r\n }\r\n async requestDevice(options) {\r\n const filters = this.getFilters(options);\r\n const device = await navigator.bluetooth.requestDevice({\r\n filters: filters.length ? filters : undefined,\r\n optionalServices: options === null || options === void 0 ? void 0 : options.optionalServices,\r\n acceptAllDevices: filters.length === 0,\r\n });\r\n this.deviceMap.set(device.id, device);\r\n const bleDevice = this.getBleDevice(device);\r\n return bleDevice;\r\n }\r\n async requestLEScan(options) {\r\n this.requestBleDeviceOptions = options;\r\n const filters = this.getFilters(options);\r\n await this.stopLEScan();\r\n this.discoveredDevices = new Map();\r\n navigator.bluetooth.removeEventListener('advertisementreceived', this.onAdvertisementReceivedCallback);\r\n navigator.bluetooth.addEventListener('advertisementreceived', this.onAdvertisementReceivedCallback);\r\n this.scan = await navigator.bluetooth.requestLEScan({\r\n filters: filters.length ? filters : undefined,\r\n acceptAllAdvertisements: filters.length === 0,\r\n keepRepeatedDevices: options === null || options === void 0 ? void 0 : options.allowDuplicates,\r\n });\r\n }\r\n onAdvertisementReceived(event) {\r\n var _a, _b, _c;\r\n const deviceId = event.device.id;\r\n this.deviceMap.set(deviceId, event.device);\r\n const isNew = !this.discoveredDevices.has(deviceId);\r\n // Apply service data filtering client-side (Web Bluetooth API doesn't support it in scan filters)\r\n if (((_a = this.requestBleDeviceOptions) === null || _a === void 0 ? void 0 : _a.serviceData) && !this.matchesServiceDataFilter(event)) {\r\n return;\r\n }\r\n if (isNew || ((_b = this.requestBleDeviceOptions) === null || _b === void 0 ? void 0 : _b.allowDuplicates)) {\r\n this.discoveredDevices.set(deviceId, true);\r\n const device = this.getBleDevice(event.device);\r\n const result = {\r\n device,\r\n localName: device.name,\r\n rssi: event.rssi,\r\n txPower: event.txPower,\r\n manufacturerData: mapToObject(event.manufacturerData),\r\n serviceData: mapToObject(event.serviceData),\r\n uuids: (_c = event.uuids) === null || _c === void 0 ? void 0 : _c.map(webUUIDToString),\r\n };\r\n this.notifyListeners('onScanResult', result);\r\n }\r\n }\r\n async stopLEScan() {\r\n var _a;\r\n if ((_a = this.scan) === null || _a === void 0 ? void 0 : _a.active) {\r\n this.scan.stop();\r\n }\r\n this.scan = null;\r\n }\r\n async getDevices(options) {\r\n const devices = await navigator.bluetooth.getDevices();\r\n const bleDevices = devices\r\n .filter((device) => options.deviceIds.includes(device.id))\r\n .map((device) => {\r\n this.deviceMap.set(device.id, device);\r\n const bleDevice = this.getBleDevice(device);\r\n return bleDevice;\r\n });\r\n return { devices: bleDevices };\r\n }\r\n async getConnectedDevices(_options) {\r\n const devices = await navigator.bluetooth.getDevices();\r\n const bleDevices = devices\r\n .filter((device) => {\r\n var _a;\r\n return (_a = device.gatt) === null || _a === void 0 ? void 0 : _a.connected;\r\n })\r\n .map((device) => {\r\n this.deviceMap.set(device.id, device);\r\n const bleDevice = this.getBleDevice(device);\r\n return bleDevice;\r\n });\r\n return { devices: bleDevices };\r\n }\r\n async getBondedDevices() {\r\n return {};\r\n }\r\n async connect(options) {\r\n var _a, _b;\r\n const device = this.getDeviceFromMap(options.deviceId);\r\n device.removeEventListener('gattserverdisconnected', this.onDisconnectedCallback);\r\n device.addEventListener('gattserverdisconnected', this.onDisconnectedCallback);\r\n const timeoutError = Symbol();\r\n if (device.gatt === undefined) {\r\n throw new Error('No gatt server available.');\r\n }\r\n try {\r\n const timeout = (_a = options.timeout) !== null && _a !== void 0 ? _a : this.DEFAULT_CONNECTION_TIMEOUT;\r\n await runWithTimeout(device.gatt.connect(), timeout, timeoutError);\r\n }\r\n catch (error) {\r\n // cancel pending connect call, does not work yet in chromium because of a bug:\r\n // https://bugs.chromium.org/p/chromium/issues/detail?id=684073\r\n await ((_b = device.gatt) === null || _b === void 0 ? void 0 : _b.disconnect());\r\n if (error === timeoutError) {\r\n throw new Error('Connection timeout');\r\n }\r\n else {\r\n throw error;\r\n }\r\n }\r\n }\r\n onDisconnected(event) {\r\n const deviceId = event.target.id;\r\n const key = `disconnected|${deviceId}`;\r\n this.notifyListeners(key, null);\r\n }\r\n async createBond(_options) {\r\n throw this.unavailable('createBond is not available on web.');\r\n }\r\n async isBonded(_options) {\r\n throw this.unavailable('isBonded is not available on web.');\r\n }\r\n async disconnect(options) {\r\n var _a;\r\n (_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.disconnect();\r\n }\r\n async getServices(options) {\r\n var _a, _b;\r\n const services = (_b = (await ((_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.getPrimaryServices()))) !== null && _b !== void 0 ? _b : [];\r\n const bleServices = [];\r\n for (const service of services) {\r\n const characteristics = await service.getCharacteristics();\r\n const bleCharacteristics = [];\r\n for (const characteristic of characteristics) {\r\n bleCharacteristics.push({\r\n uuid: characteristic.uuid,\r\n properties: this.getProperties(characteristic),\r\n descriptors: await this.getDescriptors(characteristic),\r\n });\r\n }\r\n bleServices.push({ uuid: service.uuid, characteristics: bleCharacteristics });\r\n }\r\n return { services: bleServices };\r\n }\r\n async getDescriptors(characteristic) {\r\n try {\r\n const descriptors = await characteristic.getDescriptors();\r\n return descriptors.map((descriptor) => ({\r\n uuid: descriptor.uuid,\r\n }));\r\n }\r\n catch (_a) {\r\n return [];\r\n }\r\n }\r\n getProperties(characteristic) {\r\n return {\r\n broadcast: characteristic.properties.broadcast,\r\n read: characteristic.properties.read,\r\n writeWithoutResponse: characteristic.properties.writeWithoutResponse,\r\n write: characteristic.properties.write,\r\n notify: characteristic.properties.notify,\r\n indicate: characteristic.properties.indicate,\r\n authenticatedSignedWrites: characteristic.properties.authenticatedSignedWrites,\r\n reliableWrite: characteristic.properties.reliableWrite,\r\n writableAuxiliaries: characteristic.properties.writableAuxiliaries,\r\n };\r\n }\r\n async getCharacteristic(options) {\r\n var _a;\r\n const service = await ((_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.getPrimaryService(options === null || options === void 0 ? void 0 : options.service));\r\n return service === null || service === void 0 ? void 0 : service.getCharacteristic(options === null || options === void 0 ? void 0 : options.characteristic);\r\n }\r\n async getDescriptor(options) {\r\n const characteristic = await this.getCharacteristic(options);\r\n return characteristic === null || characteristic === void 0 ? void 0 : characteristic.getDescriptor(options === null || options === void 0 ? void 0 : options.descriptor);\r\n }\r\n async discoverServices(_options) {\r\n throw this.unavailable('discoverServices is not available on web.');\r\n }\r\n async getMtu(_options) {\r\n throw this.unavailable('getMtu is not available on web.');\r\n }\r\n async requestConnectionPriority(_options) {\r\n throw this.unavailable('requestConnectionPriority is not available on web.');\r\n }\r\n async readRssi(_options) {\r\n throw this.unavailable('readRssi is not available on web.');\r\n }\r\n async read(options) {\r\n const characteristic = await this.getCharacteristic(options);\r\n const value = await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.readValue());\r\n return { value };\r\n }\r\n async write(options) {\r\n const characteristic = await this.getCharacteristic(options);\r\n let dataView;\r\n if (typeof options.value === 'string') {\r\n dataView = hexStringToDataView(options.value);\r\n }\r\n else {\r\n dataView = options.value;\r\n }\r\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.writeValueWithResponse(dataView));\r\n }\r\n async writeWithoutResponse(options) {\r\n const characteristic = await this.getCharacteristic(options);\r\n let dataView;\r\n if (typeof options.value === 'string') {\r\n dataView = hexStringToDataView(options.value);\r\n }\r\n else {\r\n dataView = options.value;\r\n }\r\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.writeValueWithoutResponse(dataView));\r\n }\r\n async readDescriptor(options) {\r\n const descriptor = await this.getDescriptor(options);\r\n const value = await (descriptor === null || descriptor === void 0 ? void 0 : descriptor.readValue());\r\n return { value };\r\n }\r\n async writeDescriptor(options) {\r\n const descriptor = await this.getDescriptor(options);\r\n let dataView;\r\n if (typeof options.value === 'string') {\r\n dataView = hexStringToDataView(options.value);\r\n }\r\n else {\r\n dataView = options.value;\r\n }\r\n await (descriptor === null || descriptor === void 0 ? void 0 : descriptor.writeValue(dataView));\r\n }\r\n async startNotifications(options) {\r\n const characteristic = await this.getCharacteristic(options);\r\n characteristic === null || characteristic === void 0 ? void 0 : characteristic.removeEventListener('characteristicvaluechanged', this.onCharacteristicValueChangedCallback);\r\n characteristic === null || characteristic === void 0 ? void 0 : characteristic.addEventListener('characteristicvaluechanged', this.onCharacteristicValueChangedCallback);\r\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.startNotifications());\r\n }\r\n onCharacteristicValueChanged(event) {\r\n var _a, _b;\r\n const characteristic = event.target;\r\n const key = `notification|${(_a = characteristic.service) === null || _a === void 0 ? void 0 : _a.device.id}|${(_b = characteristic.service) === null || _b === void 0 ? void 0 : _b.uuid}|${characteristic.uuid}`;\r\n this.notifyListeners(key, {\r\n value: characteristic.value,\r\n });\r\n }\r\n async stopNotifications(options) {\r\n const characteristic = await this.getCharacteristic(options);\r\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.stopNotifications());\r\n }\r\n getFilters(options) {\r\n var _a, _b;\r\n const filters = [];\r\n for (const service of (_a = options === null || options === void 0 ? void 0 : options.services) !== null && _a !== void 0 ? _a : []) {\r\n filters.push({\r\n services: [service],\r\n name: options === null || options === void 0 ? void 0 : options.name,\r\n namePrefix: options === null || options === void 0 ? void 0 : options.namePrefix,\r\n });\r\n }\r\n if (((options === null || options === void 0 ? void 0 : options.name) || (options === null || options === void 0 ? void 0 : options.namePrefix)) && filters.length === 0) {\r\n filters.push({\r\n name: options.name,\r\n namePrefix: options.namePrefix,\r\n });\r\n }\r\n for (const manufacturerData of (_b = options === null || options === void 0 ? void 0 : options.manufacturerData) !== null && _b !== void 0 ? _b : []) {\r\n // Cast to any to avoid type incompatibility - conversion is handled in bleClient.ts\r\n filters.push({\r\n manufacturerData: [manufacturerData],\r\n });\r\n }\r\n // Note: Web Bluetooth API does not support service data in scan filters.\r\n // Service data filtering will be done client-side in onAdvertisementReceived.\r\n // We still accept serviceData in options for API consistency across platforms.\r\n return filters;\r\n }\r\n matchesServiceDataFilter(event) {\r\n var _a;\r\n const filters = (_a = this.requestBleDeviceOptions) === null || _a === void 0 ? void 0 : _a.serviceData;\r\n if (!filters || filters.length === 0) {\r\n return true; // No filters, accept all\r\n }\r\n if (!event.serviceData) {\r\n return false; // No service data in advertisement\r\n }\r\n // Check if any filter matches (OR logic)\r\n for (const filter of filters) {\r\n const serviceData = event.serviceData.get(filter.serviceUuid);\r\n if (!serviceData) {\r\n continue; // This filter doesn't match, try next\r\n }\r\n // If we have service data for this UUID\r\n if (!filter.dataPrefix) {\r\n return true; // Filter matched by service UUID alone\r\n }\r\n // Check data prefix (DataView on web)\r\n const data = new Uint8Array(serviceData.buffer);\r\n const prefixView = filter.dataPrefix;\r\n if (data.length < prefixView.byteLength) {\r\n continue; // Data too short\r\n }\r\n // Apply mask if provided\r\n if (filter.mask) {\r\n const maskView = filter.mask;\r\n let matches = true;\r\n for (let i = 0; i < prefixView.byteLength; i++) {\r\n if ((data[i] & maskView.getUint8(i)) !== (prefixView.getUint8(i) & maskView.getUint8(i))) {\r\n matches = false;\r\n break;\r\n }\r\n }\r\n if (matches) {\r\n return true;\r\n }\r\n }\r\n else {\r\n // Check if data starts with prefix\r\n let matches = true;\r\n for (let i = 0; i < prefixView.byteLength; i++) {\r\n if (data[i] !== prefixView.getUint8(i)) {\r\n matches = false;\r\n break;\r\n }\r\n }\r\n if (matches) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false; // No filter matched\r\n }\r\n getDeviceFromMap(deviceId) {\r\n const device = this.deviceMap.get(deviceId);\r\n if (device === undefined) {\r\n throw new Error('Device not found. Call \"requestDevice\", \"requestLEScan\" or \"getDevices\" first.');\r\n }\r\n return device;\r\n }\r\n getBleDevice(device) {\r\n var _a;\r\n const bleDevice = {\r\n deviceId: device.id,\r\n // use undefined instead of null if name is not available\r\n name: (_a = device.name) !== null && _a !== void 0 ? _a : undefined,\r\n };\r\n return bleDevice;\r\n }\r\n}\r\n//# sourceMappingURL=web.js.map"],"names":["ScanMode","ConnectionPriority","registerPlugin","Capacitor","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;AACWA,8BAAS;IACpB,CAAC,UAAU,QAAQ,EAAE;IACrB;IACA;IACA;IACA;IACA,IAAI,QAAQ,CAAC,QAAQ,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,qBAAqB,CAAC;IAC1E;IACA;IACA;IACA;IACA,IAAI,QAAQ,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,oBAAoB,CAAC;IACxE;IACA;IACA;IACA;IACA,IAAI,QAAQ,CAAC,QAAQ,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,GAAG,uBAAuB,CAAC;IAC9E,CAAC,EAAEA,gBAAQ,KAAKA,gBAAQ,GAAG,EAAE,CAAC,CAAC,CAAC;IAChC;IACA;IACA;AACWC,wCAAmB;IAC9B,CAAC,UAAU,kBAAkB,EAAE;IAC/B;IACA;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,8BAA8B,CAAC,GAAG,CAAC,CAAC,GAAG,8BAA8B,CAAC;IAChH;IACA;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,kB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EAAE,GAAG,SAAS;IAC/E,SAAS,CAAC;IACV,QAAQ,OAAO,SAAS,CAAC;IACzB,KAAK;IACL;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/conversion.js","esm/plugin.js","esm/queue.js","esm/validators.js","esm/bleClient.js","esm/timeout.js","esm/web.js"],"sourcesContent":["/**\r\n * Android scan mode\r\n */\r\nexport var ScanMode;\r\n(function (ScanMode) {\r\n /**\r\n * Perform Bluetooth LE scan in low power mode. This mode is enforced if the scanning application is not in foreground.\r\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_POWER\r\n */\r\n ScanMode[ScanMode[\"SCAN_MODE_LOW_POWER\"] = 0] = \"SCAN_MODE_LOW_POWER\";\r\n /**\r\n * Perform Bluetooth LE scan in balanced power mode. (default) Scan results are returned at a rate that provides a good trade-off between scan frequency and power consumption.\r\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_BALANCED\r\n */\r\n ScanMode[ScanMode[\"SCAN_MODE_BALANCED\"] = 1] = \"SCAN_MODE_BALANCED\";\r\n /**\r\n * Scan using highest duty cycle. It's recommended to only use this mode when the application is running in the foreground.\r\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_LATENCY\r\n */\r\n ScanMode[ScanMode[\"SCAN_MODE_LOW_LATENCY\"] = 2] = \"SCAN_MODE_LOW_LATENCY\";\r\n})(ScanMode || (ScanMode = {}));\r\n/**\r\n * Android connection priority used in `requestConnectionPriority`\r\n */\r\nexport var ConnectionPriority;\r\n(function (ConnectionPriority) {\r\n /**\r\n * Use the connection parameters recommended by the Bluetooth SIG. This is the default value if no connection parameter update is requested.\r\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_BALANCED\r\n */\r\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_BALANCED\"] = 0] = \"CONNECTION_PRIORITY_BALANCED\";\r\n /**\r\n * Request a high priority, low latency connection. An application should only request high priority connection parameters to transfer large amounts of data over LE quickly. Once the transfer is complete, the application should request CONNECTION_PRIORITY_BALANCED connection parameters to reduce energy use.\r\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_HIGH\r\n */\r\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_HIGH\"] = 1] = \"CONNECTION_PRIORITY_HIGH\";\r\n /**\r\n * Request low power, reduced data rate connection parameters.\r\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_LOW_POWER\r\n */\r\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_LOW_POWER\"] = 2] = \"CONNECTION_PRIORITY_LOW_POWER\";\r\n})(ConnectionPriority || (ConnectionPriority = {}));\r\n//# sourceMappingURL=definitions.js.map","/**\r\n * Convert an array of numbers into a DataView.\r\n */\r\nexport function numbersToDataView(value) {\r\n return new DataView(Uint8Array.from(value).buffer);\r\n}\r\n/**\r\n * Convert a DataView into an array of numbers.\r\n */\r\nexport function dataViewToNumbers(value) {\r\n return Array.from(new Uint8Array(value.buffer, value.byteOffset, value.byteLength));\r\n}\r\n/**\r\n * Convert a string into a DataView.\r\n */\r\nexport function textToDataView(value) {\r\n return numbersToDataView(value.split('').map((s) => s.charCodeAt(0)));\r\n}\r\n/**\r\n * Convert a DataView into a string.\r\n */\r\nexport function dataViewToText(value) {\r\n return String.fromCharCode(...dataViewToNumbers(value));\r\n}\r\n/**\r\n * Convert a 16 bit UUID into a 128 bit UUID string\r\n * @param value number, e.g. 0x180d\r\n * @return string, e.g. '0000180d-0000-1000-8000-00805f9b34fb'\r\n */\r\nexport function numberToUUID(value) {\r\n return `0000${value.toString(16).padStart(4, '0')}-0000-1000-8000-00805f9b34fb`;\r\n}\r\n/**\r\n * Convert a string of hex into a DataView of raw bytes.\r\n * Note: characters other than [0-9a-fA-F] are ignored\r\n * @param hex string of values, e.g. \"00 01 02\" or \"000102\"\r\n * @return DataView of raw bytes\r\n */\r\nexport function hexStringToDataView(hex) {\r\n const bin = [];\r\n let i, c, isEmpty = 1, buffer = 0;\r\n for (i = 0; i < hex.length; i++) {\r\n c = hex.charCodeAt(i);\r\n if ((c > 47 && c < 58) || (c > 64 && c < 71) || (c > 96 && c < 103)) {\r\n buffer = (buffer << 4) ^ ((c > 64 ? c + 9 : c) & 15);\r\n if ((isEmpty ^= 1)) {\r\n bin.push(buffer & 0xff);\r\n }\r\n }\r\n }\r\n return numbersToDataView(bin);\r\n}\r\nexport function dataViewToHexString(value) {\r\n return dataViewToNumbers(value)\r\n .map((n) => {\r\n let s = n.toString(16);\r\n if (s.length == 1) {\r\n s = '0' + s;\r\n }\r\n return s;\r\n })\r\n .join('');\r\n}\r\nexport function webUUIDToString(uuid) {\r\n if (typeof uuid === 'string') {\r\n return uuid;\r\n }\r\n else if (typeof uuid === 'number') {\r\n return numberToUUID(uuid);\r\n }\r\n else {\r\n throw new Error('Invalid UUID');\r\n }\r\n}\r\nexport function mapToObject(map) {\r\n const obj = {};\r\n if (!map) {\r\n return undefined;\r\n }\r\n map.forEach((value, key) => {\r\n obj[key.toString()] = value;\r\n });\r\n return obj;\r\n}\r\n/**\r\n * Convert Data or Uint8Array to Uint8Array.\r\n * @param value DataView, Uint8Array, or undefined\r\n * @return Uint8Array or undefined\r\n */\r\nexport function toUint8Array(value) {\r\n if (value === undefined) {\r\n return undefined;\r\n }\r\n if (typeof value === 'string') {\r\n const dataView = hexStringToDataView(value);\r\n return new Uint8Array(dataView.buffer, dataView.byteOffset, dataView.byteLength);\r\n }\r\n if (value instanceof DataView) {\r\n return new Uint8Array(value.buffer, value.byteOffset, value.byteLength);\r\n }\r\n return value; // Already Uint8Array\r\n}\r\n/**\r\n * Convert Data, Uint8Array, or string to hex string.\r\n * @param value DataView, Uint8Array, or undefined\r\n * @return hex string or undefined\r\n */\r\nexport function toHexString(value) {\r\n if (value === undefined) {\r\n return undefined;\r\n }\r\n if (value instanceof DataView) {\r\n return dataViewToHexString(value);\r\n }\r\n // Uint8Array\r\n return dataViewToHexString(new DataView(value.buffer, value.byteOffset, value.byteLength));\r\n}\r\n//# sourceMappingURL=conversion.js.map","import { registerPlugin } from '@capacitor/core';\r\nexport const BluetoothLe = registerPlugin('BluetoothLe', {\r\n web: () => import('./web').then((m) => new m.BluetoothLeWeb()),\r\n});\r\n//# sourceMappingURL=plugin.js.map","const makeQueue = () => {\r\n let currentTask = Promise.resolve();\r\n // create a new promise so that errors can be bubbled\r\n // up to the caller without being caught by the queue\r\n return (fn) => new Promise((resolve, reject) => {\r\n currentTask = currentTask\r\n .then(() => fn())\r\n .then(resolve)\r\n .catch(reject);\r\n });\r\n};\r\nexport function getQueue(enabled) {\r\n if (enabled) {\r\n return makeQueue();\r\n }\r\n return (fn) => fn();\r\n}\r\n//# sourceMappingURL=queue.js.map","export function parseUUID(uuid) {\r\n if (typeof uuid !== 'string') {\r\n throw new Error(`Invalid UUID type ${typeof uuid}. Expected string.`);\r\n }\r\n uuid = uuid.toLowerCase();\r\n const is128BitUuid = uuid.search(/^[0-9a-f]{8}\\b-[0-9a-f]{4}\\b-[0-9a-f]{4}\\b-[0-9a-f]{4}\\b-[0-9a-f]{12}$/) >= 0;\r\n if (!is128BitUuid) {\r\n throw new Error(`Invalid UUID format ${uuid}. Expected 128 bit string (e.g. \"0000180d-0000-1000-8000-00805f9b34fb\").`);\r\n }\r\n return uuid;\r\n}\r\n//# sourceMappingURL=validators.js.map","import { Capacitor } from '@capacitor/core';\r\nimport { dataViewToHexString, hexStringToDataView, toUint8Array, toHexString } from './conversion';\r\nimport { BluetoothLe } from './plugin';\r\nimport { getQueue } from './queue';\r\nimport { parseUUID } from './validators';\r\nclass BleClientClass {\r\n constructor() {\r\n this.scanListener = null;\r\n this.eventListeners = new Map();\r\n this.queue = getQueue(true);\r\n }\r\n enableQueue() {\r\n this.queue = getQueue(true);\r\n }\r\n disableQueue() {\r\n this.queue = getQueue(false);\r\n }\r\n async initialize(options) {\r\n await this.queue(async () => {\r\n await BluetoothLe.initialize(options);\r\n });\r\n }\r\n async isEnabled() {\r\n const enabled = await this.queue(async () => {\r\n const result = await BluetoothLe.isEnabled();\r\n return result.value;\r\n });\r\n return enabled;\r\n }\r\n async requestEnable() {\r\n await this.queue(async () => {\r\n await BluetoothLe.requestEnable();\r\n });\r\n }\r\n async enable() {\r\n await this.queue(async () => {\r\n await BluetoothLe.enable();\r\n });\r\n }\r\n async disable() {\r\n await this.queue(async () => {\r\n await BluetoothLe.disable();\r\n });\r\n }\r\n async startEnabledNotifications(callback) {\r\n await this.queue(async () => {\r\n var _a;\r\n const key = `onEnabledChanged`;\r\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\r\n const listener = await BluetoothLe.addListener(key, (result) => {\r\n callback(result.value);\r\n });\r\n this.eventListeners.set(key, listener);\r\n await BluetoothLe.startEnabledNotifications();\r\n });\r\n }\r\n async stopEnabledNotifications() {\r\n await this.queue(async () => {\r\n var _a;\r\n const key = `onEnabledChanged`;\r\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\r\n this.eventListeners.delete(key);\r\n await BluetoothLe.stopEnabledNotifications();\r\n });\r\n }\r\n async isLocationEnabled() {\r\n const enabled = await this.queue(async () => {\r\n const result = await BluetoothLe.isLocationEnabled();\r\n return result.value;\r\n });\r\n return enabled;\r\n }\r\n async openLocationSettings() {\r\n await this.queue(async () => {\r\n await BluetoothLe.openLocationSettings();\r\n });\r\n }\r\n async openBluetoothSettings() {\r\n await this.queue(async () => {\r\n await BluetoothLe.openBluetoothSettings();\r\n });\r\n }\r\n async openAppSettings() {\r\n await this.queue(async () => {\r\n await BluetoothLe.openAppSettings();\r\n });\r\n }\r\n async setDisplayStrings(displayStrings) {\r\n await this.queue(async () => {\r\n await BluetoothLe.setDisplayStrings(displayStrings);\r\n });\r\n }\r\n async requestDevice(options) {\r\n options = options ? this.validateRequestBleDeviceOptions(options) : undefined;\r\n const result = await this.queue(async () => {\r\n const device = await BluetoothLe.requestDevice(options);\r\n return device;\r\n });\r\n return result;\r\n }\r\n async requestLEScan(options, callback) {\r\n options = this.validateRequestBleDeviceOptions(options);\r\n await this.queue(async () => {\r\n var _a;\r\n await ((_a = this.scanListener) === null || _a === void 0 ? void 0 : _a.remove());\r\n this.scanListener = await BluetoothLe.addListener('onScanResult', (resultInternal) => {\r\n const result = Object.assign(Object.assign({}, resultInternal), { manufacturerData: this.convertObject(resultInternal.manufacturerData), serviceData: this.convertObject(resultInternal.serviceData), rawAdvertisement: resultInternal.rawAdvertisement\r\n ? this.convertValue(resultInternal.rawAdvertisement)\r\n : undefined });\r\n callback(result);\r\n });\r\n await BluetoothLe.requestLEScan(options);\r\n });\r\n }\r\n async stopLEScan() {\r\n await this.queue(async () => {\r\n var _a;\r\n await ((_a = this.scanListener) === null || _a === void 0 ? void 0 : _a.remove());\r\n this.scanListener = null;\r\n await BluetoothLe.stopLEScan();\r\n });\r\n }\r\n async getDevices(deviceIds) {\r\n if (!Array.isArray(deviceIds)) {\r\n throw new Error('deviceIds must be an array');\r\n }\r\n return this.queue(async () => {\r\n const result = await BluetoothLe.getDevices({ deviceIds });\r\n return result.devices;\r\n });\r\n }\r\n async getConnectedDevices(services) {\r\n if (!Array.isArray(services)) {\r\n throw new Error('services must be an array');\r\n }\r\n services = services.map(parseUUID);\r\n return this.queue(async () => {\r\n const result = await BluetoothLe.getConnectedDevices({ services });\r\n return result.devices;\r\n });\r\n }\r\n async getBondedDevices() {\r\n return this.queue(async () => {\r\n const result = await BluetoothLe.getBondedDevices();\r\n return result.devices;\r\n });\r\n }\r\n async connect(deviceId, onDisconnect, options) {\r\n await this.queue(async () => {\r\n var _a;\r\n if (onDisconnect) {\r\n const key = `disconnected|${deviceId}`;\r\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\r\n const listener = await BluetoothLe.addListener(key, () => {\r\n onDisconnect(deviceId);\r\n });\r\n this.eventListeners.set(key, listener);\r\n }\r\n await BluetoothLe.connect(Object.assign({ deviceId }, options));\r\n });\r\n }\r\n async createBond(deviceId, options) {\r\n await this.queue(async () => {\r\n await BluetoothLe.createBond(Object.assign({ deviceId }, options));\r\n });\r\n }\r\n async isBonded(deviceId) {\r\n const isBonded = await this.queue(async () => {\r\n const result = await BluetoothLe.isBonded({ deviceId });\r\n return result.value;\r\n });\r\n return isBonded;\r\n }\r\n async disconnect(deviceId) {\r\n await this.queue(async () => {\r\n await BluetoothLe.disconnect({ deviceId });\r\n });\r\n }\r\n async getServices(deviceId) {\r\n const services = await this.queue(async () => {\r\n const result = await BluetoothLe.getServices({ deviceId });\r\n return result.services;\r\n });\r\n return services;\r\n }\r\n async discoverServices(deviceId) {\r\n await this.queue(async () => {\r\n await BluetoothLe.discoverServices({ deviceId });\r\n });\r\n }\r\n async getMtu(deviceId) {\r\n const value = await this.queue(async () => {\r\n const result = await BluetoothLe.getMtu({ deviceId });\r\n return result.value;\r\n });\r\n return value;\r\n }\r\n async requestConnectionPriority(deviceId, connectionPriority) {\r\n await this.queue(async () => {\r\n await BluetoothLe.requestConnectionPriority({ deviceId, connectionPriority });\r\n });\r\n }\r\n async readRssi(deviceId) {\r\n const value = await this.queue(async () => {\r\n const result = await BluetoothLe.readRssi({ deviceId });\r\n return parseFloat(result.value);\r\n });\r\n return value;\r\n }\r\n async read(deviceId, service, characteristic, options) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n const value = await this.queue(async () => {\r\n const result = await BluetoothLe.read(Object.assign({ deviceId,\r\n service,\r\n characteristic }, options));\r\n return this.convertValue(result.value);\r\n });\r\n return value;\r\n }\r\n async write(deviceId, service, characteristic, value, options) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n return this.queue(async () => {\r\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\r\n throw new Error('Invalid data.');\r\n }\r\n let writeValue = value;\r\n if (Capacitor.getPlatform() !== 'web') {\r\n // on native we can only write strings\r\n writeValue = dataViewToHexString(value);\r\n }\r\n await BluetoothLe.write(Object.assign({ deviceId,\r\n service,\r\n characteristic, value: writeValue }, options));\r\n });\r\n }\r\n async writeWithoutResponse(deviceId, service, characteristic, value, options) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n await this.queue(async () => {\r\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\r\n throw new Error('Invalid data.');\r\n }\r\n let writeValue = value;\r\n if (Capacitor.getPlatform() !== 'web') {\r\n // on native we can only write strings\r\n writeValue = dataViewToHexString(value);\r\n }\r\n await BluetoothLe.writeWithoutResponse(Object.assign({ deviceId,\r\n service,\r\n characteristic, value: writeValue }, options));\r\n });\r\n }\r\n async readDescriptor(deviceId, service, characteristic, descriptor, options) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n descriptor = parseUUID(descriptor);\r\n const value = await this.queue(async () => {\r\n const result = await BluetoothLe.readDescriptor(Object.assign({ deviceId,\r\n service,\r\n characteristic,\r\n descriptor }, options));\r\n return this.convertValue(result.value);\r\n });\r\n return value;\r\n }\r\n async writeDescriptor(deviceId, service, characteristic, descriptor, value, options) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n descriptor = parseUUID(descriptor);\r\n return this.queue(async () => {\r\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\r\n throw new Error('Invalid data.');\r\n }\r\n let writeValue = value;\r\n if (Capacitor.getPlatform() !== 'web') {\r\n // on native we can only write strings\r\n writeValue = dataViewToHexString(value);\r\n }\r\n await BluetoothLe.writeDescriptor(Object.assign({ deviceId,\r\n service,\r\n characteristic,\r\n descriptor, value: writeValue }, options));\r\n });\r\n }\r\n async startNotifications(deviceId, service, characteristic, callback, options) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n await this.queue(async () => {\r\n var _a;\r\n const key = `notification|${deviceId}|${service}|${characteristic}`;\r\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\r\n const listener = await BluetoothLe.addListener(key, (event) => {\r\n callback(this.convertValue(event === null || event === void 0 ? void 0 : event.value));\r\n });\r\n this.eventListeners.set(key, listener);\r\n await BluetoothLe.startNotifications(Object.assign({ deviceId,\r\n service,\r\n characteristic }, options));\r\n });\r\n }\r\n async stopNotifications(deviceId, service, characteristic) {\r\n service = parseUUID(service);\r\n characteristic = parseUUID(characteristic);\r\n await this.queue(async () => {\r\n var _a;\r\n const key = `notification|${deviceId}|${service}|${characteristic}`;\r\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\r\n this.eventListeners.delete(key);\r\n await BluetoothLe.stopNotifications({\r\n deviceId,\r\n service,\r\n characteristic,\r\n });\r\n });\r\n }\r\n validateRequestBleDeviceOptions(options) {\r\n options = Object.assign({}, options);\r\n if (options.services) {\r\n options.services = options.services.map(parseUUID);\r\n }\r\n if (options.optionalServices) {\r\n options.optionalServices = options.optionalServices.map(parseUUID);\r\n }\r\n if (options.serviceData && Capacitor.getPlatform() !== 'web') {\r\n // Native platforms: convert to hex strings\r\n options.serviceData = options.serviceData.map((filter) => (Object.assign(Object.assign({}, filter), { serviceUuid: parseUUID(filter.serviceUuid), dataPrefix: toHexString(filter.dataPrefix), mask: toHexString(filter.mask) })));\r\n }\r\n if (options.manufacturerData) {\r\n if (Capacitor.getPlatform() !== 'web') {\r\n // Native platforms: convert to hex strings\r\n options.manufacturerData = options.manufacturerData.map((filter) => (Object.assign(Object.assign({}, filter), { dataPrefix: toHexString(filter.dataPrefix), mask: toHexString(filter.mask) })));\r\n }\r\n else {\r\n // Web platform: convert to Uint8Array for Web Bluetooth API\r\n options.manufacturerData = options.manufacturerData.map((filter) => (Object.assign(Object.assign({}, filter), { dataPrefix: toUint8Array(filter.dataPrefix), mask: toUint8Array(filter.mask) })));\r\n }\r\n }\r\n return options;\r\n }\r\n convertValue(value) {\r\n if (typeof value === 'string') {\r\n return hexStringToDataView(value);\r\n }\r\n else if (value === undefined) {\r\n return new DataView(new ArrayBuffer(0));\r\n }\r\n return value;\r\n }\r\n convertObject(obj) {\r\n if (obj === undefined) {\r\n return undefined;\r\n }\r\n const result = {};\r\n for (const key of Object.keys(obj)) {\r\n result[key] = this.convertValue(obj[key]);\r\n }\r\n return result;\r\n }\r\n}\r\nexport const BleClient = new BleClientClass();\r\n//# sourceMappingURL=bleClient.js.map","export async function runWithTimeout(promise, time, exception) {\r\n let timer;\r\n return Promise.race([\r\n promise,\r\n new Promise((_, reject) => {\r\n timer = setTimeout(() => reject(exception), time);\r\n }),\r\n ]).finally(() => clearTimeout(timer));\r\n}\r\n//# sourceMappingURL=timeout.js.map","import { WebPlugin } from '@capacitor/core';\r\nimport { hexStringToDataView, mapToObject, webUUIDToString } from './conversion';\r\nimport { runWithTimeout } from './timeout';\r\nexport class BluetoothLeWeb extends WebPlugin {\r\n constructor() {\r\n super(...arguments);\r\n this.deviceMap = new Map();\r\n this.discoveredDevices = new Map();\r\n this.scan = null;\r\n this.DEFAULT_CONNECTION_TIMEOUT = 10000;\r\n this.onAdvertisementReceivedCallback = this.onAdvertisementReceived.bind(this);\r\n this.onDisconnectedCallback = this.onDisconnected.bind(this);\r\n this.onCharacteristicValueChangedCallback = this.onCharacteristicValueChanged.bind(this);\r\n }\r\n async initialize() {\r\n if (typeof navigator === 'undefined' || !navigator.bluetooth) {\r\n throw this.unavailable('Web Bluetooth API not available in this browser.');\r\n }\r\n const isAvailable = await navigator.bluetooth.getAvailability();\r\n if (!isAvailable) {\r\n throw this.unavailable('No Bluetooth radio available.');\r\n }\r\n }\r\n async isEnabled() {\r\n // not available on web\r\n return { value: true };\r\n }\r\n async requestEnable() {\r\n throw this.unavailable('requestEnable is not available on web.');\r\n }\r\n async enable() {\r\n throw this.unavailable('enable is not available on web.');\r\n }\r\n async disable() {\r\n throw this.unavailable('disable is not available on web.');\r\n }\r\n async startEnabledNotifications() {\r\n // not available on web\r\n }\r\n async stopEnabledNotifications() {\r\n // not available on web\r\n }\r\n async isLocationEnabled() {\r\n throw this.unavailable('isLocationEnabled is not available on web.');\r\n }\r\n async openLocationSettings() {\r\n throw this.unavailable('openLocationSettings is not available on web.');\r\n }\r\n async openBluetoothSettings() {\r\n throw this.unavailable('openBluetoothSettings is not available on web.');\r\n }\r\n async openAppSettings() {\r\n throw this.unavailable('openAppSettings is not available on web.');\r\n }\r\n async setDisplayStrings() {\r\n // not available on web\r\n }\r\n async requestDevice(options) {\r\n const filters = this.getFilters(options);\r\n const device = await navigator.bluetooth.requestDevice({\r\n filters: filters.length ? filters : undefined,\r\n optionalServices: options === null || options === void 0 ? void 0 : options.optionalServices,\r\n acceptAllDevices: filters.length === 0,\r\n });\r\n this.deviceMap.set(device.id, device);\r\n const bleDevice = this.getBleDevice(device);\r\n return bleDevice;\r\n }\r\n async requestLEScan(options) {\r\n this.requestBleDeviceOptions = options;\r\n const filters = this.getFilters(options);\r\n await this.stopLEScan();\r\n this.discoveredDevices = new Map();\r\n navigator.bluetooth.removeEventListener('advertisementreceived', this.onAdvertisementReceivedCallback);\r\n navigator.bluetooth.addEventListener('advertisementreceived', this.onAdvertisementReceivedCallback);\r\n this.scan = await navigator.bluetooth.requestLEScan({\r\n filters: filters.length ? filters : undefined,\r\n acceptAllAdvertisements: filters.length === 0,\r\n keepRepeatedDevices: options === null || options === void 0 ? void 0 : options.allowDuplicates,\r\n });\r\n }\r\n onAdvertisementReceived(event) {\r\n var _a, _b, _c;\r\n const deviceId = event.device.id;\r\n this.deviceMap.set(deviceId, event.device);\r\n const isNew = !this.discoveredDevices.has(deviceId);\r\n // Apply service data filtering client-side (Web Bluetooth API doesn't support it in scan filters)\r\n if (((_a = this.requestBleDeviceOptions) === null || _a === void 0 ? void 0 : _a.serviceData) && !this.matchesServiceDataFilter(event)) {\r\n return;\r\n }\r\n if (isNew || ((_b = this.requestBleDeviceOptions) === null || _b === void 0 ? void 0 : _b.allowDuplicates)) {\r\n this.discoveredDevices.set(deviceId, true);\r\n const device = this.getBleDevice(event.device);\r\n const result = {\r\n device,\r\n localName: device.name,\r\n rssi: event.rssi,\r\n txPower: event.txPower,\r\n manufacturerData: mapToObject(event.manufacturerData),\r\n serviceData: mapToObject(event.serviceData),\r\n uuids: (_c = event.uuids) === null || _c === void 0 ? void 0 : _c.map(webUUIDToString),\r\n };\r\n this.notifyListeners('onScanResult', result);\r\n }\r\n }\r\n async stopLEScan() {\r\n var _a;\r\n if ((_a = this.scan) === null || _a === void 0 ? void 0 : _a.active) {\r\n this.scan.stop();\r\n }\r\n this.scan = null;\r\n }\r\n async getDevices(options) {\r\n const devices = await navigator.bluetooth.getDevices();\r\n const bleDevices = devices\r\n .filter((device) => options.deviceIds.includes(device.id))\r\n .map((device) => {\r\n this.deviceMap.set(device.id, device);\r\n const bleDevice = this.getBleDevice(device);\r\n return bleDevice;\r\n });\r\n return { devices: bleDevices };\r\n }\r\n async getConnectedDevices(_options) {\r\n const devices = await navigator.bluetooth.getDevices();\r\n const bleDevices = devices\r\n .filter((device) => {\r\n var _a;\r\n return (_a = device.gatt) === null || _a === void 0 ? void 0 : _a.connected;\r\n })\r\n .map((device) => {\r\n this.deviceMap.set(device.id, device);\r\n const bleDevice = this.getBleDevice(device);\r\n return bleDevice;\r\n });\r\n return { devices: bleDevices };\r\n }\r\n async getBondedDevices() {\r\n return {};\r\n }\r\n async connect(options) {\r\n var _a, _b;\r\n const device = this.getDeviceFromMap(options.deviceId);\r\n device.removeEventListener('gattserverdisconnected', this.onDisconnectedCallback);\r\n device.addEventListener('gattserverdisconnected', this.onDisconnectedCallback);\r\n const timeoutError = Symbol();\r\n if (device.gatt === undefined) {\r\n throw new Error('No gatt server available.');\r\n }\r\n try {\r\n const timeout = (_a = options.timeout) !== null && _a !== void 0 ? _a : this.DEFAULT_CONNECTION_TIMEOUT;\r\n await runWithTimeout(device.gatt.connect(), timeout, timeoutError);\r\n }\r\n catch (error) {\r\n // cancel pending connect call, does not work yet in chromium because of a bug:\r\n // https://bugs.chromium.org/p/chromium/issues/detail?id=684073\r\n await ((_b = device.gatt) === null || _b === void 0 ? void 0 : _b.disconnect());\r\n if (error === timeoutError) {\r\n throw new Error('Connection timeout');\r\n }\r\n else {\r\n throw error;\r\n }\r\n }\r\n }\r\n onDisconnected(event) {\r\n const deviceId = event.target.id;\r\n const key = `disconnected|${deviceId}`;\r\n this.notifyListeners(key, null);\r\n }\r\n async createBond(_options) {\r\n throw this.unavailable('createBond is not available on web.');\r\n }\r\n async isBonded(_options) {\r\n throw this.unavailable('isBonded is not available on web.');\r\n }\r\n async disconnect(options) {\r\n var _a;\r\n (_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.disconnect();\r\n }\r\n async getServices(options) {\r\n var _a, _b;\r\n const services = (_b = (await ((_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.getPrimaryServices()))) !== null && _b !== void 0 ? _b : [];\r\n const bleServices = [];\r\n for (const service of services) {\r\n const characteristics = await service.getCharacteristics();\r\n const bleCharacteristics = [];\r\n for (const characteristic of characteristics) {\r\n bleCharacteristics.push({\r\n uuid: characteristic.uuid,\r\n properties: this.getProperties(characteristic),\r\n descriptors: await this.getDescriptors(characteristic),\r\n });\r\n }\r\n bleServices.push({ uuid: service.uuid, characteristics: bleCharacteristics });\r\n }\r\n return { services: bleServices };\r\n }\r\n async getDescriptors(characteristic) {\r\n try {\r\n const descriptors = await characteristic.getDescriptors();\r\n return descriptors.map((descriptor) => ({\r\n uuid: descriptor.uuid,\r\n }));\r\n }\r\n catch (_a) {\r\n return [];\r\n }\r\n }\r\n getProperties(characteristic) {\r\n return {\r\n broadcast: characteristic.properties.broadcast,\r\n read: characteristic.properties.read,\r\n writeWithoutResponse: characteristic.properties.writeWithoutResponse,\r\n write: characteristic.properties.write,\r\n notify: characteristic.properties.notify,\r\n indicate: characteristic.properties.indicate,\r\n authenticatedSignedWrites: characteristic.properties.authenticatedSignedWrites,\r\n reliableWrite: characteristic.properties.reliableWrite,\r\n writableAuxiliaries: characteristic.properties.writableAuxiliaries,\r\n };\r\n }\r\n async getCharacteristic(options) {\r\n var _a;\r\n const service = await ((_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.getPrimaryService(options === null || options === void 0 ? void 0 : options.service));\r\n return service === null || service === void 0 ? void 0 : service.getCharacteristic(options === null || options === void 0 ? void 0 : options.characteristic);\r\n }\r\n async getDescriptor(options) {\r\n const characteristic = await this.getCharacteristic(options);\r\n return characteristic === null || characteristic === void 0 ? void 0 : characteristic.getDescriptor(options === null || options === void 0 ? void 0 : options.descriptor);\r\n }\r\n async discoverServices(_options) {\r\n throw this.unavailable('discoverServices is not available on web.');\r\n }\r\n async getMtu(_options) {\r\n throw this.unavailable('getMtu is not available on web.');\r\n }\r\n async requestConnectionPriority(_options) {\r\n throw this.unavailable('requestConnectionPriority is not available on web.');\r\n }\r\n async readRssi(_options) {\r\n throw this.unavailable('readRssi is not available on web.');\r\n }\r\n async read(options) {\r\n const characteristic = await this.getCharacteristic(options);\r\n const value = await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.readValue());\r\n return { value };\r\n }\r\n async write(options) {\r\n const characteristic = await this.getCharacteristic(options);\r\n let dataView;\r\n if (typeof options.value === 'string') {\r\n dataView = hexStringToDataView(options.value);\r\n }\r\n else {\r\n dataView = options.value;\r\n }\r\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.writeValueWithResponse(dataView));\r\n }\r\n async writeWithoutResponse(options) {\r\n const characteristic = await this.getCharacteristic(options);\r\n let dataView;\r\n if (typeof options.value === 'string') {\r\n dataView = hexStringToDataView(options.value);\r\n }\r\n else {\r\n dataView = options.value;\r\n }\r\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.writeValueWithoutResponse(dataView));\r\n }\r\n async readDescriptor(options) {\r\n const descriptor = await this.getDescriptor(options);\r\n const value = await (descriptor === null || descriptor === void 0 ? void 0 : descriptor.readValue());\r\n return { value };\r\n }\r\n async writeDescriptor(options) {\r\n const descriptor = await this.getDescriptor(options);\r\n let dataView;\r\n if (typeof options.value === 'string') {\r\n dataView = hexStringToDataView(options.value);\r\n }\r\n else {\r\n dataView = options.value;\r\n }\r\n await (descriptor === null || descriptor === void 0 ? void 0 : descriptor.writeValue(dataView));\r\n }\r\n async startNotifications(options) {\r\n const characteristic = await this.getCharacteristic(options);\r\n characteristic === null || characteristic === void 0 ? void 0 : characteristic.removeEventListener('characteristicvaluechanged', this.onCharacteristicValueChangedCallback);\r\n characteristic === null || characteristic === void 0 ? void 0 : characteristic.addEventListener('characteristicvaluechanged', this.onCharacteristicValueChangedCallback);\r\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.startNotifications());\r\n }\r\n onCharacteristicValueChanged(event) {\r\n var _a, _b;\r\n const characteristic = event.target;\r\n const key = `notification|${(_a = characteristic.service) === null || _a === void 0 ? void 0 : _a.device.id}|${(_b = characteristic.service) === null || _b === void 0 ? void 0 : _b.uuid}|${characteristic.uuid}`;\r\n this.notifyListeners(key, {\r\n value: characteristic.value,\r\n });\r\n }\r\n async stopNotifications(options) {\r\n const characteristic = await this.getCharacteristic(options);\r\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.stopNotifications());\r\n }\r\n getFilters(options) {\r\n var _a, _b;\r\n const filters = [];\r\n for (const service of (_a = options === null || options === void 0 ? void 0 : options.services) !== null && _a !== void 0 ? _a : []) {\r\n filters.push({\r\n services: [service],\r\n name: options === null || options === void 0 ? void 0 : options.name,\r\n namePrefix: options === null || options === void 0 ? void 0 : options.namePrefix,\r\n });\r\n }\r\n if (((options === null || options === void 0 ? void 0 : options.name) || (options === null || options === void 0 ? void 0 : options.namePrefix)) && filters.length === 0) {\r\n filters.push({\r\n name: options.name,\r\n namePrefix: options.namePrefix,\r\n });\r\n }\r\n for (const manufacturerData of (_b = options === null || options === void 0 ? void 0 : options.manufacturerData) !== null && _b !== void 0 ? _b : []) {\r\n // Cast to any to avoid type incompatibility - conversion is handled in bleClient.ts\r\n filters.push({\r\n manufacturerData: [manufacturerData],\r\n });\r\n }\r\n // Note: Web Bluetooth API does not support service data in scan filters.\r\n // Service data filtering will be done client-side in onAdvertisementReceived.\r\n // We still accept serviceData in options for API consistency across platforms.\r\n return filters;\r\n }\r\n matchesServiceDataFilter(event) {\r\n var _a;\r\n const filters = (_a = this.requestBleDeviceOptions) === null || _a === void 0 ? void 0 : _a.serviceData;\r\n if (!filters || filters.length === 0) {\r\n return true; // No filters, accept all\r\n }\r\n if (!event.serviceData) {\r\n return false; // No service data in advertisement\r\n }\r\n // Check if any filter matches (OR logic)\r\n for (const filter of filters) {\r\n const serviceData = event.serviceData.get(filter.serviceUuid);\r\n if (!serviceData) {\r\n continue; // This filter doesn't match, try next\r\n }\r\n // If we have service data for this UUID\r\n if (!filter.dataPrefix) {\r\n return true; // Filter matched by service UUID alone\r\n }\r\n // Check data prefix (DataView on web)\r\n const data = new Uint8Array(serviceData.buffer);\r\n const prefixView = filter.dataPrefix;\r\n if (data.length < prefixView.byteLength) {\r\n continue; // Data too short\r\n }\r\n // Apply mask if provided\r\n if (filter.mask) {\r\n const maskView = filter.mask;\r\n let matches = true;\r\n for (let i = 0; i < prefixView.byteLength; i++) {\r\n if ((data[i] & maskView.getUint8(i)) !== (prefixView.getUint8(i) & maskView.getUint8(i))) {\r\n matches = false;\r\n break;\r\n }\r\n }\r\n if (matches) {\r\n return true;\r\n }\r\n }\r\n else {\r\n // Check if data starts with prefix\r\n let matches = true;\r\n for (let i = 0; i < prefixView.byteLength; i++) {\r\n if (data[i] !== prefixView.getUint8(i)) {\r\n matches = false;\r\n break;\r\n }\r\n }\r\n if (matches) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false; // No filter matched\r\n }\r\n getDeviceFromMap(deviceId) {\r\n const device = this.deviceMap.get(deviceId);\r\n if (device === undefined) {\r\n throw new Error('Device not found. Call \"requestDevice\", \"requestLEScan\" or \"getDevices\" first.');\r\n }\r\n return device;\r\n }\r\n getBleDevice(device) {\r\n var _a;\r\n const bleDevice = {\r\n deviceId: device.id,\r\n // use undefined instead of null if name is not available\r\n name: (_a = device.name) !== null && _a !== void 0 ? _a : undefined,\r\n };\r\n return bleDevice;\r\n }\r\n}\r\n//# sourceMappingURL=web.js.map"],"names":["ScanMode","ConnectionPriority","registerPlugin","Capacitor","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;AACWA,8BAAS;IACpB,CAAC,UAAU,QAAQ,EAAE;IACrB;IACA;IACA;IACA;IACA,IAAI,QAAQ,CAAC,QAAQ,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,qBAAqB,CAAC;IAC1E;IACA;IACA;IACA;IACA,IAAI,QAAQ,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,oBAAoB,CAAC;IACxE;IACA;IACA;IACA;IACA,IAAI,QAAQ,CAAC,QAAQ,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,GAAG,uBAAuB,CAAC;IAC9E,CAAC,EAAEA,gBAAQ,KAAKA,gBAAQ,GAAG,EAAE,CAAC,CAAC,CAAC;IAChC;IACA;IACA;AACWC,wCAAmB;IAC9B,CAAC,UAAU,kBAAkB,EAAE;IAC/B;IACA;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,8BAA8B,CAAC,GAAG,CAAC,CAAC,GAAG,8BAA8B,CAAC;IAChH;IACA;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,GAAG,CAAC,CAAC,GAAG,0BAA0B,CAAC;IACxG;IACA;IACA;IACA;IACA,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,+BAA+B,CAAC,GAAG,CAAC,CAAC,GAAG,+BAA+B,CAAC;IAClH,CAAC,EAAEA,0BAAkB,KAAKA,0BAAkB,GAAG,EAAE,CAAC,CAAC;;ICzCnD;IACA;IACA;IACO,SAAS,iBAAiB,CAAC,KAAK,E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peripheralName: peripheral.name) else { return }
|
|
180
180
|
guard self.passesNamePrefixFilter(peripheralName: peripheral.name) else { return }
|
|
181
|
-
guard
|
|
182
|
-
guard
|
|
181
|
+
guard ScanFilterUtils.passesManufacturerDataFilter(advertisementData, filters: self.manufacturerDataFilters) else { return }
|
|
182
|
+
guard ScanFilterUtils.passesServiceDataFilter(advertisementData, filters: self.serviceDataFilters) else { return }
|
|
183
183
|
|
|
184
184
|
let device: Device
|
|
185
185
|
if self.allowDuplicates, let knownDevice = discoveredDevices.first(where: { $0.key == peripheral.identifier.uuidString })?.value {
|
|
@@ -360,94 +360,6 @@ class DeviceManager: NSObject, CBCentralManagerDelegate {
|
|
|
360
360
|
return name.hasPrefix(prefix)
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
private func passesManufacturerDataFilter(_ advertisementData: [String: Any]) -> Bool {
|
|
364
|
-
guard let filters = self.manufacturerDataFilters, !filters.isEmpty else {
|
|
365
|
-
return true // No filters means everything passes
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
guard let manufacturerData = advertisementData[CBAdvertisementDataManufacturerDataKey] as? Data,
|
|
369
|
-
manufacturerData.count >= 2 else {
|
|
370
|
-
return false // If there's no valid manufacturer data, fail
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
let companyIdentifier = manufacturerData.prefix(2).withUnsafeBytes {
|
|
374
|
-
$0.load(as: UInt16.self).littleEndian // Manufacturer ID is little-endian
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
let payload = manufacturerData.dropFirst(2)
|
|
378
|
-
|
|
379
|
-
for filter in filters {
|
|
380
|
-
if filter.companyIdentifier != companyIdentifier {
|
|
381
|
-
continue // Skip if company ID does not match
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
if let dataPrefix = filter.dataPrefix {
|
|
385
|
-
if payload.count < dataPrefix.count {
|
|
386
|
-
continue // Payload too short, does not match
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
if let mask = filter.mask {
|
|
390
|
-
var matches = true
|
|
391
|
-
for i in 0..<dataPrefix.count {
|
|
392
|
-
if (payload[i] & mask[i]) != (dataPrefix[i] & mask[i]) {
|
|
393
|
-
matches = false
|
|
394
|
-
break
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
if matches {
|
|
398
|
-
return true
|
|
399
|
-
}
|
|
400
|
-
} else if payload.starts(with: dataPrefix) {
|
|
401
|
-
return true
|
|
402
|
-
}
|
|
403
|
-
} else {
|
|
404
|
-
return true // Company ID matched, and no dataPrefix required
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
return false // If none matched, return false
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
private func passesServiceDataFilter(_ advertisementData: [String: Any]) -> Bool {
|
|
412
|
-
guard let filters = self.serviceDataFilters, !filters.isEmpty else {
|
|
413
|
-
return true // No filters means everything passes
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
guard let serviceDataDict = advertisementData[CBAdvertisementDataServiceDataKey] as? [CBUUID: Data] else {
|
|
417
|
-
return false // If there's no service data, fail
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
for filter in filters {
|
|
421
|
-
guard let serviceData = serviceDataDict[filter.serviceUuid] else {
|
|
422
|
-
continue // Skip if service UUID does not match
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
if let dataPrefix = filter.dataPrefix {
|
|
426
|
-
if serviceData.count < dataPrefix.count {
|
|
427
|
-
continue // Service data too short, does not match
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
if let mask = filter.mask {
|
|
431
|
-
var matches = true
|
|
432
|
-
for i in 0..<dataPrefix.count {
|
|
433
|
-
if (serviceData[i] & mask[i]) != (dataPrefix[i] & mask[i]) {
|
|
434
|
-
matches = false
|
|
435
|
-
break
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
if matches {
|
|
439
|
-
return true
|
|
440
|
-
}
|
|
441
|
-
} else if serviceData.starts(with: dataPrefix) {
|
|
442
|
-
return true
|
|
443
|
-
}
|
|
444
|
-
} else {
|
|
445
|
-
return true // Service UUID matched, and no dataPrefix required
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
return false // If none matched, return false
|
|
450
|
-
}
|
|
451
363
|
|
|
452
364
|
private func resolve(_ key: String, _ value: String) {
|
|
453
365
|
let callback = self.callbackMap[key]
|
package/ios/Plugin/Plugin.swift
CHANGED
|
@@ -7,18 +7,6 @@ import CoreBluetooth
|
|
|
7
7
|
let CONNECTION_TIMEOUT: Double = 10
|
|
8
8
|
let DEFAULT_TIMEOUT: Double = 5
|
|
9
9
|
|
|
10
|
-
struct ManufacturerDataFilter {
|
|
11
|
-
let companyIdentifier: UInt16
|
|
12
|
-
let dataPrefix: Data?
|
|
13
|
-
let mask: Data?
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
struct ServiceDataFilter {
|
|
17
|
-
let serviceUuid: CBUUID
|
|
18
|
-
let dataPrefix: Data?
|
|
19
|
-
let mask: Data?
|
|
20
|
-
}
|
|
21
|
-
|
|
22
10
|
@objc(BluetoothLe)
|
|
23
11
|
public class BluetoothLe: CAPPlugin {
|
|
24
12
|
typealias BleDevice = [String: Any]
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import CoreBluetooth
|
|
3
|
+
|
|
4
|
+
struct ManufacturerDataFilter {
|
|
5
|
+
let companyIdentifier: UInt16
|
|
6
|
+
let dataPrefix: Data?
|
|
7
|
+
let mask: Data?
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
struct ServiceDataFilter {
|
|
11
|
+
let serviceUuid: CBUUID
|
|
12
|
+
let dataPrefix: Data?
|
|
13
|
+
let mask: Data?
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class ScanFilterUtils {
|
|
17
|
+
|
|
18
|
+
static func passesManufacturerDataFilter(_ advertisementData: [String: Any], filters: [ManufacturerDataFilter]?) -> Bool {
|
|
19
|
+
guard let filters = filters, !filters.isEmpty else {
|
|
20
|
+
return true // No filters means everything passes
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
guard let manufacturerData = advertisementData[CBAdvertisementDataManufacturerDataKey] as? Data,
|
|
24
|
+
manufacturerData.count >= 2 else {
|
|
25
|
+
return false // If there's no valid manufacturer data, fail
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
let companyIdentifier = manufacturerData.prefix(2).withUnsafeBytes {
|
|
29
|
+
$0.load(as: UInt16.self).littleEndian // Manufacturer ID is little-endian
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
let payload = Data(manufacturerData.dropFirst(2))
|
|
33
|
+
|
|
34
|
+
for filter in filters {
|
|
35
|
+
if filter.companyIdentifier != companyIdentifier {
|
|
36
|
+
continue // Skip if company ID does not match
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if let dataPrefix = filter.dataPrefix {
|
|
40
|
+
if payload.count < dataPrefix.count {
|
|
41
|
+
continue // Payload too short, does not match
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if let mask = filter.mask {
|
|
45
|
+
// Validate that mask length matches dataPrefix length
|
|
46
|
+
if mask.count != dataPrefix.count {
|
|
47
|
+
continue // Skip this filter if mask length is invalid
|
|
48
|
+
}
|
|
49
|
+
var matches = true
|
|
50
|
+
for i in 0..<dataPrefix.count {
|
|
51
|
+
if (payload[i] & mask[i]) != (dataPrefix[i] & mask[i]) {
|
|
52
|
+
matches = false
|
|
53
|
+
break
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if matches {
|
|
57
|
+
return true
|
|
58
|
+
}
|
|
59
|
+
} else if payload.starts(with: dataPrefix) {
|
|
60
|
+
return true
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
return true // Company ID matched, and no dataPrefix required
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return false // If none matched, return false
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static func passesServiceDataFilter(_ advertisementData: [String: Any], filters: [ServiceDataFilter]?) -> Bool {
|
|
71
|
+
guard let filters = filters, !filters.isEmpty else {
|
|
72
|
+
return true // No filters means everything passes
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
guard let serviceDataDict = advertisementData[CBAdvertisementDataServiceDataKey] as? [CBUUID: Data] else {
|
|
76
|
+
return false // If there's no service data, fail
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
for filter in filters {
|
|
80
|
+
guard let serviceData = serviceDataDict[filter.serviceUuid] else {
|
|
81
|
+
continue // Skip if service UUID does not match
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if let dataPrefix = filter.dataPrefix {
|
|
85
|
+
if serviceData.count < dataPrefix.count {
|
|
86
|
+
continue // Service data too short, does not match
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if let mask = filter.mask {
|
|
90
|
+
// Validate that mask length matches dataPrefix length
|
|
91
|
+
if mask.count != dataPrefix.count {
|
|
92
|
+
continue // Skip this filter if mask length is invalid
|
|
93
|
+
}
|
|
94
|
+
var matches = true
|
|
95
|
+
for i in 0..<dataPrefix.count {
|
|
96
|
+
if (serviceData[i] & mask[i]) != (dataPrefix[i] & mask[i]) {
|
|
97
|
+
matches = false
|
|
98
|
+
break
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if matches {
|
|
102
|
+
return true
|
|
103
|
+
}
|
|
104
|
+
} else if serviceData.starts(with: dataPrefix) {
|
|
105
|
+
return true
|
|
106
|
+
}
|
|
107
|
+
} else {
|
|
108
|
+
return true // Service UUID matched, and no dataPrefix required
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return false // If none matched, return false
|
|
113
|
+
}
|
|
114
|
+
}
|