@capacitor-community/bluetooth-le 6.0.1 → 6.0.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/README.md +7 -4
- package/android/src/main/java/com/capacitorjs/community/plugins/bluetoothle/Conversion.kt +21 -6
- package/dist/esm/conversion.d.ts +7 -1
- package/dist/esm/conversion.js +19 -7
- package/dist/esm/conversion.js.map +1 -1
- package/dist/plugin.cjs.js +19 -7
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +19 -7
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/Conversion.swift +29 -5
- package/ios/Plugin/Device.swift +1 -1
- package/ios/Plugin/DeviceManager.swift +2 -2
- package/ios/Plugin/Plugin.swift +20 -20
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -13,15 +13,16 @@
|
|
|
13
13
|
<a href="https://www.npmjs.com/package/@capacitor-community/bluetooth-le"><img src="https://img.shields.io/npm/dw/@capacitor-community/bluetooth-le?style=flat-square" /></a>
|
|
14
14
|
<a href="https://www.npmjs.com/package/@capacitor-community/bluetooth-le"><img src="https://img.shields.io/npm/v/@capacitor-community/bluetooth-le?style=flat-square" /></a>
|
|
15
15
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
16
|
-
<a href="#contributors-"><img src="https://img.shields.io/badge/all%20contributors-
|
|
16
|
+
<a href="#contributors-"><img src="https://img.shields.io/badge/all%20contributors-19-orange?style=flat-square" /></a>
|
|
17
17
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
18
18
|
</p>
|
|
19
19
|
|
|
20
20
|
## Maintainers
|
|
21
21
|
|
|
22
|
-
| Maintainer
|
|
23
|
-
|
|
|
24
|
-
| Patrick Wespi
|
|
22
|
+
| Maintainer | GitHub |
|
|
23
|
+
| -------------- | ----------------------------------------- |
|
|
24
|
+
| Patrick Wespi | [pwespi](https://github.com/pwespi) |
|
|
25
|
+
| Philip Peitsch | [peitschie](https://github.com/peitschie) |
|
|
25
26
|
|
|
26
27
|
## Versions
|
|
27
28
|
|
|
@@ -1112,6 +1113,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
1112
1113
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mchl18"><img src="https://avatars.githubusercontent.com/u/6136970?v=4?s=100" width="100px;" alt="mchl18"/><br /><sub><b>mchl18</b></sub></a><br /><a href="https://github.com/capacitor-community/bluetooth-le/commits?author=mchl18" title="Documentation">📖</a></td>
|
|
1113
1114
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/OpenSrcerer"><img src="https://avatars.githubusercontent.com/u/46500918?v=4?s=100" width="100px;" alt="Daniel Stefani"/><br /><sub><b>Daniel Stefani</b></sub></a><br /><a href="https://github.com/capacitor-community/bluetooth-le/commits?author=OpenSrcerer" title="Code">💻</a></td>
|
|
1114
1115
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lhd-biosency"><img src="https://avatars.githubusercontent.com/u/71714070?v=4?s=100" width="100px;" alt="Laurent"/><br /><sub><b>Laurent</b></sub></a><br /><a href="https://github.com/capacitor-community/bluetooth-le/commits?author=lhd-biosency" title="Code">💻</a></td>
|
|
1116
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/peitschie"><img src="https://avatars.githubusercontent.com/u/1052079?v=4?s=100" width="100px;" alt="Philip Peitsch"/><br /><sub><b>Philip Peitsch</b></sub></a><br /><a href="https://github.com/capacitor-community/bluetooth-le/commits?author=peitschie" title="Code">💻</a> <a href="#question-peitschie" title="Answering Questions">💬</a></td>
|
|
1117
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/NaterGator"><img src="https://avatars.githubusercontent.com/u/2575?v=4?s=100" width="100px;" alt="Nate Weibley"/><br /><sub><b>Nate Weibley</b></sub></a><br /><a href="https://github.com/capacitor-community/bluetooth-le/commits?author=NaterGator" title="Code">💻</a></td>
|
|
1115
1118
|
</tr>
|
|
1116
1119
|
</tbody>
|
|
1117
1120
|
</table>
|
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
package com.capacitorjs.community.plugins.bluetoothle
|
|
2
2
|
|
|
3
|
+
// Create a LUT for high performance ByteArray conversion
|
|
4
|
+
val HEX_LOOKUP_TABLE = IntArray(256) {
|
|
5
|
+
val hexChars = "0123456789ABCDEF"
|
|
6
|
+
val h: Int = (hexChars[(it shr 4)].code shl 8)
|
|
7
|
+
val l: Int = hexChars[(it and 0x0F)].code
|
|
8
|
+
(h or l)
|
|
9
|
+
}
|
|
3
10
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
// Custom implementation of ByteArray.toHexString until stdlib stabilizes
|
|
12
|
+
private fun ByteArray.toHexString(): String {
|
|
13
|
+
val result = CharArray(this.size * 2);
|
|
14
|
+
var i = 0;
|
|
15
|
+
for (byte in this) {
|
|
16
|
+
val hx = HEX_LOOKUP_TABLE[byte.toInt() and 0xFF]
|
|
17
|
+
result[i] = (hx shr 8).toChar()
|
|
18
|
+
result[i+1] = (hx and 0xFF).toChar()
|
|
19
|
+
i+=2
|
|
9
20
|
}
|
|
10
|
-
return
|
|
21
|
+
return result.concatToString()
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
fun bytesToString(bytes: ByteArray): String {
|
|
25
|
+
return bytes.toHexString()
|
|
11
26
|
}
|
|
12
27
|
|
|
13
28
|
fun stringToBytes(value: String): ByteArray {
|
package/dist/esm/conversion.d.ts
CHANGED
|
@@ -20,7 +20,13 @@ export declare function dataViewToText(value: DataView): string;
|
|
|
20
20
|
* @return string, e.g. '0000180d-0000-1000-8000-00805f9b34fb'
|
|
21
21
|
*/
|
|
22
22
|
export declare function numberToUUID(value: number): string;
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Convert a string of hex into a DataView of raw bytes.
|
|
25
|
+
* Note: characters other than [0-9a-fA-F] are ignored
|
|
26
|
+
* @param hex string of values, e.g. "00 01 02" or "000102"
|
|
27
|
+
* @return DataView of raw bytes
|
|
28
|
+
*/
|
|
29
|
+
export declare function hexStringToDataView(hex: string): DataView;
|
|
24
30
|
export declare function dataViewToHexString(value: DataView): string;
|
|
25
31
|
export declare function webUUIDToString(uuid: string | number): string;
|
|
26
32
|
export declare function mapToObject<V>(map?: Map<string | number, V>): {
|
package/dist/esm/conversion.js
CHANGED
|
@@ -30,13 +30,25 @@ export function dataViewToText(value) {
|
|
|
30
30
|
export function numberToUUID(value) {
|
|
31
31
|
return `0000${value.toString(16).padStart(4, '0')}-0000-1000-8000-00805f9b34fb`;
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Convert a string of hex into a DataView of raw bytes.
|
|
35
|
+
* Note: characters other than [0-9a-fA-F] are ignored
|
|
36
|
+
* @param hex string of values, e.g. "00 01 02" or "000102"
|
|
37
|
+
* @return DataView of raw bytes
|
|
38
|
+
*/
|
|
39
|
+
export function hexStringToDataView(hex) {
|
|
40
|
+
const bin = [];
|
|
41
|
+
let i, c, isEmpty = 1, buffer = 0;
|
|
42
|
+
for (i = 0; i < hex.length; i++) {
|
|
43
|
+
c = hex.charCodeAt(i);
|
|
44
|
+
if ((c > 47 && c < 58) || (c > 64 && c < 71) || (c > 96 && c < 103)) {
|
|
45
|
+
buffer = (buffer << 4) ^ ((c > 64 ? c + 9 : c) & 15);
|
|
46
|
+
if ((isEmpty ^= 1)) {
|
|
47
|
+
bin.push(buffer & 0xff);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return numbersToDataView(bin);
|
|
40
52
|
}
|
|
41
53
|
export function dataViewToHexString(value) {
|
|
42
54
|
return dataViewToNumbers(value)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversion.js","sourceRoot":"","sources":["../../src/conversion.ts"],"names":[],"mappings":"AAA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ACH,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/**\n * Convert an array of numbers into a DataView.\n */\nexport function numbersToDataView(value: number[]): DataView {\n return new DataView(Uint8Array.from(value).buffer);\n}\n\n/**\n * Convert a DataView into an array of numbers.\n */\nexport function dataViewToNumbers(value: DataView): number[] {\n return Array.from(new Uint8Array(value.buffer, value.byteOffset, value.byteLength));\n}\n\n/**\n * Convert a string into a DataView.\n */\nexport function textToDataView(value: string): DataView {\n return numbersToDataView(value.split('').map((s) => s.charCodeAt(0)));\n}\n\n/**\n * Convert a DataView into a string.\n */\nexport function dataViewToText(value: DataView): string {\n return String.fromCharCode(...dataViewToNumbers(value));\n}\n\n/**\n * Convert a 16 bit UUID into a 128 bit UUID string\n * @param value number, e.g. 0x180d\n * @return string, e.g. '0000180d-0000-1000-8000-00805f9b34fb'\n */\nexport function numberToUUID(value: number): string {\n return `0000${value.toString(16).padStart(4, '0')}-0000-1000-8000-00805f9b34fb`;\n}\n\n/**\n * Convert a string of hex into a DataView of raw bytes.\n * Note: characters other than [0-9a-fA-F] are ignored\n * @param hex string of values, e.g. \"00 01 02\" or \"000102\"\n * @return DataView of raw bytes\n */\nexport function hexStringToDataView(hex: string): DataView {\n const bin = [];\n let i,\n c,\n isEmpty = 1,\n buffer = 0;\n for (i = 0; i < hex.length; i++) {\n c = hex.charCodeAt(i);\n if ((c > 47 && c < 58) || (c > 64 && c < 71) || (c > 96 && c < 103)) {\n buffer = (buffer << 4) ^ ((c > 64 ? c + 9 : c) & 15);\n if ((isEmpty ^= 1)) {\n bin.push(buffer & 0xff);\n }\n }\n }\n return numbersToDataView(bin);\n}\n\nexport function dataViewToHexString(value: DataView): string {\n return dataViewToNumbers(value)\n .map((n) => {\n let s = n.toString(16);\n if (s.length == 1) {\n s = '0' + s;\n }\n return s;\n })\n .join(' ');\n}\n\nexport function webUUIDToString(uuid: string | number): string {\n if (typeof uuid === 'string') {\n return uuid;\n } else if (typeof uuid === 'number') {\n return numberToUUID(uuid);\n } else {\n throw new Error('Invalid UUID');\n }\n}\n\nexport function mapToObject<V>(map?: Map<string | number, V>): { [key: string]: V } | undefined {\n const obj: { [key: string]: V } = {};\n if (!map) {\n return undefined;\n }\n map.forEach((value, key) => {\n obj[key.toString()] = value;\n });\n return obj;\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -79,13 +79,25 @@ function dataViewToText(value) {
|
|
|
79
79
|
function numberToUUID(value) {
|
|
80
80
|
return `0000${value.toString(16).padStart(4, '0')}-0000-1000-8000-00805f9b34fb`;
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
/**
|
|
83
|
+
* Convert a string of hex into a DataView of raw bytes.
|
|
84
|
+
* Note: characters other than [0-9a-fA-F] are ignored
|
|
85
|
+
* @param hex string of values, e.g. "00 01 02" or "000102"
|
|
86
|
+
* @return DataView of raw bytes
|
|
87
|
+
*/
|
|
88
|
+
function hexStringToDataView(hex) {
|
|
89
|
+
const bin = [];
|
|
90
|
+
let i, c, isEmpty = 1, buffer = 0;
|
|
91
|
+
for (i = 0; i < hex.length; i++) {
|
|
92
|
+
c = hex.charCodeAt(i);
|
|
93
|
+
if ((c > 47 && c < 58) || (c > 64 && c < 71) || (c > 96 && c < 103)) {
|
|
94
|
+
buffer = (buffer << 4) ^ ((c > 64 ? c + 9 : c) & 15);
|
|
95
|
+
if ((isEmpty ^= 1)) {
|
|
96
|
+
bin.push(buffer & 0xff);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return numbersToDataView(bin);
|
|
89
101
|
}
|
|
90
102
|
function dataViewToHexString(value) {
|
|
91
103
|
return dataViewToNumbers(value)
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.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":["/**\n * Android scan mode\n */\nexport var ScanMode;\n(function (ScanMode) {\n /**\n * Perform Bluetooth LE scan in low power mode. This mode is enforced if the scanning application is not in foreground.\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_POWER\n */\n ScanMode[ScanMode[\"SCAN_MODE_LOW_POWER\"] = 0] = \"SCAN_MODE_LOW_POWER\";\n /**\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.\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_BALANCED\n */\n ScanMode[ScanMode[\"SCAN_MODE_BALANCED\"] = 1] = \"SCAN_MODE_BALANCED\";\n /**\n * Scan using highest duty cycle. It's recommended to only use this mode when the application is running in the foreground.\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_LATENCY\n */\n ScanMode[ScanMode[\"SCAN_MODE_LOW_LATENCY\"] = 2] = \"SCAN_MODE_LOW_LATENCY\";\n})(ScanMode || (ScanMode = {}));\n/**\n * Android connection priority used in `requestConnectionPriority`\n */\nexport var ConnectionPriority;\n(function (ConnectionPriority) {\n /**\n * Use the connection parameters recommended by the Bluetooth SIG. This is the default value if no connection parameter update is requested.\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_BALANCED\n */\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_BALANCED\"] = 0] = \"CONNECTION_PRIORITY_BALANCED\";\n /**\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.\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_HIGH\n */\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_HIGH\"] = 1] = \"CONNECTION_PRIORITY_HIGH\";\n /**\n * Request low power, reduced data rate connection parameters.\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_LOW_POWER\n */\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_LOW_POWER\"] = 2] = \"CONNECTION_PRIORITY_LOW_POWER\";\n})(ConnectionPriority || (ConnectionPriority = {}));\n//# sourceMappingURL=definitions.js.map","/**\n * Convert an array of numbers into a DataView.\n */\nexport function numbersToDataView(value) {\n return new DataView(Uint8Array.from(value).buffer);\n}\n/**\n * Convert a DataView into an array of numbers.\n */\nexport function dataViewToNumbers(value) {\n return Array.from(new Uint8Array(value.buffer, value.byteOffset, value.byteLength));\n}\n/**\n * Convert a string into a DataView.\n */\nexport function textToDataView(value) {\n return numbersToDataView(value.split('').map((s) => s.charCodeAt(0)));\n}\n/**\n * Convert a DataView into a string.\n */\nexport function dataViewToText(value) {\n return String.fromCharCode(...dataViewToNumbers(value));\n}\n/**\n * Convert a 16 bit UUID into a 128 bit UUID string\n * @param value number, e.g. 0x180d\n * @return string, e.g. '0000180d-0000-1000-8000-00805f9b34fb'\n */\nexport function numberToUUID(value) {\n return `0000${value.toString(16).padStart(4, '0')}-0000-1000-8000-00805f9b34fb`;\n}\nexport function hexStringToDataView(value) {\n const numbers = value\n .trim()\n .split(' ')\n .filter((e) => e !== '')\n .map((s) => parseInt(s, 16));\n return numbersToDataView(numbers);\n}\nexport function dataViewToHexString(value) {\n return dataViewToNumbers(value)\n .map((n) => {\n let s = n.toString(16);\n if (s.length == 1) {\n s = '0' + s;\n }\n return s;\n })\n .join(' ');\n}\nexport function webUUIDToString(uuid) {\n if (typeof uuid === 'string') {\n return uuid;\n }\n else if (typeof uuid === 'number') {\n return numberToUUID(uuid);\n }\n else {\n throw new Error('Invalid UUID');\n }\n}\nexport function mapToObject(map) {\n const obj = {};\n if (!map) {\n return undefined;\n }\n map.forEach((value, key) => {\n obj[key.toString()] = value;\n });\n return obj;\n}\n//# sourceMappingURL=conversion.js.map","import { registerPlugin } from '@capacitor/core';\nexport const BluetoothLe = registerPlugin('BluetoothLe', {\n web: () => import('./web').then((m) => new m.BluetoothLeWeb()),\n});\n//# sourceMappingURL=plugin.js.map","const makeQueue = () => {\n let currentTask = Promise.resolve();\n // create a new promise so that errors can be bubbled\n // up to the caller without being caught by the queue\n return (fn) => new Promise((resolve, reject) => {\n currentTask = currentTask\n .then(() => fn())\n .then(resolve)\n .catch(reject);\n });\n};\nexport function getQueue(enabled) {\n if (enabled) {\n return makeQueue();\n }\n return (fn) => fn();\n}\n//# sourceMappingURL=queue.js.map","export function parseUUID(uuid) {\n if (typeof uuid !== 'string') {\n throw new Error(`Invalid UUID type ${typeof uuid}. Expected string.`);\n }\n uuid = uuid.toLowerCase();\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;\n if (!is128BitUuid) {\n throw new Error(`Invalid UUID format ${uuid}. Expected 128 bit string (e.g. \"0000180d-0000-1000-8000-00805f9b34fb\").`);\n }\n return uuid;\n}\n//# sourceMappingURL=validators.js.map","import { Capacitor } from '@capacitor/core';\nimport { dataViewToHexString, hexStringToDataView } from './conversion';\nimport { BluetoothLe } from './plugin';\nimport { getQueue } from './queue';\nimport { parseUUID } from './validators';\nclass BleClientClass {\n constructor() {\n this.scanListener = null;\n this.eventListeners = new Map();\n this.queue = getQueue(true);\n }\n enableQueue() {\n this.queue = getQueue(true);\n }\n disableQueue() {\n this.queue = getQueue(false);\n }\n async initialize(options) {\n await this.queue(async () => {\n await BluetoothLe.initialize(options);\n });\n }\n async isEnabled() {\n const enabled = await this.queue(async () => {\n const result = await BluetoothLe.isEnabled();\n return result.value;\n });\n return enabled;\n }\n async requestEnable() {\n await this.queue(async () => {\n await BluetoothLe.requestEnable();\n });\n }\n async enable() {\n await this.queue(async () => {\n await BluetoothLe.enable();\n });\n }\n async disable() {\n await this.queue(async () => {\n await BluetoothLe.disable();\n });\n }\n async startEnabledNotifications(callback) {\n await this.queue(async () => {\n var _a;\n const key = `onEnabledChanged`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const listener = await BluetoothLe.addListener(key, (result) => {\n callback(result.value);\n });\n this.eventListeners.set(key, listener);\n await BluetoothLe.startEnabledNotifications();\n });\n }\n async stopEnabledNotifications() {\n await this.queue(async () => {\n var _a;\n const key = `onEnabledChanged`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n this.eventListeners.delete(key);\n await BluetoothLe.stopEnabledNotifications();\n });\n }\n async isLocationEnabled() {\n const enabled = await this.queue(async () => {\n const result = await BluetoothLe.isLocationEnabled();\n return result.value;\n });\n return enabled;\n }\n async openLocationSettings() {\n await this.queue(async () => {\n await BluetoothLe.openLocationSettings();\n });\n }\n async openBluetoothSettings() {\n await this.queue(async () => {\n await BluetoothLe.openBluetoothSettings();\n });\n }\n async openAppSettings() {\n await this.queue(async () => {\n await BluetoothLe.openAppSettings();\n });\n }\n async setDisplayStrings(displayStrings) {\n await this.queue(async () => {\n await BluetoothLe.setDisplayStrings(displayStrings);\n });\n }\n async requestDevice(options) {\n options = options ? this.validateRequestBleDeviceOptions(options) : undefined;\n const result = await this.queue(async () => {\n const device = await BluetoothLe.requestDevice(options);\n return device;\n });\n return result;\n }\n async requestLEScan(options, callback) {\n options = this.validateRequestBleDeviceOptions(options);\n await this.queue(async () => {\n var _a;\n await ((_a = this.scanListener) === null || _a === void 0 ? void 0 : _a.remove());\n this.scanListener = await BluetoothLe.addListener('onScanResult', (resultInternal) => {\n const result = Object.assign(Object.assign({}, resultInternal), { manufacturerData: this.convertObject(resultInternal.manufacturerData), serviceData: this.convertObject(resultInternal.serviceData), rawAdvertisement: resultInternal.rawAdvertisement\n ? this.convertValue(resultInternal.rawAdvertisement)\n : undefined });\n callback(result);\n });\n await BluetoothLe.requestLEScan(options);\n });\n }\n async stopLEScan() {\n await this.queue(async () => {\n var _a;\n await ((_a = this.scanListener) === null || _a === void 0 ? void 0 : _a.remove());\n this.scanListener = null;\n await BluetoothLe.stopLEScan();\n });\n }\n async getDevices(deviceIds) {\n if (!Array.isArray(deviceIds)) {\n throw new Error('deviceIds must be an array');\n }\n return this.queue(async () => {\n const result = await BluetoothLe.getDevices({ deviceIds });\n return result.devices;\n });\n }\n async getConnectedDevices(services) {\n if (!Array.isArray(services)) {\n throw new Error('services must be an array');\n }\n services = services.map(parseUUID);\n return this.queue(async () => {\n const result = await BluetoothLe.getConnectedDevices({ services });\n return result.devices;\n });\n }\n async connect(deviceId, onDisconnect, options) {\n await this.queue(async () => {\n var _a;\n if (onDisconnect) {\n const key = `disconnected|${deviceId}`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const listener = await BluetoothLe.addListener(key, () => {\n onDisconnect(deviceId);\n });\n this.eventListeners.set(key, listener);\n }\n await BluetoothLe.connect(Object.assign({ deviceId }, options));\n });\n }\n async createBond(deviceId, options) {\n await this.queue(async () => {\n await BluetoothLe.createBond(Object.assign({ deviceId }, options));\n });\n }\n async isBonded(deviceId) {\n const isBonded = await this.queue(async () => {\n const result = await BluetoothLe.isBonded({ deviceId });\n return result.value;\n });\n return isBonded;\n }\n async disconnect(deviceId) {\n await this.queue(async () => {\n await BluetoothLe.disconnect({ deviceId });\n });\n }\n async getServices(deviceId) {\n const services = await this.queue(async () => {\n const result = await BluetoothLe.getServices({ deviceId });\n return result.services;\n });\n return services;\n }\n async discoverServices(deviceId) {\n await this.queue(async () => {\n await BluetoothLe.discoverServices({ deviceId });\n });\n }\n async getMtu(deviceId) {\n const value = await this.queue(async () => {\n const result = await BluetoothLe.getMtu({ deviceId });\n return result.value;\n });\n return value;\n }\n async requestConnectionPriority(deviceId, connectionPriority) {\n await this.queue(async () => {\n await BluetoothLe.requestConnectionPriority({ deviceId, connectionPriority });\n });\n }\n async readRssi(deviceId) {\n const value = await this.queue(async () => {\n const result = await BluetoothLe.readRssi({ deviceId });\n return parseFloat(result.value);\n });\n return value;\n }\n async read(deviceId, service, characteristic, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n const value = await this.queue(async () => {\n const result = await BluetoothLe.read(Object.assign({ deviceId,\n service,\n characteristic }, options));\n return this.convertValue(result.value);\n });\n return value;\n }\n async write(deviceId, service, characteristic, value, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n return this.queue(async () => {\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\n throw new Error('Invalid data.');\n }\n let writeValue = value;\n if (Capacitor.getPlatform() !== 'web') {\n // on native we can only write strings\n writeValue = dataViewToHexString(value);\n }\n await BluetoothLe.write(Object.assign({ deviceId,\n service,\n characteristic, value: writeValue }, options));\n });\n }\n async writeWithoutResponse(deviceId, service, characteristic, value, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n await this.queue(async () => {\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\n throw new Error('Invalid data.');\n }\n let writeValue = value;\n if (Capacitor.getPlatform() !== 'web') {\n // on native we can only write strings\n writeValue = dataViewToHexString(value);\n }\n await BluetoothLe.writeWithoutResponse(Object.assign({ deviceId,\n service,\n characteristic, value: writeValue }, options));\n });\n }\n async readDescriptor(deviceId, service, characteristic, descriptor, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n descriptor = parseUUID(descriptor);\n const value = await this.queue(async () => {\n const result = await BluetoothLe.readDescriptor(Object.assign({ deviceId,\n service,\n characteristic,\n descriptor }, options));\n return this.convertValue(result.value);\n });\n return value;\n }\n async writeDescriptor(deviceId, service, characteristic, descriptor, value, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n descriptor = parseUUID(descriptor);\n return this.queue(async () => {\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\n throw new Error('Invalid data.');\n }\n let writeValue = value;\n if (Capacitor.getPlatform() !== 'web') {\n // on native we can only write strings\n writeValue = dataViewToHexString(value);\n }\n await BluetoothLe.writeDescriptor(Object.assign({ deviceId,\n service,\n characteristic,\n descriptor, value: writeValue }, options));\n });\n }\n async startNotifications(deviceId, service, characteristic, callback) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n await this.queue(async () => {\n var _a;\n const key = `notification|${deviceId}|${service}|${characteristic}`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const listener = await BluetoothLe.addListener(key, (event) => {\n callback(this.convertValue(event === null || event === void 0 ? void 0 : event.value));\n });\n this.eventListeners.set(key, listener);\n await BluetoothLe.startNotifications({\n deviceId,\n service,\n characteristic,\n });\n });\n }\n async stopNotifications(deviceId, service, characteristic) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n await this.queue(async () => {\n var _a;\n const key = `notification|${deviceId}|${service}|${characteristic}`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n this.eventListeners.delete(key);\n await BluetoothLe.stopNotifications({\n deviceId,\n service,\n characteristic,\n });\n });\n }\n validateRequestBleDeviceOptions(options) {\n if (options.services) {\n options.services = options.services.map(parseUUID);\n }\n if (options.optionalServices) {\n options.optionalServices = options.optionalServices.map(parseUUID);\n }\n return options;\n }\n convertValue(value) {\n if (typeof value === 'string') {\n return hexStringToDataView(value);\n }\n else if (value === undefined) {\n return new DataView(new ArrayBuffer(0));\n }\n return value;\n }\n convertObject(obj) {\n if (obj === undefined) {\n return undefined;\n }\n const result = {};\n for (const key of Object.keys(obj)) {\n result[key] = this.convertValue(obj[key]);\n }\n return result;\n }\n}\nexport const BleClient = new BleClientClass();\n//# sourceMappingURL=bleClient.js.map","export async function runWithTimeout(promise, time, exception) {\n let timer;\n return Promise.race([\n promise,\n new Promise((_, reject) => {\n timer = setTimeout(() => reject(exception), time);\n }),\n ]).finally(() => clearTimeout(timer));\n}\n//# sourceMappingURL=timeout.js.map","import { WebPlugin } from '@capacitor/core';\nimport { hexStringToDataView, mapToObject, webUUIDToString } from './conversion';\nimport { runWithTimeout } from './timeout';\nexport class BluetoothLeWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.deviceMap = new Map();\n this.discoveredDevices = new Map();\n this.scan = null;\n this.DEFAULT_CONNECTION_TIMEOUT = 10000;\n this.onAdvertisementReceivedCallback = this.onAdvertisementReceived.bind(this);\n this.onDisconnectedCallback = this.onDisconnected.bind(this);\n this.onCharacteristicValueChangedCallback = this.onCharacteristicValueChanged.bind(this);\n }\n async initialize() {\n if (typeof navigator === 'undefined' || !navigator.bluetooth) {\n throw this.unavailable('Web Bluetooth API not available in this browser.');\n }\n const isAvailable = await navigator.bluetooth.getAvailability();\n if (!isAvailable) {\n throw this.unavailable('No Bluetooth radio available.');\n }\n }\n async isEnabled() {\n // not available on web\n return { value: true };\n }\n async requestEnable() {\n throw this.unavailable('requestEnable is not available on web.');\n }\n async enable() {\n throw this.unavailable('enable is not available on web.');\n }\n async disable() {\n throw this.unavailable('disable is not available on web.');\n }\n async startEnabledNotifications() {\n // not available on web\n }\n async stopEnabledNotifications() {\n // not available on web\n }\n async isLocationEnabled() {\n throw this.unavailable('isLocationEnabled is not available on web.');\n }\n async openLocationSettings() {\n throw this.unavailable('openLocationSettings is not available on web.');\n }\n async openBluetoothSettings() {\n throw this.unavailable('openBluetoothSettings is not available on web.');\n }\n async openAppSettings() {\n throw this.unavailable('openAppSettings is not available on web.');\n }\n async setDisplayStrings() {\n // not available on web\n }\n async requestDevice(options) {\n const filters = this.getFilters(options);\n const device = await navigator.bluetooth.requestDevice({\n filters: filters.length ? filters : undefined,\n optionalServices: options === null || options === void 0 ? void 0 : options.optionalServices,\n acceptAllDevices: filters.length === 0,\n });\n this.deviceMap.set(device.id, device);\n const bleDevice = this.getBleDevice(device);\n return bleDevice;\n }\n async requestLEScan(options) {\n this.requestBleDeviceOptions = options;\n const filters = this.getFilters(options);\n await this.stopLEScan();\n this.discoveredDevices = new Map();\n navigator.bluetooth.removeEventListener('advertisementreceived', this.onAdvertisementReceivedCallback);\n navigator.bluetooth.addEventListener('advertisementreceived', this.onAdvertisementReceivedCallback);\n this.scan = await navigator.bluetooth.requestLEScan({\n filters: filters.length ? filters : undefined,\n acceptAllAdvertisements: filters.length === 0,\n keepRepeatedDevices: options === null || options === void 0 ? void 0 : options.allowDuplicates,\n });\n }\n onAdvertisementReceived(event) {\n var _a, _b;\n const deviceId = event.device.id;\n this.deviceMap.set(deviceId, event.device);\n const isNew = !this.discoveredDevices.has(deviceId);\n if (isNew || ((_a = this.requestBleDeviceOptions) === null || _a === void 0 ? void 0 : _a.allowDuplicates)) {\n this.discoveredDevices.set(deviceId, true);\n const device = this.getBleDevice(event.device);\n const result = {\n device,\n localName: device.name,\n rssi: event.rssi,\n txPower: event.txPower,\n manufacturerData: mapToObject(event.manufacturerData),\n serviceData: mapToObject(event.serviceData),\n uuids: (_b = event.uuids) === null || _b === void 0 ? void 0 : _b.map(webUUIDToString),\n };\n this.notifyListeners('onScanResult', result);\n }\n }\n async stopLEScan() {\n var _a;\n if ((_a = this.scan) === null || _a === void 0 ? void 0 : _a.active) {\n this.scan.stop();\n }\n this.scan = null;\n }\n async getDevices(options) {\n const devices = await navigator.bluetooth.getDevices();\n const bleDevices = devices\n .filter((device) => options.deviceIds.includes(device.id))\n .map((device) => {\n this.deviceMap.set(device.id, device);\n const bleDevice = this.getBleDevice(device);\n return bleDevice;\n });\n return { devices: bleDevices };\n }\n async getConnectedDevices(_options) {\n const devices = await navigator.bluetooth.getDevices();\n const bleDevices = devices\n .filter((device) => {\n var _a;\n return (_a = device.gatt) === null || _a === void 0 ? void 0 : _a.connected;\n })\n .map((device) => {\n this.deviceMap.set(device.id, device);\n const bleDevice = this.getBleDevice(device);\n return bleDevice;\n });\n return { devices: bleDevices };\n }\n async connect(options) {\n var _a, _b;\n const device = this.getDeviceFromMap(options.deviceId);\n device.removeEventListener('gattserverdisconnected', this.onDisconnectedCallback);\n device.addEventListener('gattserverdisconnected', this.onDisconnectedCallback);\n const timeoutError = Symbol();\n if (device.gatt === undefined) {\n throw new Error('No gatt server available.');\n }\n try {\n const timeout = (_a = options.timeout) !== null && _a !== void 0 ? _a : this.DEFAULT_CONNECTION_TIMEOUT;\n await runWithTimeout(device.gatt.connect(), timeout, timeoutError);\n }\n catch (error) {\n // cancel pending connect call, does not work yet in chromium because of a bug:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=684073\n await ((_b = device.gatt) === null || _b === void 0 ? void 0 : _b.disconnect());\n if (error === timeoutError) {\n throw new Error('Connection timeout');\n }\n else {\n throw error;\n }\n }\n }\n onDisconnected(event) {\n const deviceId = event.target.id;\n const key = `disconnected|${deviceId}`;\n this.notifyListeners(key, null);\n }\n async createBond(_options) {\n throw this.unavailable('createBond is not available on web.');\n }\n async isBonded(_options) {\n throw this.unavailable('isBonded is not available on web.');\n }\n async disconnect(options) {\n var _a;\n (_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.disconnect();\n }\n async getServices(options) {\n var _a, _b;\n const services = (_b = (await ((_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.getPrimaryServices()))) !== null && _b !== void 0 ? _b : [];\n const bleServices = [];\n for (const service of services) {\n const characteristics = await service.getCharacteristics();\n const bleCharacteristics = [];\n for (const characteristic of characteristics) {\n bleCharacteristics.push({\n uuid: characteristic.uuid,\n properties: this.getProperties(characteristic),\n descriptors: await this.getDescriptors(characteristic),\n });\n }\n bleServices.push({ uuid: service.uuid, characteristics: bleCharacteristics });\n }\n return { services: bleServices };\n }\n async getDescriptors(characteristic) {\n try {\n const descriptors = await characteristic.getDescriptors();\n return descriptors.map((descriptor) => ({\n uuid: descriptor.uuid,\n }));\n }\n catch (_a) {\n return [];\n }\n }\n getProperties(characteristic) {\n return {\n broadcast: characteristic.properties.broadcast,\n read: characteristic.properties.read,\n writeWithoutResponse: characteristic.properties.writeWithoutResponse,\n write: characteristic.properties.write,\n notify: characteristic.properties.notify,\n indicate: characteristic.properties.indicate,\n authenticatedSignedWrites: characteristic.properties.authenticatedSignedWrites,\n reliableWrite: characteristic.properties.reliableWrite,\n writableAuxiliaries: characteristic.properties.writableAuxiliaries,\n };\n }\n async getCharacteristic(options) {\n var _a;\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));\n return service === null || service === void 0 ? void 0 : service.getCharacteristic(options === null || options === void 0 ? void 0 : options.characteristic);\n }\n async getDescriptor(options) {\n const characteristic = await this.getCharacteristic(options);\n return characteristic === null || characteristic === void 0 ? void 0 : characteristic.getDescriptor(options === null || options === void 0 ? void 0 : options.descriptor);\n }\n async discoverServices(_options) {\n throw this.unavailable('discoverServices is not available on web.');\n }\n async getMtu(_options) {\n throw this.unavailable('getMtu is not available on web.');\n }\n async requestConnectionPriority(_options) {\n throw this.unavailable('requestConnectionPriority is not available on web.');\n }\n async readRssi(_options) {\n throw this.unavailable('readRssi is not available on web.');\n }\n async read(options) {\n const characteristic = await this.getCharacteristic(options);\n const value = await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.readValue());\n return { value };\n }\n async write(options) {\n const characteristic = await this.getCharacteristic(options);\n let dataView;\n if (typeof options.value === 'string') {\n dataView = hexStringToDataView(options.value);\n }\n else {\n dataView = options.value;\n }\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.writeValueWithResponse(dataView));\n }\n async writeWithoutResponse(options) {\n const characteristic = await this.getCharacteristic(options);\n let dataView;\n if (typeof options.value === 'string') {\n dataView = hexStringToDataView(options.value);\n }\n else {\n dataView = options.value;\n }\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.writeValueWithoutResponse(dataView));\n }\n async readDescriptor(options) {\n const descriptor = await this.getDescriptor(options);\n const value = await (descriptor === null || descriptor === void 0 ? void 0 : descriptor.readValue());\n return { value };\n }\n async writeDescriptor(options) {\n const descriptor = await this.getDescriptor(options);\n let dataView;\n if (typeof options.value === 'string') {\n dataView = hexStringToDataView(options.value);\n }\n else {\n dataView = options.value;\n }\n await (descriptor === null || descriptor === void 0 ? void 0 : descriptor.writeValue(dataView));\n }\n async startNotifications(options) {\n const characteristic = await this.getCharacteristic(options);\n characteristic === null || characteristic === void 0 ? void 0 : characteristic.removeEventListener('characteristicvaluechanged', this.onCharacteristicValueChangedCallback);\n characteristic === null || characteristic === void 0 ? void 0 : characteristic.addEventListener('characteristicvaluechanged', this.onCharacteristicValueChangedCallback);\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.startNotifications());\n }\n onCharacteristicValueChanged(event) {\n var _a, _b;\n const characteristic = event.target;\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}`;\n this.notifyListeners(key, {\n value: characteristic.value,\n });\n }\n async stopNotifications(options) {\n const characteristic = await this.getCharacteristic(options);\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.stopNotifications());\n }\n getFilters(options) {\n var _a;\n const filters = [];\n for (const service of (_a = options === null || options === void 0 ? void 0 : options.services) !== null && _a !== void 0 ? _a : []) {\n filters.push({\n services: [service],\n name: options === null || options === void 0 ? void 0 : options.name,\n namePrefix: options === null || options === void 0 ? void 0 : options.namePrefix,\n });\n }\n if (((options === null || options === void 0 ? void 0 : options.name) || (options === null || options === void 0 ? void 0 : options.namePrefix)) && filters.length === 0) {\n filters.push({\n name: options.name,\n namePrefix: options.namePrefix,\n });\n }\n return filters;\n }\n getDeviceFromMap(deviceId) {\n const device = this.deviceMap.get(deviceId);\n if (device === undefined) {\n throw new Error('Device not found. Call \"requestDevice\", \"requestLEScan\" or \"getDevices\" first.');\n }\n return device;\n }\n getBleDevice(device) {\n var _a;\n const bleDevice = {\n deviceId: device.id,\n // use undefined instead of null if name is not available\n name: (_a = device.name) !== null && _a !== void 0 ? _a : undefined,\n };\n return bleDevice;\n }\n}\n//# sourceMapp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AS,EAAE;AAClC,YAAY,MAAM,IAAI,KAAK,CAAC,gFAAgF,CAAC,CAAC;AAC9G,SAAS;AACT,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK;AACL,IAAI,YAAY,CAAC,MAAM,EAAE;AACzB,QAAQ,IAAI,EAAE,CAAC;AACf,QAAQ,MAAM,SAAS,GAAG;AAC1B,YAAY,QAAQ,EAAE,MAAM,CAAC,EAAE;AAC/B;AACA,YAAY,IAAI,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,IAAI,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,SAAS;AAC/E,SAAS,CAAC;AACV,QAAQ,OAAO,SAAS,CAAC;AACzB,KAAK;AACL;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.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":["/**\n * Android scan mode\n */\nexport var ScanMode;\n(function (ScanMode) {\n /**\n * Perform Bluetooth LE scan in low power mode. This mode is enforced if the scanning application is not in foreground.\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_POWER\n */\n ScanMode[ScanMode[\"SCAN_MODE_LOW_POWER\"] = 0] = \"SCAN_MODE_LOW_POWER\";\n /**\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.\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_BALANCED\n */\n ScanMode[ScanMode[\"SCAN_MODE_BALANCED\"] = 1] = \"SCAN_MODE_BALANCED\";\n /**\n * Scan using highest duty cycle. It's recommended to only use this mode when the application is running in the foreground.\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_LATENCY\n */\n ScanMode[ScanMode[\"SCAN_MODE_LOW_LATENCY\"] = 2] = \"SCAN_MODE_LOW_LATENCY\";\n})(ScanMode || (ScanMode = {}));\n/**\n * Android connection priority used in `requestConnectionPriority`\n */\nexport var ConnectionPriority;\n(function (ConnectionPriority) {\n /**\n * Use the connection parameters recommended by the Bluetooth SIG. This is the default value if no connection parameter update is requested.\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_BALANCED\n */\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_BALANCED\"] = 0] = \"CONNECTION_PRIORITY_BALANCED\";\n /**\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.\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_HIGH\n */\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_HIGH\"] = 1] = \"CONNECTION_PRIORITY_HIGH\";\n /**\n * Request low power, reduced data rate connection parameters.\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_LOW_POWER\n */\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_LOW_POWER\"] = 2] = \"CONNECTION_PRIORITY_LOW_POWER\";\n})(ConnectionPriority || (ConnectionPriority = {}));\n//# sourceMappingURL=definitions.js.map","/**\n * Convert an array of numbers into a DataView.\n */\nexport function numbersToDataView(value) {\n return new DataView(Uint8Array.from(value).buffer);\n}\n/**\n * Convert a DataView into an array of numbers.\n */\nexport function dataViewToNumbers(value) {\n return Array.from(new Uint8Array(value.buffer, value.byteOffset, value.byteLength));\n}\n/**\n * Convert a string into a DataView.\n */\nexport function textToDataView(value) {\n return numbersToDataView(value.split('').map((s) => s.charCodeAt(0)));\n}\n/**\n * Convert a DataView into a string.\n */\nexport function dataViewToText(value) {\n return String.fromCharCode(...dataViewToNumbers(value));\n}\n/**\n * Convert a 16 bit UUID into a 128 bit UUID string\n * @param value number, e.g. 0x180d\n * @return string, e.g. '0000180d-0000-1000-8000-00805f9b34fb'\n */\nexport function numberToUUID(value) {\n return `0000${value.toString(16).padStart(4, '0')}-0000-1000-8000-00805f9b34fb`;\n}\n/**\n * Convert a string of hex into a DataView of raw bytes.\n * Note: characters other than [0-9a-fA-F] are ignored\n * @param hex string of values, e.g. \"00 01 02\" or \"000102\"\n * @return DataView of raw bytes\n */\nexport function hexStringToDataView(hex) {\n const bin = [];\n let i, c, isEmpty = 1, buffer = 0;\n for (i = 0; i < hex.length; i++) {\n c = hex.charCodeAt(i);\n if ((c > 47 && c < 58) || (c > 64 && c < 71) || (c > 96 && c < 103)) {\n buffer = (buffer << 4) ^ ((c > 64 ? c + 9 : c) & 15);\n if ((isEmpty ^= 1)) {\n bin.push(buffer & 0xff);\n }\n }\n }\n return numbersToDataView(bin);\n}\nexport function dataViewToHexString(value) {\n return dataViewToNumbers(value)\n .map((n) => {\n let s = n.toString(16);\n if (s.length == 1) {\n s = '0' + s;\n }\n return s;\n })\n .join(' ');\n}\nexport function webUUIDToString(uuid) {\n if (typeof uuid === 'string') {\n return uuid;\n }\n else if (typeof uuid === 'number') {\n return numberToUUID(uuid);\n }\n else {\n throw new Error('Invalid UUID');\n }\n}\nexport function mapToObject(map) {\n const obj = {};\n if (!map) {\n return undefined;\n }\n map.forEach((value, key) => {\n obj[key.toString()] = value;\n });\n return obj;\n}\n//# sourceMappingURL=conversion.js.map","import { registerPlugin } from '@capacitor/core';\nexport const BluetoothLe = registerPlugin('BluetoothLe', {\n web: () => import('./web').then((m) => new m.BluetoothLeWeb()),\n});\n//# sourceMappingURL=plugin.js.map","const makeQueue = () => {\n let currentTask = Promise.resolve();\n // create a new promise so that errors can be bubbled\n // up to the caller without being caught by the queue\n return (fn) => new Promise((resolve, reject) => {\n currentTask = currentTask\n .then(() => fn())\n .then(resolve)\n .catch(reject);\n });\n};\nexport function getQueue(enabled) {\n if (enabled) {\n return makeQueue();\n }\n return (fn) => fn();\n}\n//# sourceMappingURL=queue.js.map","export function parseUUID(uuid) {\n if (typeof uuid !== 'string') {\n throw new Error(`Invalid UUID type ${typeof uuid}. Expected string.`);\n }\n uuid = uuid.toLowerCase();\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;\n if (!is128BitUuid) {\n throw new Error(`Invalid UUID format ${uuid}. Expected 128 bit string (e.g. \"0000180d-0000-1000-8000-00805f9b34fb\").`);\n }\n return uuid;\n}\n//# sourceMappingURL=validators.js.map","import { Capacitor } from '@capacitor/core';\nimport { dataViewToHexString, hexStringToDataView } from './conversion';\nimport { BluetoothLe } from './plugin';\nimport { getQueue } from './queue';\nimport { parseUUID } from './validators';\nclass BleClientClass {\n constructor() {\n this.scanListener = null;\n this.eventListeners = new Map();\n this.queue = getQueue(true);\n }\n enableQueue() {\n this.queue = getQueue(true);\n }\n disableQueue() {\n this.queue = getQueue(false);\n }\n async initialize(options) {\n await this.queue(async () => {\n await BluetoothLe.initialize(options);\n });\n }\n async isEnabled() {\n const enabled = await this.queue(async () => {\n const result = await BluetoothLe.isEnabled();\n return result.value;\n });\n return enabled;\n }\n async requestEnable() {\n await this.queue(async () => {\n await BluetoothLe.requestEnable();\n });\n }\n async enable() {\n await this.queue(async () => {\n await BluetoothLe.enable();\n });\n }\n async disable() {\n await this.queue(async () => {\n await BluetoothLe.disable();\n });\n }\n async startEnabledNotifications(callback) {\n await this.queue(async () => {\n var _a;\n const key = `onEnabledChanged`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const listener = await BluetoothLe.addListener(key, (result) => {\n callback(result.value);\n });\n this.eventListeners.set(key, listener);\n await BluetoothLe.startEnabledNotifications();\n });\n }\n async stopEnabledNotifications() {\n await this.queue(async () => {\n var _a;\n const key = `onEnabledChanged`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n this.eventListeners.delete(key);\n await BluetoothLe.stopEnabledNotifications();\n });\n }\n async isLocationEnabled() {\n const enabled = await this.queue(async () => {\n const result = await BluetoothLe.isLocationEnabled();\n return result.value;\n });\n return enabled;\n }\n async openLocationSettings() {\n await this.queue(async () => {\n await BluetoothLe.openLocationSettings();\n });\n }\n async openBluetoothSettings() {\n await this.queue(async () => {\n await BluetoothLe.openBluetoothSettings();\n });\n }\n async openAppSettings() {\n await this.queue(async () => {\n await BluetoothLe.openAppSettings();\n });\n }\n async setDisplayStrings(displayStrings) {\n await this.queue(async () => {\n await BluetoothLe.setDisplayStrings(displayStrings);\n });\n }\n async requestDevice(options) {\n options = options ? this.validateRequestBleDeviceOptions(options) : undefined;\n const result = await this.queue(async () => {\n const device = await BluetoothLe.requestDevice(options);\n return device;\n });\n return result;\n }\n async requestLEScan(options, callback) {\n options = this.validateRequestBleDeviceOptions(options);\n await this.queue(async () => {\n var _a;\n await ((_a = this.scanListener) === null || _a === void 0 ? void 0 : _a.remove());\n this.scanListener = await BluetoothLe.addListener('onScanResult', (resultInternal) => {\n const result = Object.assign(Object.assign({}, resultInternal), { manufacturerData: this.convertObject(resultInternal.manufacturerData), serviceData: this.convertObject(resultInternal.serviceData), rawAdvertisement: resultInternal.rawAdvertisement\n ? this.convertValue(resultInternal.rawAdvertisement)\n : undefined });\n callback(result);\n });\n await BluetoothLe.requestLEScan(options);\n });\n }\n async stopLEScan() {\n await this.queue(async () => {\n var _a;\n await ((_a = this.scanListener) === null || _a === void 0 ? void 0 : _a.remove());\n this.scanListener = null;\n await BluetoothLe.stopLEScan();\n });\n }\n async getDevices(deviceIds) {\n if (!Array.isArray(deviceIds)) {\n throw new Error('deviceIds must be an array');\n }\n return this.queue(async () => {\n const result = await BluetoothLe.getDevices({ deviceIds });\n return result.devices;\n });\n }\n async getConnectedDevices(services) {\n if (!Array.isArray(services)) {\n throw new Error('services must be an array');\n }\n services = services.map(parseUUID);\n return this.queue(async () => {\n const result = await BluetoothLe.getConnectedDevices({ services });\n return result.devices;\n });\n }\n async connect(deviceId, onDisconnect, options) {\n await this.queue(async () => {\n var _a;\n if (onDisconnect) {\n const key = `disconnected|${deviceId}`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const listener = await BluetoothLe.addListener(key, () => {\n onDisconnect(deviceId);\n });\n this.eventListeners.set(key, listener);\n }\n await BluetoothLe.connect(Object.assign({ deviceId }, options));\n });\n }\n async createBond(deviceId, options) {\n await this.queue(async () => {\n await BluetoothLe.createBond(Object.assign({ deviceId }, options));\n });\n }\n async isBonded(deviceId) {\n const isBonded = await this.queue(async () => {\n const result = await BluetoothLe.isBonded({ deviceId });\n return result.value;\n });\n return isBonded;\n }\n async disconnect(deviceId) {\n await this.queue(async () => {\n await BluetoothLe.disconnect({ deviceId });\n });\n }\n async getServices(deviceId) {\n const services = await this.queue(async () => {\n const result = await BluetoothLe.getServices({ deviceId });\n return result.services;\n });\n return services;\n }\n async discoverServices(deviceId) {\n await this.queue(async () => {\n await BluetoothLe.discoverServices({ deviceId });\n });\n }\n async getMtu(deviceId) {\n const value = await this.queue(async () => {\n const result = await BluetoothLe.getMtu({ deviceId });\n return result.value;\n });\n return value;\n }\n async requestConnectionPriority(deviceId, connectionPriority) {\n await this.queue(async () => {\n await BluetoothLe.requestConnectionPriority({ deviceId, connectionPriority });\n });\n }\n async readRssi(deviceId) {\n const value = await this.queue(async () => {\n const result = await BluetoothLe.readRssi({ deviceId });\n return parseFloat(result.value);\n });\n return value;\n }\n async read(deviceId, service, characteristic, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n const value = await this.queue(async () => {\n const result = await BluetoothLe.read(Object.assign({ deviceId,\n service,\n characteristic }, options));\n return this.convertValue(result.value);\n });\n return value;\n }\n async write(deviceId, service, characteristic, value, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n return this.queue(async () => {\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\n throw new Error('Invalid data.');\n }\n let writeValue = value;\n if (Capacitor.getPlatform() !== 'web') {\n // on native we can only write strings\n writeValue = dataViewToHexString(value);\n }\n await BluetoothLe.write(Object.assign({ deviceId,\n service,\n characteristic, value: writeValue }, options));\n });\n }\n async writeWithoutResponse(deviceId, service, characteristic, value, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n await this.queue(async () => {\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\n throw new Error('Invalid data.');\n }\n let writeValue = value;\n if (Capacitor.getPlatform() !== 'web') {\n // on native we can only write strings\n writeValue = dataViewToHexString(value);\n }\n await BluetoothLe.writeWithoutResponse(Object.assign({ deviceId,\n service,\n characteristic, value: writeValue }, options));\n });\n }\n async readDescriptor(deviceId, service, characteristic, descriptor, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n descriptor = parseUUID(descriptor);\n const value = await this.queue(async () => {\n const result = await BluetoothLe.readDescriptor(Object.assign({ deviceId,\n service,\n characteristic,\n descriptor }, options));\n return this.convertValue(result.value);\n });\n return value;\n }\n async writeDescriptor(deviceId, service, characteristic, descriptor, value, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n descriptor = parseUUID(descriptor);\n return this.queue(async () => {\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\n throw new Error('Invalid data.');\n }\n let writeValue = value;\n if (Capacitor.getPlatform() !== 'web') {\n // on native we can only write strings\n writeValue = dataViewToHexString(value);\n }\n await BluetoothLe.writeDescriptor(Object.assign({ deviceId,\n service,\n characteristic,\n descriptor, value: writeValue }, options));\n });\n }\n async startNotifications(deviceId, service, characteristic, callback) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n await this.queue(async () => {\n var _a;\n const key = `notification|${deviceId}|${service}|${characteristic}`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const listener = await BluetoothLe.addListener(key, (event) => {\n callback(this.convertValue(event === null || event === void 0 ? void 0 : event.value));\n });\n this.eventListeners.set(key, listener);\n await BluetoothLe.startNotifications({\n deviceId,\n service,\n characteristic,\n });\n });\n }\n async stopNotifications(deviceId, service, characteristic) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n await this.queue(async () => {\n var _a;\n const key = `notification|${deviceId}|${service}|${characteristic}`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n this.eventListeners.delete(key);\n await BluetoothLe.stopNotifications({\n deviceId,\n service,\n characteristic,\n });\n });\n }\n validateRequestBleDeviceOptions(options) {\n if (options.services) {\n options.services = options.services.map(parseUUID);\n }\n if (options.optionalServices) {\n options.optionalServices = options.optionalServices.map(parseUUID);\n }\n return options;\n }\n convertValue(value) {\n if (typeof value === 'string') {\n return hexStringToDataView(value);\n }\n else if (value === undefined) {\n return new DataView(new ArrayBuffer(0));\n }\n return value;\n }\n convertObject(obj) {\n if (obj === undefined) {\n return undefined;\n }\n const result = {};\n for (const key of Object.keys(obj)) {\n result[key] = this.convertValue(obj[key]);\n }\n return result;\n }\n}\nexport const BleClient = new BleClientClass();\n//# sourceMappingURL=bleClient.js.map","export async function runWithTimeout(promise, time, exception) {\n let timer;\n return Promise.race([\n promise,\n new Promise((_, reject) => {\n timer = setTimeout(() => reject(exception), time);\n }),\n ]).finally(() => clearTimeout(timer));\n}\n//# sourceMappingURL=timeout.js.map","import { WebPlugin } from '@capacitor/core';\nimport { hexStringToDataView, mapToObject, webUUIDToString } from './conversion';\nimport { runWithTimeout } from './timeout';\nexport class BluetoothLeWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.deviceMap = new Map();\n this.discoveredDevices = new Map();\n this.scan = null;\n this.DEFAULT_CONNECTION_TIMEOUT = 10000;\n this.onAdvertisementReceivedCallback = this.onAdvertisementReceived.bind(this);\n this.onDisconnectedCallback = this.onDisconnected.bind(this);\n this.onCharacteristicValueChangedCallback = this.onCharacteristicValueChanged.bind(this);\n }\n async initialize() {\n if (typeof navigator === 'undefined' || !navigator.bluetooth) {\n throw this.unavailable('Web Bluetooth API not available in this browser.');\n }\n const isAvailable = await navigator.bluetooth.getAvailability();\n if (!isAvailable) {\n throw this.unavailable('No Bluetooth radio available.');\n }\n }\n async isEnabled() {\n // not available on web\n return { value: true };\n }\n async requestEnable() {\n throw this.unavailable('requestEnable is not available on web.');\n }\n async enable() {\n throw this.unavailable('enable is not available on web.');\n }\n async disable() {\n throw this.unavailable('disable is not available on web.');\n }\n async startEnabledNotifications() {\n // not available on web\n }\n async stopEnabledNotifications() {\n // not available on web\n }\n async isLocationEnabled() {\n throw this.unavailable('isLocationEnabled is not available on web.');\n }\n async openLocationSettings() {\n throw this.unavailable('openLocationSettings is not available on web.');\n }\n async openBluetoothSettings() {\n throw this.unavailable('openBluetoothSettings is not available on web.');\n }\n async openAppSettings() {\n throw this.unavailable('openAppSettings is not available on web.');\n }\n async setDisplayStrings() {\n // not available on web\n }\n async requestDevice(options) {\n const filters = this.getFilters(options);\n const device = await navigator.bluetooth.requestDevice({\n filters: filters.length ? filters : undefined,\n optionalServices: options === null || options === void 0 ? void 0 : options.optionalServices,\n acceptAllDevices: filters.length === 0,\n });\n this.deviceMap.set(device.id, device);\n const bleDevice = this.getBleDevice(device);\n return bleDevice;\n }\n async requestLEScan(options) {\n this.requestBleDeviceOptions = options;\n const filters = this.getFilters(options);\n await this.stopLEScan();\n this.discoveredDevices = new Map();\n navigator.bluetooth.removeEventListener('advertisementreceived', this.onAdvertisementReceivedCallback);\n navigator.bluetooth.addEventListener('advertisementreceived', this.onAdvertisementReceivedCallback);\n this.scan = await navigator.bluetooth.requestLEScan({\n filters: filters.length ? filters : undefined,\n acceptAllAdvertisements: filters.length === 0,\n keepRepeatedDevices: options === null || options === void 0 ? void 0 : options.allowDuplicates,\n });\n }\n onAdvertisementReceived(event) {\n var _a, _b;\n const deviceId = event.device.id;\n this.deviceMap.set(deviceId, event.device);\n const isNew = !this.discoveredDevices.has(deviceId);\n if (isNew || ((_a = this.requestBleDeviceOptions) === null || _a === void 0 ? void 0 : _a.allowDuplicates)) {\n this.discoveredDevices.set(deviceId, true);\n const device = this.getBleDevice(event.device);\n const result = {\n device,\n localName: device.name,\n rssi: event.rssi,\n txPower: event.txPower,\n manufacturerData: mapToObject(event.manufacturerData),\n serviceData: mapToObject(event.serviceData),\n uuids: (_b = event.uuids) === null || _b === void 0 ? void 0 : _b.map(webUUIDToString),\n };\n this.notifyListeners('onScanResult', result);\n }\n }\n async stopLEScan() {\n var _a;\n if ((_a = this.scan) === null || _a === void 0 ? void 0 : _a.active) {\n this.scan.stop();\n }\n this.scan = null;\n }\n async getDevices(options) {\n const devices = await navigator.bluetooth.getDevices();\n const bleDevices = devices\n .filter((device) => options.deviceIds.includes(device.id))\n .map((device) => {\n this.deviceMap.set(device.id, device);\n const bleDevice = this.getBleDevice(device);\n return bleDevice;\n });\n return { devices: bleDevices };\n }\n async getConnectedDevices(_options) {\n const devices = await navigator.bluetooth.getDevices();\n const bleDevices = devices\n .filter((device) => {\n var _a;\n return (_a = device.gatt) === null || _a === void 0 ? void 0 : _a.connected;\n })\n .map((device) => {\n this.deviceMap.set(device.id, device);\n const bleDevice = this.getBleDevice(device);\n return bleDevice;\n });\n return { devices: bleDevices };\n }\n async connect(options) {\n var _a, _b;\n const device = this.getDeviceFromMap(options.deviceId);\n device.removeEventListener('gattserverdisconnected', this.onDisconnectedCallback);\n device.addEventListener('gattserverdisconnected', this.onDisconnectedCallback);\n const timeoutError = Symbol();\n if (device.gatt === undefined) {\n throw new Error('No gatt server available.');\n }\n try {\n const timeout = (_a = options.timeout) !== null && _a !== void 0 ? _a : this.DEFAULT_CONNECTION_TIMEOUT;\n await runWithTimeout(device.gatt.connect(), timeout, timeoutError);\n }\n catch (error) {\n // cancel pending connect call, does not work yet in chromium because of a bug:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=684073\n await ((_b = device.gatt) === null || _b === void 0 ? void 0 : _b.disconnect());\n if (error === timeoutError) {\n throw new Error('Connection timeout');\n }\n else {\n throw error;\n }\n }\n }\n onDisconnected(event) {\n const deviceId = event.target.id;\n const key = `disconnected|${deviceId}`;\n this.notifyListeners(key, null);\n }\n async createBond(_options) {\n throw this.unavailable('createBond is not available on web.');\n }\n async isBonded(_options) {\n throw this.unavailable('isBonded is not available on web.');\n }\n async disconnect(options) {\n var _a;\n (_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.disconnect();\n }\n async getServices(options) {\n var _a, _b;\n const services = (_b = (await ((_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.getPrimaryServices()))) !== null && _b !== void 0 ? _b : [];\n const bleServices = [];\n for (const service of services) {\n const characteristics = await service.getCharacteristics();\n const bleCharacteristics = [];\n for (const characteristic of characteristics) {\n bleCharacteristics.push({\n uuid: characteristic.uuid,\n properties: this.getProperties(characteristic),\n descriptors: await this.getDescriptors(characteristic),\n });\n }\n bleServices.push({ uuid: service.uuid, characteristics: bleCharacteristics });\n }\n return { services: bleServices };\n }\n async getDescriptors(characteristic) {\n try {\n const descriptors = await characteristic.getDescriptors();\n return descriptors.map((descriptor) => ({\n uuid: descriptor.uuid,\n }));\n }\n catch (_a) {\n return [];\n }\n }\n getProperties(characteristic) {\n return {\n broadcast: characteristic.properties.broadcast,\n read: characteristic.properties.read,\n writeWithoutResponse: characteristic.properties.writeWithoutResponse,\n write: characteristic.properties.write,\n notify: characteristic.properties.notify,\n indicate: characteristic.properties.indicate,\n authenticatedSignedWrites: characteristic.properties.authenticatedSignedWrites,\n reliableWrite: characteristic.properties.reliableWrite,\n writableAuxiliaries: characteristic.properties.writableAuxiliaries,\n };\n }\n async getCharacteristic(options) {\n var _a;\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));\n return service === null || service === void 0 ? void 0 : service.getCharacteristic(options === null || options === void 0 ? void 0 : options.characteristic);\n }\n async getDescriptor(options) {\n const characteristic = await this.getCharacteristic(options);\n return characteristic === null || characteristic === void 0 ? void 0 : characteristic.getDescriptor(options === null || options === void 0 ? void 0 : options.descriptor);\n }\n async discoverServices(_options) {\n throw this.unavailable('discoverServices is not available on web.');\n }\n async getMtu(_options) {\n throw this.unavailable('getMtu is not available on web.');\n }\n async requestConnectionPriority(_options) {\n throw this.unavailable('requestConnectionPriority is not available on web.');\n }\n async readRssi(_options) {\n throw this.unavailable('readRssi is not available on web.');\n }\n async read(options) {\n const characteristic = await this.getCharacteristic(options);\n const value = await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.readValue());\n return { value };\n }\n async write(options) {\n const characteristic = await this.getCharacteristic(options);\n let dataView;\n if (typeof options.value === 'string') {\n dataView = hexStringToDataView(options.value);\n }\n else {\n dataView = options.value;\n }\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.writeValueWithResponse(dataView));\n }\n async writeWithoutResponse(options) {\n const characteristic = await this.getCharacteristic(options);\n let dataView;\n if (typeof options.value === 'string') {\n dataView = hexStringToDataView(options.value);\n }\n else {\n dataView = options.value;\n }\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.writeValueWithoutResponse(dataView));\n }\n async readDescriptor(options) {\n const descriptor = await this.getDescriptor(options);\n const value = await (descriptor === null || descriptor === void 0 ? void 0 : descriptor.readValue());\n return { value };\n }\n async writeDescriptor(options) {\n const descriptor = await this.getDescriptor(options);\n let dataView;\n if (typeof options.value === 'string') {\n dataView = hexStringToDataView(options.value);\n }\n else {\n dataView = options.value;\n }\n await (descriptor === null || descriptor === void 0 ? void 0 : descriptor.writeValue(dataView));\n }\n async startNotifications(options) {\n const characteristic = await this.getCharacteristic(options);\n characteristic === null || characteristic === void 0 ? void 0 : characteristic.removeEventListener('characteristicvaluechanged', this.onCharacteristicValueChangedCallback);\n characteristic === null || characteristic === void 0 ? void 0 : characteristic.addEventListener('characteristicvaluechanged', this.onCharacteristicValueChangedCallback);\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.startNotifications());\n }\n onCharacteristicValueChanged(event) {\n var _a, _b;\n const characteristic = event.target;\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}`;\n this.notifyListeners(key, {\n value: characteristic.value,\n });\n }\n async stopNotifications(options) {\n const characteristic = await this.getCharacteristic(options);\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.stopNotifications());\n }\n getFilters(options) {\n var _a;\n const filters = [];\n for (const service of (_a = options === null || options === void 0 ? void 0 : options.services) !== null && _a !== void 0 ? _a : []) {\n filters.push({\n services: [service],\n name: options === null || options === void 0 ? void 0 : options.name,\n namePrefix: options === null || options === void 0 ? void 0 : options.namePrefix,\n });\n }\n if (((options === null || options === void 0 ? void 0 : options.name) || (options === null || options === void 0 ? void 0 : options.namePrefix)) && filters.length === 0) {\n filters.push({\n name: options.name,\n namePrefix: options.namePrefix,\n });\n }\n return filters;\n }\n getDeviceFromMap(deviceId) {\n const device = this.deviceMap.get(deviceId);\n if (device === undefined) {\n throw new Error('Device not found. Call \"requestDevice\", \"requestLEScan\" or \"getDevices\" first.');\n }\n return device;\n }\n getBleDevice(device) {\n var _a;\n const bleDevice = {\n deviceId: device.id,\n // use undefined instead of null if name is not available\n name: (_a = device.name) !== null && _a !== void 0 ? _a : undefined,\n };\n return bleDevice;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ScanMode","ConnectionPriority","registerPlugin","Capacitor","WebPlugin"],"mappings":";;;;;;AAAA;AACA;AACA;AACWA,0BAAS;AACpB,CAAC,UAAU,QAAQ,EAAE;AACrB;AACA;AACA;AACA;AACA,IAAI,QAAQ,CAAC,QAAQ,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,qBAAqB,CAAC;AAC1E;AACA;AACA;AACA;AACA,IAAI,QAAQ,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,oBAAoB,CAAC;AACxE;AACA;AACA;AACA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ACL,IAAI,gBAAgB,CAAC,QAAQ,EAAE;AAC/B,QAAQ,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpD,QAAQ,IAAI,MAAM,KAAK,SAAS,EAAE;AAClC,YAAY,MAAM,IAAI,KAAK,CAAC,gFAAgF,CAAC,CAAC;AAC9G,SAAS;AACT,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK;AACL,IAAI,YAAY,CAAC,MAAM,EAAE;AACzB,QAAQ,IAAI,EAAE,CAAC;AACf,QAAQ,MAAM,SAAS,GAAG;AAC1B,YAAY,QAAQ,EAAE,MAAM,CAAC,EAAE;AAC/B;AACA,YAAY,IAAI,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,IAAI,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,EAAE,GAAG,SAAS;AAC/E,SAAS,CAAC;AACV,QAAQ,OAAO,SAAS,CAAC;AACzB,KAAK;AACL;;;;;;;;;;;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -76,13 +76,25 @@ var capacitorCommunityBluetoothLe = (function (exports, core) {
|
|
|
76
76
|
function numberToUUID(value) {
|
|
77
77
|
return `0000${value.toString(16).padStart(4, '0')}-0000-1000-8000-00805f9b34fb`;
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Convert a string of hex into a DataView of raw bytes.
|
|
81
|
+
* Note: characters other than [0-9a-fA-F] are ignored
|
|
82
|
+
* @param hex string of values, e.g. "00 01 02" or "000102"
|
|
83
|
+
* @return DataView of raw bytes
|
|
84
|
+
*/
|
|
85
|
+
function hexStringToDataView(hex) {
|
|
86
|
+
const bin = [];
|
|
87
|
+
let i, c, isEmpty = 1, buffer = 0;
|
|
88
|
+
for (i = 0; i < hex.length; i++) {
|
|
89
|
+
c = hex.charCodeAt(i);
|
|
90
|
+
if ((c > 47 && c < 58) || (c > 64 && c < 71) || (c > 96 && c < 103)) {
|
|
91
|
+
buffer = (buffer << 4) ^ ((c > 64 ? c + 9 : c) & 15);
|
|
92
|
+
if ((isEmpty ^= 1)) {
|
|
93
|
+
bin.push(buffer & 0xff);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return numbersToDataView(bin);
|
|
86
98
|
}
|
|
87
99
|
function dataViewToHexString(value) {
|
|
88
100
|
return dataViewToNumbers(value)
|
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":["/**\n * Android scan mode\n */\nexport var ScanMode;\n(function (ScanMode) {\n /**\n * Perform Bluetooth LE scan in low power mode. This mode is enforced if the scanning application is not in foreground.\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_POWER\n */\n ScanMode[ScanMode[\"SCAN_MODE_LOW_POWER\"] = 0] = \"SCAN_MODE_LOW_POWER\";\n /**\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.\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_BALANCED\n */\n ScanMode[ScanMode[\"SCAN_MODE_BALANCED\"] = 1] = \"SCAN_MODE_BALANCED\";\n /**\n * Scan using highest duty cycle. It's recommended to only use this mode when the application is running in the foreground.\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_LATENCY\n */\n ScanMode[ScanMode[\"SCAN_MODE_LOW_LATENCY\"] = 2] = \"SCAN_MODE_LOW_LATENCY\";\n})(ScanMode || (ScanMode = {}));\n/**\n * Android connection priority used in `requestConnectionPriority`\n */\nexport var ConnectionPriority;\n(function (ConnectionPriority) {\n /**\n * Use the connection parameters recommended by the Bluetooth SIG. This is the default value if no connection parameter update is requested.\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_BALANCED\n */\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_BALANCED\"] = 0] = \"CONNECTION_PRIORITY_BALANCED\";\n /**\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.\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_HIGH\n */\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_HIGH\"] = 1] = \"CONNECTION_PRIORITY_HIGH\";\n /**\n * Request low power, reduced data rate connection parameters.\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_LOW_POWER\n */\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_LOW_POWER\"] = 2] = \"CONNECTION_PRIORITY_LOW_POWER\";\n})(ConnectionPriority || (ConnectionPriority = {}));\n//# sourceMappingURL=definitions.js.map","/**\n * Convert an array of numbers into a DataView.\n */\nexport function numbersToDataView(value) {\n return new DataView(Uint8Array.from(value).buffer);\n}\n/**\n * Convert a DataView into an array of numbers.\n */\nexport function dataViewToNumbers(value) {\n return Array.from(new Uint8Array(value.buffer, value.byteOffset, value.byteLength));\n}\n/**\n * Convert a string into a DataView.\n */\nexport function textToDataView(value) {\n return numbersToDataView(value.split('').map((s) => s.charCodeAt(0)));\n}\n/**\n * Convert a DataView into a string.\n */\nexport function dataViewToText(value) {\n return String.fromCharCode(...dataViewToNumbers(value));\n}\n/**\n * Convert a 16 bit UUID into a 128 bit UUID string\n * @param value number, e.g. 0x180d\n * @return string, e.g. '0000180d-0000-1000-8000-00805f9b34fb'\n */\nexport function numberToUUID(value) {\n return `0000${value.toString(16).padStart(4, '0')}-0000-1000-8000-00805f9b34fb`;\n}\nexport function hexStringToDataView(value) {\n const numbers = value\n .trim()\n .split(' ')\n .filter((e) => e !== '')\n .map((s) => parseInt(s, 16));\n return numbersToDataView(numbers);\n}\nexport function dataViewToHexString(value) {\n return dataViewToNumbers(value)\n .map((n) => {\n let s = n.toString(16);\n if (s.length == 1) {\n s = '0' + s;\n }\n return s;\n })\n .join(' ');\n}\nexport function webUUIDToString(uuid) {\n if (typeof uuid === 'string') {\n return uuid;\n }\n else if (typeof uuid === 'number') {\n return numberToUUID(uuid);\n }\n else {\n throw new Error('Invalid UUID');\n }\n}\nexport function mapToObject(map) {\n const obj = {};\n if (!map) {\n return undefined;\n }\n map.forEach((value, key) => {\n obj[key.toString()] = value;\n });\n return obj;\n}\n//# sourceMappingURL=conversion.js.map","import { registerPlugin } from '@capacitor/core';\nexport const BluetoothLe = registerPlugin('BluetoothLe', {\n web: () => import('./web').then((m) => new m.BluetoothLeWeb()),\n});\n//# sourceMappingURL=plugin.js.map","const makeQueue = () => {\n let currentTask = Promise.resolve();\n // create a new promise so that errors can be bubbled\n // up to the caller without being caught by the queue\n return (fn) => new Promise((resolve, reject) => {\n currentTask = currentTask\n .then(() => fn())\n .then(resolve)\n .catch(reject);\n });\n};\nexport function getQueue(enabled) {\n if (enabled) {\n return makeQueue();\n }\n return (fn) => fn();\n}\n//# sourceMappingURL=queue.js.map","export function parseUUID(uuid) {\n if (typeof uuid !== 'string') {\n throw new Error(`Invalid UUID type ${typeof uuid}. Expected string.`);\n }\n uuid = uuid.toLowerCase();\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;\n if (!is128BitUuid) {\n throw new Error(`Invalid UUID format ${uuid}. Expected 128 bit string (e.g. \"0000180d-0000-1000-8000-00805f9b34fb\").`);\n }\n return uuid;\n}\n//# sourceMappingURL=validators.js.map","import { Capacitor } from '@capacitor/core';\nimport { dataViewToHexString, hexStringToDataView } from './conversion';\nimport { BluetoothLe } from './plugin';\nimport { getQueue } from './queue';\nimport { parseUUID } from './validators';\nclass BleClientClass {\n constructor() {\n this.scanListener = null;\n this.eventListeners = new Map();\n this.queue = getQueue(true);\n }\n enableQueue() {\n this.queue = getQueue(true);\n }\n disableQueue() {\n this.queue = getQueue(false);\n }\n async initialize(options) {\n await this.queue(async () => {\n await BluetoothLe.initialize(options);\n });\n }\n async isEnabled() {\n const enabled = await this.queue(async () => {\n const result = await BluetoothLe.isEnabled();\n return result.value;\n });\n return enabled;\n }\n async requestEnable() {\n await this.queue(async () => {\n await BluetoothLe.requestEnable();\n });\n }\n async enable() {\n await this.queue(async () => {\n await BluetoothLe.enable();\n });\n }\n async disable() {\n await this.queue(async () => {\n await BluetoothLe.disable();\n });\n }\n async startEnabledNotifications(callback) {\n await this.queue(async () => {\n var _a;\n const key = `onEnabledChanged`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const listener = await BluetoothLe.addListener(key, (result) => {\n callback(result.value);\n });\n this.eventListeners.set(key, listener);\n await BluetoothLe.startEnabledNotifications();\n });\n }\n async stopEnabledNotifications() {\n await this.queue(async () => {\n var _a;\n const key = `onEnabledChanged`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n this.eventListeners.delete(key);\n await BluetoothLe.stopEnabledNotifications();\n });\n }\n async isLocationEnabled() {\n const enabled = await this.queue(async () => {\n const result = await BluetoothLe.isLocationEnabled();\n return result.value;\n });\n return enabled;\n }\n async openLocationSettings() {\n await this.queue(async () => {\n await BluetoothLe.openLocationSettings();\n });\n }\n async openBluetoothSettings() {\n await this.queue(async () => {\n await BluetoothLe.openBluetoothSettings();\n });\n }\n async openAppSettings() {\n await this.queue(async () => {\n await BluetoothLe.openAppSettings();\n });\n }\n async setDisplayStrings(displayStrings) {\n await this.queue(async () => {\n await BluetoothLe.setDisplayStrings(displayStrings);\n });\n }\n async requestDevice(options) {\n options = options ? this.validateRequestBleDeviceOptions(options) : undefined;\n const result = await this.queue(async () => {\n const device = await BluetoothLe.requestDevice(options);\n return device;\n });\n return result;\n }\n async requestLEScan(options, callback) {\n options = this.validateRequestBleDeviceOptions(options);\n await this.queue(async () => {\n var _a;\n await ((_a = this.scanListener) === null || _a === void 0 ? void 0 : _a.remove());\n this.scanListener = await BluetoothLe.addListener('onScanResult', (resultInternal) => {\n const result = Object.assign(Object.assign({}, resultInternal), { manufacturerData: this.convertObject(resultInternal.manufacturerData), serviceData: this.convertObject(resultInternal.serviceData), rawAdvertisement: resultInternal.rawAdvertisement\n ? this.convertValue(resultInternal.rawAdvertisement)\n : undefined });\n callback(result);\n });\n await BluetoothLe.requestLEScan(options);\n });\n }\n async stopLEScan() {\n await this.queue(async () => {\n var _a;\n await ((_a = this.scanListener) === null || _a === void 0 ? void 0 : _a.remove());\n this.scanListener = null;\n await BluetoothLe.stopLEScan();\n });\n }\n async getDevices(deviceIds) {\n if (!Array.isArray(deviceIds)) {\n throw new Error('deviceIds must be an array');\n }\n return this.queue(async () => {\n const result = await BluetoothLe.getDevices({ deviceIds });\n return result.devices;\n });\n }\n async getConnectedDevices(services) {\n if (!Array.isArray(services)) {\n throw new Error('services must be an array');\n }\n services = services.map(parseUUID);\n return this.queue(async () => {\n const result = await BluetoothLe.getConnectedDevices({ services });\n return result.devices;\n });\n }\n async connect(deviceId, onDisconnect, options) {\n await this.queue(async () => {\n var _a;\n if (onDisconnect) {\n const key = `disconnected|${deviceId}`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const listener = await BluetoothLe.addListener(key, () => {\n onDisconnect(deviceId);\n });\n this.eventListeners.set(key, listener);\n }\n await BluetoothLe.connect(Object.assign({ deviceId }, options));\n });\n }\n async createBond(deviceId, options) {\n await this.queue(async () => {\n await BluetoothLe.createBond(Object.assign({ deviceId }, options));\n });\n }\n async isBonded(deviceId) {\n const isBonded = await this.queue(async () => {\n const result = await BluetoothLe.isBonded({ deviceId });\n return result.value;\n });\n return isBonded;\n }\n async disconnect(deviceId) {\n await this.queue(async () => {\n await BluetoothLe.disconnect({ deviceId });\n });\n }\n async getServices(deviceId) {\n const services = await this.queue(async () => {\n const result = await BluetoothLe.getServices({ deviceId });\n return result.services;\n });\n return services;\n }\n async discoverServices(deviceId) {\n await this.queue(async () => {\n await BluetoothLe.discoverServices({ deviceId });\n });\n }\n async getMtu(deviceId) {\n const value = await this.queue(async () => {\n const result = await BluetoothLe.getMtu({ deviceId });\n return result.value;\n });\n return value;\n }\n async requestConnectionPriority(deviceId, connectionPriority) {\n await this.queue(async () => {\n await BluetoothLe.requestConnectionPriority({ deviceId, connectionPriority });\n });\n }\n async readRssi(deviceId) {\n const value = await this.queue(async () => {\n const result = await BluetoothLe.readRssi({ deviceId });\n return parseFloat(result.value);\n });\n return value;\n }\n async read(deviceId, service, characteristic, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n const value = await this.queue(async () => {\n const result = await BluetoothLe.read(Object.assign({ deviceId,\n service,\n characteristic }, options));\n return this.convertValue(result.value);\n });\n return value;\n }\n async write(deviceId, service, characteristic, value, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n return this.queue(async () => {\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\n throw new Error('Invalid data.');\n }\n let writeValue = value;\n if (Capacitor.getPlatform() !== 'web') {\n // on native we can only write strings\n writeValue = dataViewToHexString(value);\n }\n await BluetoothLe.write(Object.assign({ deviceId,\n service,\n characteristic, value: writeValue }, options));\n });\n }\n async writeWithoutResponse(deviceId, service, characteristic, value, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n await this.queue(async () => {\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\n throw new Error('Invalid data.');\n }\n let writeValue = value;\n if (Capacitor.getPlatform() !== 'web') {\n // on native we can only write strings\n writeValue = dataViewToHexString(value);\n }\n await BluetoothLe.writeWithoutResponse(Object.assign({ deviceId,\n service,\n characteristic, value: writeValue }, options));\n });\n }\n async readDescriptor(deviceId, service, characteristic, descriptor, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n descriptor = parseUUID(descriptor);\n const value = await this.queue(async () => {\n const result = await BluetoothLe.readDescriptor(Object.assign({ deviceId,\n service,\n characteristic,\n descriptor }, options));\n return this.convertValue(result.value);\n });\n return value;\n }\n async writeDescriptor(deviceId, service, characteristic, descriptor, value, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n descriptor = parseUUID(descriptor);\n return this.queue(async () => {\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\n throw new Error('Invalid data.');\n }\n let writeValue = value;\n if (Capacitor.getPlatform() !== 'web') {\n // on native we can only write strings\n writeValue = dataViewToHexString(value);\n }\n await BluetoothLe.writeDescriptor(Object.assign({ deviceId,\n service,\n characteristic,\n descriptor, value: writeValue }, options));\n });\n }\n async startNotifications(deviceId, service, characteristic, callback) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n await this.queue(async () => {\n var _a;\n const key = `notification|${deviceId}|${service}|${characteristic}`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const listener = await BluetoothLe.addListener(key, (event) => {\n callback(this.convertValue(event === null || event === void 0 ? void 0 : event.value));\n });\n this.eventListeners.set(key, listener);\n await BluetoothLe.startNotifications({\n deviceId,\n service,\n characteristic,\n });\n });\n }\n async stopNotifications(deviceId, service, characteristic) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n await this.queue(async () => {\n var _a;\n const key = `notification|${deviceId}|${service}|${characteristic}`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n this.eventListeners.delete(key);\n await BluetoothLe.stopNotifications({\n deviceId,\n service,\n characteristic,\n });\n });\n }\n validateRequestBleDeviceOptions(options) {\n if (options.services) {\n options.services = options.services.map(parseUUID);\n }\n if (options.optionalServices) {\n options.optionalServices = options.optionalServices.map(parseUUID);\n }\n return options;\n }\n convertValue(value) {\n if (typeof value === 'string') {\n return hexStringToDataView(value);\n }\n else if (value === undefined) {\n return new DataView(new ArrayBuffer(0));\n }\n return value;\n }\n convertObject(obj) {\n if (obj === undefined) {\n return undefined;\n }\n const result = {};\n for (const key of Object.keys(obj)) {\n result[key] = this.convertValue(obj[key]);\n }\n return result;\n }\n}\nexport const BleClient = new BleClientClass();\n//# sourceMappingURL=bleClient.js.map","export async function runWithTimeout(promise, time, exception) {\n let timer;\n return Promise.race([\n promise,\n new Promise((_, reject) => {\n timer = setTimeout(() => reject(exception), time);\n }),\n ]).finally(() => clearTimeout(timer));\n}\n//# sourceMappingURL=timeout.js.map","import { WebPlugin } from '@capacitor/core';\nimport { hexStringToDataView, mapToObject, webUUIDToString } from './conversion';\nimport { runWithTimeout } from './timeout';\nexport class BluetoothLeWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.deviceMap = new Map();\n this.discoveredDevices = new Map();\n this.scan = null;\n this.DEFAULT_CONNECTION_TIMEOUT = 10000;\n this.onAdvertisementReceivedCallback = this.onAdvertisementReceived.bind(this);\n this.onDisconnectedCallback = this.onDisconnected.bind(this);\n this.onCharacteristicValueChangedCallback = this.onCharacteristicValueChanged.bind(this);\n }\n async initialize() {\n if (typeof navigator === 'undefined' || !navigator.bluetooth) {\n throw this.unavailable('Web Bluetooth API not available in this browser.');\n }\n const isAvailable = await navigator.bluetooth.getAvailability();\n if (!isAvailable) {\n throw this.unavailable('No Bluetooth radio available.');\n }\n }\n async isEnabled() {\n // not available on web\n return { value: true };\n }\n async requestEnable() {\n throw this.unavailable('requestEnable is not available on web.');\n }\n async enable() {\n throw this.unavailable('enable is not available on web.');\n }\n async disable() {\n throw this.unavailable('disable is not available on web.');\n }\n async startEnabledNotifications() {\n // not available on web\n }\n async stopEnabledNotifications() {\n // not available on web\n }\n async isLocationEnabled() {\n throw this.unavailable('isLocationEnabled is not available on web.');\n }\n async openLocationSettings() {\n throw this.unavailable('openLocationSettings is not available on web.');\n }\n async openBluetoothSettings() {\n throw this.unavailable('openBluetoothSettings is not available on web.');\n }\n async openAppSettings() {\n throw this.unavailable('openAppSettings is not available on web.');\n }\n async setDisplayStrings() {\n // not available on web\n }\n async requestDevice(options) {\n const filters = this.getFilters(options);\n const device = await navigator.bluetooth.requestDevice({\n filters: filters.length ? filters : undefined,\n optionalServices: options === null || options === void 0 ? void 0 : options.optionalServices,\n acceptAllDevices: filters.length === 0,\n });\n this.deviceMap.set(device.id, device);\n const bleDevice = this.getBleDevice(device);\n return bleDevice;\n }\n async requestLEScan(options) {\n this.requestBleDeviceOptions = options;\n const filters = this.getFilters(options);\n await this.stopLEScan();\n this.discoveredDevices = new Map();\n navigator.bluetooth.removeEventListener('advertisementreceived', this.onAdvertisementReceivedCallback);\n navigator.bluetooth.addEventListener('advertisementreceived', this.onAdvertisementReceivedCallback);\n this.scan = await navigator.bluetooth.requestLEScan({\n filters: filters.length ? filters : undefined,\n acceptAllAdvertisements: filters.length === 0,\n keepRepeatedDevices: options === null || options === void 0 ? void 0 : options.allowDuplicates,\n });\n }\n onAdvertisementReceived(event) {\n var _a, _b;\n const deviceId = event.device.id;\n this.deviceMap.set(deviceId, event.device);\n const isNew = !this.discoveredDevices.has(deviceId);\n if (isNew || ((_a = this.requestBleDeviceOptions) === null || _a === void 0 ? void 0 : _a.allowDuplicates)) {\n this.discoveredDevices.set(deviceId, true);\n const device = this.getBleDevice(event.device);\n const result = {\n device,\n localName: device.name,\n rssi: event.rssi,\n txPower: event.txPower,\n manufacturerData: mapToObject(event.manufacturerData),\n serviceData: mapToObject(event.serviceData),\n uuids: (_b = event.uuids) === null || _b === void 0 ? void 0 : _b.map(webUUIDToString),\n };\n this.notifyListeners('onScanResult', result);\n }\n }\n async stopLEScan() {\n var _a;\n if ((_a = this.scan) === null || _a === void 0 ? void 0 : _a.active) {\n this.scan.stop();\n }\n this.scan = null;\n }\n async getDevices(options) {\n const devices = await navigator.bluetooth.getDevices();\n const bleDevices = devices\n .filter((device) => options.deviceIds.includes(device.id))\n .map((device) => {\n this.deviceMap.set(device.id, device);\n const bleDevice = this.getBleDevice(device);\n return bleDevice;\n });\n return { devices: bleDevices };\n }\n async getConnectedDevices(_options) {\n const devices = await navigator.bluetooth.getDevices();\n const bleDevices = devices\n .filter((device) => {\n var _a;\n return (_a = device.gatt) === null || _a === void 0 ? void 0 : _a.connected;\n })\n .map((device) => {\n this.deviceMap.set(device.id, device);\n const bleDevice = this.getBleDevice(device);\n return bleDevice;\n });\n return { devices: bleDevices };\n }\n async connect(options) {\n var _a, _b;\n const device = this.getDeviceFromMap(options.deviceId);\n device.removeEventListener('gattserverdisconnected', this.onDisconnectedCallback);\n device.addEventListener('gattserverdisconnected', this.onDisconnectedCallback);\n const timeoutError = Symbol();\n if (device.gatt === undefined) {\n throw new Error('No gatt server available.');\n }\n try {\n const timeout = (_a = options.timeout) !== null && _a !== void 0 ? _a : this.DEFAULT_CONNECTION_TIMEOUT;\n await runWithTimeout(device.gatt.connect(), timeout, timeoutError);\n }\n catch (error) {\n // cancel pending connect call, does not work yet in chromium because of a bug:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=684073\n await ((_b = device.gatt) === null || _b === void 0 ? void 0 : _b.disconnect());\n if (error === timeoutError) {\n throw new Error('Connection timeout');\n }\n else {\n throw error;\n }\n }\n }\n onDisconnected(event) {\n const deviceId = event.target.id;\n const key = `disconnected|${deviceId}`;\n this.notifyListeners(key, null);\n }\n async createBond(_options) {\n throw this.unavailable('createBond is not available on web.');\n }\n async isBonded(_options) {\n throw this.unavailable('isBonded is not available on web.');\n }\n async disconnect(options) {\n var _a;\n (_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.disconnect();\n }\n async getServices(options) {\n var _a, _b;\n const services = (_b = (await ((_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.getPrimaryServices()))) !== null && _b !== void 0 ? _b : [];\n const bleServices = [];\n for (const service of services) {\n const characteristics = await service.getCharacteristics();\n const bleCharacteristics = [];\n for (const characteristic of characteristics) {\n bleCharacteristics.push({\n uuid: characteristic.uuid,\n properties: this.getProperties(characteristic),\n descriptors: await this.getDescriptors(characteristic),\n });\n }\n bleServices.push({ uuid: service.uuid, characteristics: bleCharacteristics });\n }\n return { services: bleServices };\n }\n async getDescriptors(characteristic) {\n try {\n const descriptors = await characteristic.getDescriptors();\n return descriptors.map((descriptor) => ({\n uuid: descriptor.uuid,\n }));\n }\n catch (_a) {\n return [];\n }\n }\n getProperties(characteristic) {\n return {\n broadcast: characteristic.properties.broadcast,\n read: characteristic.properties.read,\n writeWithoutResponse: characteristic.properties.writeWithoutResponse,\n write: characteristic.properties.write,\n notify: characteristic.properties.notify,\n indicate: characteristic.properties.indicate,\n authenticatedSignedWrites: characteristic.properties.authenticatedSignedWrites,\n reliableWrite: characteristic.properties.reliableWrite,\n writableAuxiliaries: characteristic.properties.writableAuxiliaries,\n };\n }\n async getCharacteristic(options) {\n var _a;\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));\n return service === null || service === void 0 ? void 0 : service.getCharacteristic(options === null || options === void 0 ? void 0 : options.characteristic);\n }\n async getDescriptor(options) {\n const characteristic = await this.getCharacteristic(options);\n return characteristic === null || characteristic === void 0 ? void 0 : characteristic.getDescriptor(options === null || options === void 0 ? void 0 : options.descriptor);\n }\n async discoverServices(_options) {\n throw this.unavailable('discoverServices is not available on web.');\n }\n async getMtu(_options) {\n throw this.unavailable('getMtu is not available on web.');\n }\n async requestConnectionPriority(_options) {\n throw this.unavailable('requestConnectionPriority is not available on web.');\n }\n async readRssi(_options) {\n throw this.unavailable('readRssi is not available on web.');\n }\n async read(options) {\n const characteristic = await this.getCharacteristic(options);\n const value = await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.readValue());\n return { value };\n }\n async write(options) {\n const characteristic = await this.getCharacteristic(options);\n let dataView;\n if (typeof options.value === 'string') {\n dataView = hexStringToDataView(options.value);\n }\n else {\n dataView = options.value;\n }\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.writeValueWithResponse(dataView));\n }\n async writeWithoutResponse(options) {\n const characteristic = await this.getCharacteristic(options);\n let dataView;\n if (typeof options.value === 'string') {\n dataView = hexStringToDataView(options.value);\n }\n else {\n dataView = options.value;\n }\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.writeValueWithoutResponse(dataView));\n }\n async readDescriptor(options) {\n const descriptor = await this.getDescriptor(options);\n const value = await (descriptor === null || descriptor === void 0 ? void 0 : descriptor.readValue());\n return { value };\n }\n async writeDescriptor(options) {\n const descriptor = await this.getDescriptor(options);\n let dataView;\n if (typeof options.value === 'string') {\n dataView = hexStringToDataView(options.value);\n }\n else {\n dataView = options.value;\n }\n await (descriptor === null || descriptor === void 0 ? void 0 : descriptor.writeValue(dataView));\n }\n async startNotifications(options) {\n const characteristic = await this.getCharacteristic(options);\n characteristic === null || characteristic === void 0 ? void 0 : characteristic.removeEventListener('characteristicvaluechanged', this.onCharacteristicValueChangedCallback);\n characteristic === null || characteristic === void 0 ? void 0 : characteristic.addEventListener('characteristicvaluechanged', this.onCharacteristicValueChangedCallback);\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.startNotifications());\n }\n onCharacteristicValueChanged(event) {\n var _a, _b;\n const characteristic = event.target;\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}`;\n this.notifyListeners(key, {\n value: characteristic.value,\n });\n }\n async stopNotifications(options) {\n const characteristic = await this.getCharacteristic(options);\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.stopNotifications());\n }\n getFilters(options) {\n var _a;\n const filters = [];\n for (const service of (_a = options === null || options === void 0 ? void 0 : options.services) !== null && _a !== void 0 ? _a : []) {\n filters.push({\n services: [service],\n name: options === null || options === void 0 ? void 0 : options.name,\n namePrefix: options === null || options === void 0 ? void 0 : options.namePrefix,\n });\n }\n if (((options === null || options === void 0 ? void 0 : options.name) || (options === null || options === void 0 ? void 0 : options.namePrefix)) && filters.length === 0) {\n filters.push({\n name: options.name,\n namePrefix: options.namePrefix,\n });\n }\n return filters;\n }\n getDeviceFromMap(deviceId) {\n const device = this.deviceMap.get(deviceId);\n if (device === undefined) {\n throw new Error('Device not found. Call \"requestDevice\", \"requestLEScan\" or \"getDevices\" first.');\n }\n return device;\n }\n getBleDevice(device) {\n var _a;\n const bleDevice = {\n deviceId: device.id,\n // use undefined instead of null if name is not available\n name: (_a = device.name) !== null && _a !== void 0 ? _a : undefined,\n };\n return bleDevice;\n }\n}\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,kBA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K,CAAC,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;IAClL,YAAY,OAAO,CAAC,IAAI,CAAC;IACzB,gBAAgB,IAAI,EAAE,OAAO,CAAC,IAAI;IAClC,gBAAgB,UAAU,EAAE,OAAO,CAAC,UAAU;IAC9C,aAAa,CAAC,CAAC;IACf,SAAS;IACT,QAAQ,OAAO,OAAO,CAAC;IACvB,KAAK;IACL,IAAI,gBAAgB,CAAC,QAAQ,EAAE;IAC/B,QAAQ,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACpD,QAAQ,IAAI,MAAM,KAAK,SAAS,EAAE;IAClC,YAAY,MAAM,IAAI,KAAK,CAAC,gFAAgF,CAAC,CAAC;IAC9G,SAAS;IACT,QAAQ,OAAO,MAAM,CAAC;IACtB,KAAK;IACL,IAAI,YAAY,CAAC,MAAM,EAAE;IACzB,QAAQ,IAAI,EAAE,CAAC;IACf,QAAQ,MAAM,SAAS,GAAG;IAC1B,YAAY,QAAQ,EAAE,MAAM,CAAC,EAAE;IAC/B;IACA,YAAY,IAAI,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,IAAI,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,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":["/**\n * Android scan mode\n */\nexport var ScanMode;\n(function (ScanMode) {\n /**\n * Perform Bluetooth LE scan in low power mode. This mode is enforced if the scanning application is not in foreground.\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_POWER\n */\n ScanMode[ScanMode[\"SCAN_MODE_LOW_POWER\"] = 0] = \"SCAN_MODE_LOW_POWER\";\n /**\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.\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_BALANCED\n */\n ScanMode[ScanMode[\"SCAN_MODE_BALANCED\"] = 1] = \"SCAN_MODE_BALANCED\";\n /**\n * Scan using highest duty cycle. It's recommended to only use this mode when the application is running in the foreground.\n * https://developer.android.com/reference/android/bluetooth/le/ScanSettings#SCAN_MODE_LOW_LATENCY\n */\n ScanMode[ScanMode[\"SCAN_MODE_LOW_LATENCY\"] = 2] = \"SCAN_MODE_LOW_LATENCY\";\n})(ScanMode || (ScanMode = {}));\n/**\n * Android connection priority used in `requestConnectionPriority`\n */\nexport var ConnectionPriority;\n(function (ConnectionPriority) {\n /**\n * Use the connection parameters recommended by the Bluetooth SIG. This is the default value if no connection parameter update is requested.\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_BALANCED\n */\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_BALANCED\"] = 0] = \"CONNECTION_PRIORITY_BALANCED\";\n /**\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.\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_HIGH\n */\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_HIGH\"] = 1] = \"CONNECTION_PRIORITY_HIGH\";\n /**\n * Request low power, reduced data rate connection parameters.\n * https://developer.android.com/reference/android/bluetooth/BluetoothGatt#CONNECTION_PRIORITY_LOW_POWER\n */\n ConnectionPriority[ConnectionPriority[\"CONNECTION_PRIORITY_LOW_POWER\"] = 2] = \"CONNECTION_PRIORITY_LOW_POWER\";\n})(ConnectionPriority || (ConnectionPriority = {}));\n//# sourceMappingURL=definitions.js.map","/**\n * Convert an array of numbers into a DataView.\n */\nexport function numbersToDataView(value) {\n return new DataView(Uint8Array.from(value).buffer);\n}\n/**\n * Convert a DataView into an array of numbers.\n */\nexport function dataViewToNumbers(value) {\n return Array.from(new Uint8Array(value.buffer, value.byteOffset, value.byteLength));\n}\n/**\n * Convert a string into a DataView.\n */\nexport function textToDataView(value) {\n return numbersToDataView(value.split('').map((s) => s.charCodeAt(0)));\n}\n/**\n * Convert a DataView into a string.\n */\nexport function dataViewToText(value) {\n return String.fromCharCode(...dataViewToNumbers(value));\n}\n/**\n * Convert a 16 bit UUID into a 128 bit UUID string\n * @param value number, e.g. 0x180d\n * @return string, e.g. '0000180d-0000-1000-8000-00805f9b34fb'\n */\nexport function numberToUUID(value) {\n return `0000${value.toString(16).padStart(4, '0')}-0000-1000-8000-00805f9b34fb`;\n}\n/**\n * Convert a string of hex into a DataView of raw bytes.\n * Note: characters other than [0-9a-fA-F] are ignored\n * @param hex string of values, e.g. \"00 01 02\" or \"000102\"\n * @return DataView of raw bytes\n */\nexport function hexStringToDataView(hex) {\n const bin = [];\n let i, c, isEmpty = 1, buffer = 0;\n for (i = 0; i < hex.length; i++) {\n c = hex.charCodeAt(i);\n if ((c > 47 && c < 58) || (c > 64 && c < 71) || (c > 96 && c < 103)) {\n buffer = (buffer << 4) ^ ((c > 64 ? c + 9 : c) & 15);\n if ((isEmpty ^= 1)) {\n bin.push(buffer & 0xff);\n }\n }\n }\n return numbersToDataView(bin);\n}\nexport function dataViewToHexString(value) {\n return dataViewToNumbers(value)\n .map((n) => {\n let s = n.toString(16);\n if (s.length == 1) {\n s = '0' + s;\n }\n return s;\n })\n .join(' ');\n}\nexport function webUUIDToString(uuid) {\n if (typeof uuid === 'string') {\n return uuid;\n }\n else if (typeof uuid === 'number') {\n return numberToUUID(uuid);\n }\n else {\n throw new Error('Invalid UUID');\n }\n}\nexport function mapToObject(map) {\n const obj = {};\n if (!map) {\n return undefined;\n }\n map.forEach((value, key) => {\n obj[key.toString()] = value;\n });\n return obj;\n}\n//# sourceMappingURL=conversion.js.map","import { registerPlugin } from '@capacitor/core';\nexport const BluetoothLe = registerPlugin('BluetoothLe', {\n web: () => import('./web').then((m) => new m.BluetoothLeWeb()),\n});\n//# sourceMappingURL=plugin.js.map","const makeQueue = () => {\n let currentTask = Promise.resolve();\n // create a new promise so that errors can be bubbled\n // up to the caller without being caught by the queue\n return (fn) => new Promise((resolve, reject) => {\n currentTask = currentTask\n .then(() => fn())\n .then(resolve)\n .catch(reject);\n });\n};\nexport function getQueue(enabled) {\n if (enabled) {\n return makeQueue();\n }\n return (fn) => fn();\n}\n//# sourceMappingURL=queue.js.map","export function parseUUID(uuid) {\n if (typeof uuid !== 'string') {\n throw new Error(`Invalid UUID type ${typeof uuid}. Expected string.`);\n }\n uuid = uuid.toLowerCase();\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;\n if (!is128BitUuid) {\n throw new Error(`Invalid UUID format ${uuid}. Expected 128 bit string (e.g. \"0000180d-0000-1000-8000-00805f9b34fb\").`);\n }\n return uuid;\n}\n//# sourceMappingURL=validators.js.map","import { Capacitor } from '@capacitor/core';\nimport { dataViewToHexString, hexStringToDataView } from './conversion';\nimport { BluetoothLe } from './plugin';\nimport { getQueue } from './queue';\nimport { parseUUID } from './validators';\nclass BleClientClass {\n constructor() {\n this.scanListener = null;\n this.eventListeners = new Map();\n this.queue = getQueue(true);\n }\n enableQueue() {\n this.queue = getQueue(true);\n }\n disableQueue() {\n this.queue = getQueue(false);\n }\n async initialize(options) {\n await this.queue(async () => {\n await BluetoothLe.initialize(options);\n });\n }\n async isEnabled() {\n const enabled = await this.queue(async () => {\n const result = await BluetoothLe.isEnabled();\n return result.value;\n });\n return enabled;\n }\n async requestEnable() {\n await this.queue(async () => {\n await BluetoothLe.requestEnable();\n });\n }\n async enable() {\n await this.queue(async () => {\n await BluetoothLe.enable();\n });\n }\n async disable() {\n await this.queue(async () => {\n await BluetoothLe.disable();\n });\n }\n async startEnabledNotifications(callback) {\n await this.queue(async () => {\n var _a;\n const key = `onEnabledChanged`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const listener = await BluetoothLe.addListener(key, (result) => {\n callback(result.value);\n });\n this.eventListeners.set(key, listener);\n await BluetoothLe.startEnabledNotifications();\n });\n }\n async stopEnabledNotifications() {\n await this.queue(async () => {\n var _a;\n const key = `onEnabledChanged`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n this.eventListeners.delete(key);\n await BluetoothLe.stopEnabledNotifications();\n });\n }\n async isLocationEnabled() {\n const enabled = await this.queue(async () => {\n const result = await BluetoothLe.isLocationEnabled();\n return result.value;\n });\n return enabled;\n }\n async openLocationSettings() {\n await this.queue(async () => {\n await BluetoothLe.openLocationSettings();\n });\n }\n async openBluetoothSettings() {\n await this.queue(async () => {\n await BluetoothLe.openBluetoothSettings();\n });\n }\n async openAppSettings() {\n await this.queue(async () => {\n await BluetoothLe.openAppSettings();\n });\n }\n async setDisplayStrings(displayStrings) {\n await this.queue(async () => {\n await BluetoothLe.setDisplayStrings(displayStrings);\n });\n }\n async requestDevice(options) {\n options = options ? this.validateRequestBleDeviceOptions(options) : undefined;\n const result = await this.queue(async () => {\n const device = await BluetoothLe.requestDevice(options);\n return device;\n });\n return result;\n }\n async requestLEScan(options, callback) {\n options = this.validateRequestBleDeviceOptions(options);\n await this.queue(async () => {\n var _a;\n await ((_a = this.scanListener) === null || _a === void 0 ? void 0 : _a.remove());\n this.scanListener = await BluetoothLe.addListener('onScanResult', (resultInternal) => {\n const result = Object.assign(Object.assign({}, resultInternal), { manufacturerData: this.convertObject(resultInternal.manufacturerData), serviceData: this.convertObject(resultInternal.serviceData), rawAdvertisement: resultInternal.rawAdvertisement\n ? this.convertValue(resultInternal.rawAdvertisement)\n : undefined });\n callback(result);\n });\n await BluetoothLe.requestLEScan(options);\n });\n }\n async stopLEScan() {\n await this.queue(async () => {\n var _a;\n await ((_a = this.scanListener) === null || _a === void 0 ? void 0 : _a.remove());\n this.scanListener = null;\n await BluetoothLe.stopLEScan();\n });\n }\n async getDevices(deviceIds) {\n if (!Array.isArray(deviceIds)) {\n throw new Error('deviceIds must be an array');\n }\n return this.queue(async () => {\n const result = await BluetoothLe.getDevices({ deviceIds });\n return result.devices;\n });\n }\n async getConnectedDevices(services) {\n if (!Array.isArray(services)) {\n throw new Error('services must be an array');\n }\n services = services.map(parseUUID);\n return this.queue(async () => {\n const result = await BluetoothLe.getConnectedDevices({ services });\n return result.devices;\n });\n }\n async connect(deviceId, onDisconnect, options) {\n await this.queue(async () => {\n var _a;\n if (onDisconnect) {\n const key = `disconnected|${deviceId}`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const listener = await BluetoothLe.addListener(key, () => {\n onDisconnect(deviceId);\n });\n this.eventListeners.set(key, listener);\n }\n await BluetoothLe.connect(Object.assign({ deviceId }, options));\n });\n }\n async createBond(deviceId, options) {\n await this.queue(async () => {\n await BluetoothLe.createBond(Object.assign({ deviceId }, options));\n });\n }\n async isBonded(deviceId) {\n const isBonded = await this.queue(async () => {\n const result = await BluetoothLe.isBonded({ deviceId });\n return result.value;\n });\n return isBonded;\n }\n async disconnect(deviceId) {\n await this.queue(async () => {\n await BluetoothLe.disconnect({ deviceId });\n });\n }\n async getServices(deviceId) {\n const services = await this.queue(async () => {\n const result = await BluetoothLe.getServices({ deviceId });\n return result.services;\n });\n return services;\n }\n async discoverServices(deviceId) {\n await this.queue(async () => {\n await BluetoothLe.discoverServices({ deviceId });\n });\n }\n async getMtu(deviceId) {\n const value = await this.queue(async () => {\n const result = await BluetoothLe.getMtu({ deviceId });\n return result.value;\n });\n return value;\n }\n async requestConnectionPriority(deviceId, connectionPriority) {\n await this.queue(async () => {\n await BluetoothLe.requestConnectionPriority({ deviceId, connectionPriority });\n });\n }\n async readRssi(deviceId) {\n const value = await this.queue(async () => {\n const result = await BluetoothLe.readRssi({ deviceId });\n return parseFloat(result.value);\n });\n return value;\n }\n async read(deviceId, service, characteristic, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n const value = await this.queue(async () => {\n const result = await BluetoothLe.read(Object.assign({ deviceId,\n service,\n characteristic }, options));\n return this.convertValue(result.value);\n });\n return value;\n }\n async write(deviceId, service, characteristic, value, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n return this.queue(async () => {\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\n throw new Error('Invalid data.');\n }\n let writeValue = value;\n if (Capacitor.getPlatform() !== 'web') {\n // on native we can only write strings\n writeValue = dataViewToHexString(value);\n }\n await BluetoothLe.write(Object.assign({ deviceId,\n service,\n characteristic, value: writeValue }, options));\n });\n }\n async writeWithoutResponse(deviceId, service, characteristic, value, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n await this.queue(async () => {\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\n throw new Error('Invalid data.');\n }\n let writeValue = value;\n if (Capacitor.getPlatform() !== 'web') {\n // on native we can only write strings\n writeValue = dataViewToHexString(value);\n }\n await BluetoothLe.writeWithoutResponse(Object.assign({ deviceId,\n service,\n characteristic, value: writeValue }, options));\n });\n }\n async readDescriptor(deviceId, service, characteristic, descriptor, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n descriptor = parseUUID(descriptor);\n const value = await this.queue(async () => {\n const result = await BluetoothLe.readDescriptor(Object.assign({ deviceId,\n service,\n characteristic,\n descriptor }, options));\n return this.convertValue(result.value);\n });\n return value;\n }\n async writeDescriptor(deviceId, service, characteristic, descriptor, value, options) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n descriptor = parseUUID(descriptor);\n return this.queue(async () => {\n if (!(value === null || value === void 0 ? void 0 : value.buffer)) {\n throw new Error('Invalid data.');\n }\n let writeValue = value;\n if (Capacitor.getPlatform() !== 'web') {\n // on native we can only write strings\n writeValue = dataViewToHexString(value);\n }\n await BluetoothLe.writeDescriptor(Object.assign({ deviceId,\n service,\n characteristic,\n descriptor, value: writeValue }, options));\n });\n }\n async startNotifications(deviceId, service, characteristic, callback) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n await this.queue(async () => {\n var _a;\n const key = `notification|${deviceId}|${service}|${characteristic}`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n const listener = await BluetoothLe.addListener(key, (event) => {\n callback(this.convertValue(event === null || event === void 0 ? void 0 : event.value));\n });\n this.eventListeners.set(key, listener);\n await BluetoothLe.startNotifications({\n deviceId,\n service,\n characteristic,\n });\n });\n }\n async stopNotifications(deviceId, service, characteristic) {\n service = parseUUID(service);\n characteristic = parseUUID(characteristic);\n await this.queue(async () => {\n var _a;\n const key = `notification|${deviceId}|${service}|${characteristic}`;\n await ((_a = this.eventListeners.get(key)) === null || _a === void 0 ? void 0 : _a.remove());\n this.eventListeners.delete(key);\n await BluetoothLe.stopNotifications({\n deviceId,\n service,\n characteristic,\n });\n });\n }\n validateRequestBleDeviceOptions(options) {\n if (options.services) {\n options.services = options.services.map(parseUUID);\n }\n if (options.optionalServices) {\n options.optionalServices = options.optionalServices.map(parseUUID);\n }\n return options;\n }\n convertValue(value) {\n if (typeof value === 'string') {\n return hexStringToDataView(value);\n }\n else if (value === undefined) {\n return new DataView(new ArrayBuffer(0));\n }\n return value;\n }\n convertObject(obj) {\n if (obj === undefined) {\n return undefined;\n }\n const result = {};\n for (const key of Object.keys(obj)) {\n result[key] = this.convertValue(obj[key]);\n }\n return result;\n }\n}\nexport const BleClient = new BleClientClass();\n//# sourceMappingURL=bleClient.js.map","export async function runWithTimeout(promise, time, exception) {\n let timer;\n return Promise.race([\n promise,\n new Promise((_, reject) => {\n timer = setTimeout(() => reject(exception), time);\n }),\n ]).finally(() => clearTimeout(timer));\n}\n//# sourceMappingURL=timeout.js.map","import { WebPlugin } from '@capacitor/core';\nimport { hexStringToDataView, mapToObject, webUUIDToString } from './conversion';\nimport { runWithTimeout } from './timeout';\nexport class BluetoothLeWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.deviceMap = new Map();\n this.discoveredDevices = new Map();\n this.scan = null;\n this.DEFAULT_CONNECTION_TIMEOUT = 10000;\n this.onAdvertisementReceivedCallback = this.onAdvertisementReceived.bind(this);\n this.onDisconnectedCallback = this.onDisconnected.bind(this);\n this.onCharacteristicValueChangedCallback = this.onCharacteristicValueChanged.bind(this);\n }\n async initialize() {\n if (typeof navigator === 'undefined' || !navigator.bluetooth) {\n throw this.unavailable('Web Bluetooth API not available in this browser.');\n }\n const isAvailable = await navigator.bluetooth.getAvailability();\n if (!isAvailable) {\n throw this.unavailable('No Bluetooth radio available.');\n }\n }\n async isEnabled() {\n // not available on web\n return { value: true };\n }\n async requestEnable() {\n throw this.unavailable('requestEnable is not available on web.');\n }\n async enable() {\n throw this.unavailable('enable is not available on web.');\n }\n async disable() {\n throw this.unavailable('disable is not available on web.');\n }\n async startEnabledNotifications() {\n // not available on web\n }\n async stopEnabledNotifications() {\n // not available on web\n }\n async isLocationEnabled() {\n throw this.unavailable('isLocationEnabled is not available on web.');\n }\n async openLocationSettings() {\n throw this.unavailable('openLocationSettings is not available on web.');\n }\n async openBluetoothSettings() {\n throw this.unavailable('openBluetoothSettings is not available on web.');\n }\n async openAppSettings() {\n throw this.unavailable('openAppSettings is not available on web.');\n }\n async setDisplayStrings() {\n // not available on web\n }\n async requestDevice(options) {\n const filters = this.getFilters(options);\n const device = await navigator.bluetooth.requestDevice({\n filters: filters.length ? filters : undefined,\n optionalServices: options === null || options === void 0 ? void 0 : options.optionalServices,\n acceptAllDevices: filters.length === 0,\n });\n this.deviceMap.set(device.id, device);\n const bleDevice = this.getBleDevice(device);\n return bleDevice;\n }\n async requestLEScan(options) {\n this.requestBleDeviceOptions = options;\n const filters = this.getFilters(options);\n await this.stopLEScan();\n this.discoveredDevices = new Map();\n navigator.bluetooth.removeEventListener('advertisementreceived', this.onAdvertisementReceivedCallback);\n navigator.bluetooth.addEventListener('advertisementreceived', this.onAdvertisementReceivedCallback);\n this.scan = await navigator.bluetooth.requestLEScan({\n filters: filters.length ? filters : undefined,\n acceptAllAdvertisements: filters.length === 0,\n keepRepeatedDevices: options === null || options === void 0 ? void 0 : options.allowDuplicates,\n });\n }\n onAdvertisementReceived(event) {\n var _a, _b;\n const deviceId = event.device.id;\n this.deviceMap.set(deviceId, event.device);\n const isNew = !this.discoveredDevices.has(deviceId);\n if (isNew || ((_a = this.requestBleDeviceOptions) === null || _a === void 0 ? void 0 : _a.allowDuplicates)) {\n this.discoveredDevices.set(deviceId, true);\n const device = this.getBleDevice(event.device);\n const result = {\n device,\n localName: device.name,\n rssi: event.rssi,\n txPower: event.txPower,\n manufacturerData: mapToObject(event.manufacturerData),\n serviceData: mapToObject(event.serviceData),\n uuids: (_b = event.uuids) === null || _b === void 0 ? void 0 : _b.map(webUUIDToString),\n };\n this.notifyListeners('onScanResult', result);\n }\n }\n async stopLEScan() {\n var _a;\n if ((_a = this.scan) === null || _a === void 0 ? void 0 : _a.active) {\n this.scan.stop();\n }\n this.scan = null;\n }\n async getDevices(options) {\n const devices = await navigator.bluetooth.getDevices();\n const bleDevices = devices\n .filter((device) => options.deviceIds.includes(device.id))\n .map((device) => {\n this.deviceMap.set(device.id, device);\n const bleDevice = this.getBleDevice(device);\n return bleDevice;\n });\n return { devices: bleDevices };\n }\n async getConnectedDevices(_options) {\n const devices = await navigator.bluetooth.getDevices();\n const bleDevices = devices\n .filter((device) => {\n var _a;\n return (_a = device.gatt) === null || _a === void 0 ? void 0 : _a.connected;\n })\n .map((device) => {\n this.deviceMap.set(device.id, device);\n const bleDevice = this.getBleDevice(device);\n return bleDevice;\n });\n return { devices: bleDevices };\n }\n async connect(options) {\n var _a, _b;\n const device = this.getDeviceFromMap(options.deviceId);\n device.removeEventListener('gattserverdisconnected', this.onDisconnectedCallback);\n device.addEventListener('gattserverdisconnected', this.onDisconnectedCallback);\n const timeoutError = Symbol();\n if (device.gatt === undefined) {\n throw new Error('No gatt server available.');\n }\n try {\n const timeout = (_a = options.timeout) !== null && _a !== void 0 ? _a : this.DEFAULT_CONNECTION_TIMEOUT;\n await runWithTimeout(device.gatt.connect(), timeout, timeoutError);\n }\n catch (error) {\n // cancel pending connect call, does not work yet in chromium because of a bug:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=684073\n await ((_b = device.gatt) === null || _b === void 0 ? void 0 : _b.disconnect());\n if (error === timeoutError) {\n throw new Error('Connection timeout');\n }\n else {\n throw error;\n }\n }\n }\n onDisconnected(event) {\n const deviceId = event.target.id;\n const key = `disconnected|${deviceId}`;\n this.notifyListeners(key, null);\n }\n async createBond(_options) {\n throw this.unavailable('createBond is not available on web.');\n }\n async isBonded(_options) {\n throw this.unavailable('isBonded is not available on web.');\n }\n async disconnect(options) {\n var _a;\n (_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.disconnect();\n }\n async getServices(options) {\n var _a, _b;\n const services = (_b = (await ((_a = this.getDeviceFromMap(options.deviceId).gatt) === null || _a === void 0 ? void 0 : _a.getPrimaryServices()))) !== null && _b !== void 0 ? _b : [];\n const bleServices = [];\n for (const service of services) {\n const characteristics = await service.getCharacteristics();\n const bleCharacteristics = [];\n for (const characteristic of characteristics) {\n bleCharacteristics.push({\n uuid: characteristic.uuid,\n properties: this.getProperties(characteristic),\n descriptors: await this.getDescriptors(characteristic),\n });\n }\n bleServices.push({ uuid: service.uuid, characteristics: bleCharacteristics });\n }\n return { services: bleServices };\n }\n async getDescriptors(characteristic) {\n try {\n const descriptors = await characteristic.getDescriptors();\n return descriptors.map((descriptor) => ({\n uuid: descriptor.uuid,\n }));\n }\n catch (_a) {\n return [];\n }\n }\n getProperties(characteristic) {\n return {\n broadcast: characteristic.properties.broadcast,\n read: characteristic.properties.read,\n writeWithoutResponse: characteristic.properties.writeWithoutResponse,\n write: characteristic.properties.write,\n notify: characteristic.properties.notify,\n indicate: characteristic.properties.indicate,\n authenticatedSignedWrites: characteristic.properties.authenticatedSignedWrites,\n reliableWrite: characteristic.properties.reliableWrite,\n writableAuxiliaries: characteristic.properties.writableAuxiliaries,\n };\n }\n async getCharacteristic(options) {\n var _a;\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));\n return service === null || service === void 0 ? void 0 : service.getCharacteristic(options === null || options === void 0 ? void 0 : options.characteristic);\n }\n async getDescriptor(options) {\n const characteristic = await this.getCharacteristic(options);\n return characteristic === null || characteristic === void 0 ? void 0 : characteristic.getDescriptor(options === null || options === void 0 ? void 0 : options.descriptor);\n }\n async discoverServices(_options) {\n throw this.unavailable('discoverServices is not available on web.');\n }\n async getMtu(_options) {\n throw this.unavailable('getMtu is not available on web.');\n }\n async requestConnectionPriority(_options) {\n throw this.unavailable('requestConnectionPriority is not available on web.');\n }\n async readRssi(_options) {\n throw this.unavailable('readRssi is not available on web.');\n }\n async read(options) {\n const characteristic = await this.getCharacteristic(options);\n const value = await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.readValue());\n return { value };\n }\n async write(options) {\n const characteristic = await this.getCharacteristic(options);\n let dataView;\n if (typeof options.value === 'string') {\n dataView = hexStringToDataView(options.value);\n }\n else {\n dataView = options.value;\n }\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.writeValueWithResponse(dataView));\n }\n async writeWithoutResponse(options) {\n const characteristic = await this.getCharacteristic(options);\n let dataView;\n if (typeof options.value === 'string') {\n dataView = hexStringToDataView(options.value);\n }\n else {\n dataView = options.value;\n }\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.writeValueWithoutResponse(dataView));\n }\n async readDescriptor(options) {\n const descriptor = await this.getDescriptor(options);\n const value = await (descriptor === null || descriptor === void 0 ? void 0 : descriptor.readValue());\n return { value };\n }\n async writeDescriptor(options) {\n const descriptor = await this.getDescriptor(options);\n let dataView;\n if (typeof options.value === 'string') {\n dataView = hexStringToDataView(options.value);\n }\n else {\n dataView = options.value;\n }\n await (descriptor === null || descriptor === void 0 ? void 0 : descriptor.writeValue(dataView));\n }\n async startNotifications(options) {\n const characteristic = await this.getCharacteristic(options);\n characteristic === null || characteristic === void 0 ? void 0 : characteristic.removeEventListener('characteristicvaluechanged', this.onCharacteristicValueChangedCallback);\n characteristic === null || characteristic === void 0 ? void 0 : characteristic.addEventListener('characteristicvaluechanged', this.onCharacteristicValueChangedCallback);\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.startNotifications());\n }\n onCharacteristicValueChanged(event) {\n var _a, _b;\n const characteristic = event.target;\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}`;\n this.notifyListeners(key, {\n value: characteristic.value,\n });\n }\n async stopNotifications(options) {\n const characteristic = await this.getCharacteristic(options);\n await (characteristic === null || characteristic === void 0 ? void 0 : characteristic.stopNotifications());\n }\n getFilters(options) {\n var _a;\n const filters = [];\n for (const service of (_a = options === null || options === void 0 ? void 0 : options.services) !== null && _a !== void 0 ? _a : []) {\n filters.push({\n services: [service],\n name: options === null || options === void 0 ? void 0 : options.name,\n namePrefix: options === null || options === void 0 ? void 0 : options.namePrefix,\n });\n }\n if (((options === null || options === void 0 ? void 0 : options.name) || (options === null || options === void 0 ? void 0 : options.namePrefix)) && filters.length === 0) {\n filters.push({\n name: options.name,\n namePrefix: options.namePrefix,\n });\n }\n return filters;\n }\n getDeviceFromMap(deviceId) {\n const device = this.deviceMap.get(deviceId);\n if (device === undefined) {\n throw new Error('Device not found. Call \"requestDevice\", \"requestLEScan\" or \"getDevices\" first.');\n }\n return device;\n }\n getBleDevice(device) {\n var _a;\n const bleDevice = {\n deviceId: device.id,\n // use undefined instead of null if name is not available\n name: (_a = device.name) !== null && _a !== void 0 ? _a : undefined,\n };\n return bleDevice;\n }\n}\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,EAAE;IACzC,IAAI,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,C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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
extension Data {
|
|
19
|
+
func toHexString() -> String {
|
|
20
|
+
let hexChars = Array("0123456789abcdef".utf8)
|
|
21
|
+
if #available(iOS 14, *) {
|
|
22
|
+
return String(unsafeUninitializedCapacity: self.count*2) { (ptr) -> Int in
|
|
23
|
+
var strp = ptr.baseAddress!
|
|
24
|
+
for byte in self {
|
|
25
|
+
strp[0] = hexChars[Int(byte >> 4)]
|
|
26
|
+
strp[1] = hexChars[Int(byte & 0xF)]
|
|
27
|
+
strp += 2
|
|
28
|
+
}
|
|
29
|
+
return 2 * self.count
|
|
30
|
+
}
|
|
31
|
+
} else {
|
|
32
|
+
// Fallback implementation for iOS < 14, a bit slower
|
|
33
|
+
var result = ""
|
|
34
|
+
result.reserveCapacity(self.count * 2)
|
|
35
|
+
for byte in self {
|
|
36
|
+
let high = Int(byte >> 4)
|
|
37
|
+
let low = Int(byte & 0xF)
|
|
38
|
+
result.append(Character(UnicodeScalar(hexChars[high])))
|
|
39
|
+
result.append(Character(UnicodeScalar(hexChars[low])))
|
|
40
|
+
}
|
|
41
|
+
return result
|
|
42
|
+
}
|
|
22
43
|
}
|
|
23
|
-
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
func dataToString(_ data: Data) -> String {
|
|
47
|
+
return data.toHexString()
|
|
24
48
|
}
|
|
25
49
|
|
|
26
50
|
func stringToData(_ dataString: String) -> Data {
|
package/ios/Plugin/Device.swift
CHANGED
|
@@ -6,7 +6,7 @@ class Device: NSObject, CBPeripheralDelegate {
|
|
|
6
6
|
typealias Callback = (_ success: Bool, _ value: String) -> Void
|
|
7
7
|
|
|
8
8
|
private var peripheral: CBPeripheral!
|
|
9
|
-
private var callbackMap = ThreadSafeDictionary<String,Callback>()
|
|
9
|
+
private var callbackMap = ThreadSafeDictionary<String, Callback>()
|
|
10
10
|
private var timeoutMap = [String: DispatchWorkItem]()
|
|
11
11
|
private var servicesCount = 0
|
|
12
12
|
private var servicesDiscovered = 0
|
|
@@ -164,7 +164,7 @@ class DeviceManager: NSObject, CBCentralManagerDelegate {
|
|
|
164
164
|
|
|
165
165
|
if shouldShowDeviceList {
|
|
166
166
|
DispatchQueue.main.async { [weak self] in
|
|
167
|
-
self?.alertController?.addAction(UIAlertAction(title: device.getName() ?? "Unknown", style: UIAlertAction.Style.default, handler: { (_)
|
|
167
|
+
self?.alertController?.addAction(UIAlertAction(title: device.getName() ?? "Unknown", style: UIAlertAction.Style.default, handler: { (_) in
|
|
168
168
|
log("Selected device")
|
|
169
169
|
self?.stopScan()
|
|
170
170
|
self?.resolve("startScanning", device.getId())
|
|
@@ -180,7 +180,7 @@ class DeviceManager: NSObject, CBCentralManagerDelegate {
|
|
|
180
180
|
func showDeviceList() {
|
|
181
181
|
DispatchQueue.main.async { [weak self] in
|
|
182
182
|
self?.alertController = UIAlertController(title: self?.displayStrings["scanning"], message: nil, preferredStyle: UIAlertController.Style.alert)
|
|
183
|
-
self?.alertController?.addAction(UIAlertAction(title: self?.displayStrings["cancel"], style: UIAlertAction.Style.cancel, handler: { (_)
|
|
183
|
+
self?.alertController?.addAction(UIAlertAction(title: self?.displayStrings["cancel"], style: UIAlertAction.Style.cancel, handler: { (_) in
|
|
184
184
|
log("Cancelled request device.")
|
|
185
185
|
self?.stopScan()
|
|
186
186
|
self?.reject("startScanning", "requestDevice cancelled.")
|
package/ios/Plugin/Plugin.swift
CHANGED
|
@@ -22,7 +22,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
@objc func initialize(_ call: CAPPluginCall) {
|
|
25
|
-
self.deviceManager = DeviceManager(self.bridge?.viewController, self.displayStrings, {(success, message)
|
|
25
|
+
self.deviceManager = DeviceManager(self.bridge?.viewController, self.displayStrings, {(success, message) in
|
|
26
26
|
if success {
|
|
27
27
|
call.resolve()
|
|
28
28
|
} else {
|
|
@@ -51,7 +51,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
51
51
|
|
|
52
52
|
@objc func startEnabledNotifications(_ call: CAPPluginCall) {
|
|
53
53
|
guard let deviceManager = self.getDeviceManager(call) else { return }
|
|
54
|
-
deviceManager.registerStateReceiver({(enabled)
|
|
54
|
+
deviceManager.registerStateReceiver({(enabled) in
|
|
55
55
|
self.notifyListeners("onEnabledChanged", data: ["value": enabled])
|
|
56
56
|
})
|
|
57
57
|
call.resolve()
|
|
@@ -117,7 +117,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
117
117
|
namePrefix,
|
|
118
118
|
false,
|
|
119
119
|
true,
|
|
120
|
-
30, {(success, message)
|
|
120
|
+
30, {(success, message) in
|
|
121
121
|
// selected a device
|
|
122
122
|
if success {
|
|
123
123
|
guard let device = deviceManager.getDevice(message) else {
|
|
@@ -130,7 +130,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
130
130
|
} else {
|
|
131
131
|
call.reject(message)
|
|
132
132
|
}
|
|
133
|
-
}, {(_, _, _)
|
|
133
|
+
}, {(_, _, _) in
|
|
134
134
|
|
|
135
135
|
}
|
|
136
136
|
)
|
|
@@ -150,13 +150,13 @@ public class BluetoothLe: CAPPlugin {
|
|
|
150
150
|
namePrefix,
|
|
151
151
|
allowDuplicates,
|
|
152
152
|
false,
|
|
153
|
-
nil, {(success, message)
|
|
153
|
+
nil, {(success, message) in
|
|
154
154
|
if success {
|
|
155
155
|
call.resolve()
|
|
156
156
|
} else {
|
|
157
157
|
call.reject(message)
|
|
158
158
|
}
|
|
159
|
-
}, {(device, advertisementData, rssi)
|
|
159
|
+
}, {(device, advertisementData, rssi) in
|
|
160
160
|
self.deviceMap[device.getId()] = device
|
|
161
161
|
let data = self.getScanResult(device, advertisementData, rssi)
|
|
162
162
|
self.notifyListeners("onScanResult", data: data)
|
|
@@ -218,7 +218,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
218
218
|
guard self.getDeviceManager(call) != nil else { return }
|
|
219
219
|
guard let device = self.getDevice(call, checkConnection: false) else { return }
|
|
220
220
|
let timeout = self.getTimeout(call, defaultTimeout: CONNECTION_TIMEOUT)
|
|
221
|
-
device.setOnConnected(timeout, {(success, message)
|
|
221
|
+
device.setOnConnected(timeout, {(success, message) in
|
|
222
222
|
if success {
|
|
223
223
|
// only resolve after service discovery
|
|
224
224
|
call.resolve()
|
|
@@ -226,11 +226,11 @@ public class BluetoothLe: CAPPlugin {
|
|
|
226
226
|
call.reject(message)
|
|
227
227
|
}
|
|
228
228
|
})
|
|
229
|
-
self.deviceManager?.setOnDisconnected(device, {(_, _)
|
|
229
|
+
self.deviceManager?.setOnDisconnected(device, {(_, _) in
|
|
230
230
|
let key = "disconnected|\(device.getId())"
|
|
231
231
|
self.notifyListeners(key, data: nil)
|
|
232
232
|
})
|
|
233
|
-
self.deviceManager?.connect(device, timeout, {(success, message)
|
|
233
|
+
self.deviceManager?.connect(device, timeout, {(success, message) in
|
|
234
234
|
if success {
|
|
235
235
|
log("Connected to peripheral. Waiting for service discovery.")
|
|
236
236
|
} else {
|
|
@@ -252,7 +252,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
252
252
|
guard self.getDeviceManager(call) != nil else { return }
|
|
253
253
|
guard let device = self.getDevice(call, checkConnection: false) else { return }
|
|
254
254
|
let timeout = self.getTimeout(call)
|
|
255
|
-
self.deviceManager?.disconnect(device, timeout, {(success, message)
|
|
255
|
+
self.deviceManager?.disconnect(device, timeout, {(success, message) in
|
|
256
256
|
if success {
|
|
257
257
|
call.resolve()
|
|
258
258
|
} else {
|
|
@@ -308,7 +308,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
308
308
|
guard self.getDeviceManager(call) != nil else { return }
|
|
309
309
|
guard let device = self.getDevice(call) else { return }
|
|
310
310
|
let timeout = self.getTimeout(call)
|
|
311
|
-
device.discoverServices(timeout, {(success, value)
|
|
311
|
+
device.discoverServices(timeout, {(success, value) in
|
|
312
312
|
if success {
|
|
313
313
|
call.resolve()
|
|
314
314
|
} else {
|
|
@@ -333,7 +333,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
333
333
|
guard self.getDeviceManager(call) != nil else { return }
|
|
334
334
|
guard let device = self.getDevice(call) else { return }
|
|
335
335
|
let timeout = self.getTimeout(call)
|
|
336
|
-
device.readRssi(timeout, {(success, value)
|
|
336
|
+
device.readRssi(timeout, {(success, value) in
|
|
337
337
|
if success {
|
|
338
338
|
call.resolve([
|
|
339
339
|
"value": value
|
|
@@ -349,7 +349,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
349
349
|
guard let device = self.getDevice(call) else { return }
|
|
350
350
|
guard let characteristic = self.getCharacteristic(call) else { return }
|
|
351
351
|
let timeout = self.getTimeout(call)
|
|
352
|
-
device.read(characteristic.0, characteristic.1, timeout, {(success, value)
|
|
352
|
+
device.read(characteristic.0, characteristic.1, timeout, {(success, value) in
|
|
353
353
|
if success {
|
|
354
354
|
call.resolve([
|
|
355
355
|
"value": value
|
|
@@ -375,7 +375,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
375
375
|
characteristic.1,
|
|
376
376
|
value,
|
|
377
377
|
writeType,
|
|
378
|
-
timeout, {(success, value)
|
|
378
|
+
timeout, {(success, value) in
|
|
379
379
|
if success {
|
|
380
380
|
call.resolve()
|
|
381
381
|
} else {
|
|
@@ -399,7 +399,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
399
399
|
characteristic.1,
|
|
400
400
|
value,
|
|
401
401
|
writeType,
|
|
402
|
-
timeout, {(success, value)
|
|
402
|
+
timeout, {(success, value) in
|
|
403
403
|
if success {
|
|
404
404
|
call.resolve()
|
|
405
405
|
} else {
|
|
@@ -417,7 +417,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
417
417
|
descriptor.0,
|
|
418
418
|
descriptor.1,
|
|
419
419
|
descriptor.2,
|
|
420
|
-
timeout, {(success, value)
|
|
420
|
+
timeout, {(success, value) in
|
|
421
421
|
if success {
|
|
422
422
|
call.resolve([
|
|
423
423
|
"value": value
|
|
@@ -442,7 +442,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
442
442
|
descriptor.1,
|
|
443
443
|
descriptor.2,
|
|
444
444
|
value,
|
|
445
|
-
timeout, {(success, value)
|
|
445
|
+
timeout, {(success, value) in
|
|
446
446
|
if success {
|
|
447
447
|
call.resolve()
|
|
448
448
|
} else {
|
|
@@ -459,11 +459,11 @@ public class BluetoothLe: CAPPlugin {
|
|
|
459
459
|
device.setNotifications(
|
|
460
460
|
characteristic.0,
|
|
461
461
|
characteristic.1,
|
|
462
|
-
true, {(_, value)
|
|
462
|
+
true, {(_, value) in
|
|
463
463
|
let key = "notification|\(device.getId())|\(characteristic.0.uuidString.lowercased())|\(characteristic.1.uuidString.lowercased())"
|
|
464
464
|
self.notifyListeners(key, data: ["value": value])
|
|
465
465
|
},
|
|
466
|
-
timeout, {(success, value)
|
|
466
|
+
timeout, {(success, value) in
|
|
467
467
|
if success {
|
|
468
468
|
call.resolve()
|
|
469
469
|
} else {
|
|
@@ -482,7 +482,7 @@ public class BluetoothLe: CAPPlugin {
|
|
|
482
482
|
characteristic.1,
|
|
483
483
|
false,
|
|
484
484
|
nil,
|
|
485
|
-
timeout, {(success, value)
|
|
485
|
+
timeout, {(success, value) in
|
|
486
486
|
if success {
|
|
487
487
|
call.resolve()
|
|
488
488
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor-community/bluetooth-le",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Capacitor plugin for Bluetooth Low Energy ",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -43,11 +43,10 @@
|
|
|
43
43
|
"@capacitor/core": "^6.0.0",
|
|
44
44
|
"@capacitor/docgen": "0.2.0",
|
|
45
45
|
"@capacitor/ios": "^6.0.0",
|
|
46
|
-
"@ionic/eslint-config": "^0.
|
|
46
|
+
"@ionic/eslint-config": "^0.4.0",
|
|
47
47
|
"@ionic/prettier-config": "^2.0.0",
|
|
48
48
|
"@ionic/swiftlint-config": "^1.1.2",
|
|
49
49
|
"@types/jest": "^29.2.5",
|
|
50
|
-
"@typescript-eslint/eslint-plugin": "^5.47.1",
|
|
51
50
|
"eslint": "^8.31.0",
|
|
52
51
|
"jest": "^29.3.1",
|
|
53
52
|
"jest-environment-jsdom": "^29.3.1",
|