brilliantsole 0.0.45 → 0.0.48
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/build/brilliantsole.cjs +21 -2
- package/build/brilliantsole.cjs.map +1 -1
- package/build/brilliantsole.module.d.ts +20 -20
- package/build/brilliantsole.module.min.d.ts +20 -20
- package/build/brilliantsole.node.module.d.ts +12 -12
- package/build/brilliantsole.node.module.js +21 -2
- package/build/brilliantsole.node.module.js.map +1 -1
- package/package.json +1 -1
- package/src/connection/bluetooth/NobleConnectionManager.ts +26 -3
|
@@ -12,8 +12,8 @@ import 'svgson';
|
|
|
12
12
|
import 'svg-pathdata';
|
|
13
13
|
import * as webbluetooth from 'webbluetooth';
|
|
14
14
|
import * as dgram from 'dgram';
|
|
15
|
-
import noble from '@abandonware/noble';
|
|
16
15
|
import os from 'os';
|
|
16
|
+
import noble from '@abandonware/noble';
|
|
17
17
|
|
|
18
18
|
const isInProduction = "__BRILLIANTSOLE__PROD__" == "__BRILLIANTSOLE__PROD__";
|
|
19
19
|
const isInDev = "__BRILLIANTSOLE__PROD__" == "__BRILLIANTSOLE__DEV__";
|
|
@@ -13468,6 +13468,9 @@ class BaseScanner {
|
|
|
13468
13468
|
_a$1 = BaseScanner;
|
|
13469
13469
|
|
|
13470
13470
|
const _console$6 = createConsole("NobleConnectionManager", { log: false });
|
|
13471
|
+
let filterUUIDs = true;
|
|
13472
|
+
const isLinux = os.platform() == "linux";
|
|
13473
|
+
filterUUIDs = !isLinux;
|
|
13471
13474
|
class NobleConnectionManager extends BluetoothConnectionManager {
|
|
13472
13475
|
get bluetoothId() {
|
|
13473
13476
|
return this.#noblePeripheral.id;
|
|
@@ -13559,7 +13562,15 @@ class NobleConnectionManager extends BluetoothConnectionManager {
|
|
|
13559
13562
|
async onNoblePeripheralConnect(noblePeripheral) {
|
|
13560
13563
|
_console$6.log("onNoblePeripheralConnect", noblePeripheral.id, noblePeripheral.state);
|
|
13561
13564
|
if (noblePeripheral.state == "connected") {
|
|
13562
|
-
|
|
13565
|
+
_console$6.log("discoverServicesAsync", noblePeripheral.id, {
|
|
13566
|
+
allServiceUUIDs,
|
|
13567
|
+
});
|
|
13568
|
+
if (filterUUIDs) {
|
|
13569
|
+
await this.#noblePeripheral.discoverServicesAsync(allServiceUUIDs);
|
|
13570
|
+
}
|
|
13571
|
+
else {
|
|
13572
|
+
await this.#noblePeripheral.discoverServicesAsync();
|
|
13573
|
+
}
|
|
13563
13574
|
}
|
|
13564
13575
|
await this.#onNoblePeripheralState();
|
|
13565
13576
|
}
|
|
@@ -13618,6 +13629,14 @@ class NobleConnectionManager extends BluetoothConnectionManager {
|
|
|
13618
13629
|
for (const index in services) {
|
|
13619
13630
|
const service = services[index];
|
|
13620
13631
|
_console$6.log("service", service.uuid);
|
|
13632
|
+
if (service.uuid == "1800") {
|
|
13633
|
+
_console$6.log("skipping 1800");
|
|
13634
|
+
continue;
|
|
13635
|
+
}
|
|
13636
|
+
if (service.uuid == "1801") {
|
|
13637
|
+
_console$6.log("skipping 1801");
|
|
13638
|
+
continue;
|
|
13639
|
+
}
|
|
13621
13640
|
const serviceName = getServiceNameFromUUID(service.uuid);
|
|
13622
13641
|
_console$6.assertWithError(serviceName, `no name found for service uuid "${service.uuid}"`);
|
|
13623
13642
|
_console$6.log({ serviceName });
|