@onekeyfe/hd-transport-electron 1.2.0-alpha.45 → 1.2.0-alpha.46
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.
|
@@ -32,7 +32,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
32
32
|
|
|
33
33
|
function initNobleBleSupport(webContents) {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
const { setupNobleBleHandlers } = yield Promise.resolve().then(function () { return require('./noble-ble-handler-
|
|
35
|
+
const { setupNobleBleHandlers } = yield Promise.resolve().then(function () { return require('./noble-ble-handler-00f59305.js'); });
|
|
36
36
|
setupNobleBleHandlers(webContents);
|
|
37
37
|
});
|
|
38
38
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-19749ecc.js');
|
|
4
4
|
var hdShared = require('@onekeyfe/hd-shared');
|
|
5
5
|
var pRetry = require('p-retry');
|
|
6
6
|
|
|
@@ -100,10 +100,10 @@ const ONEKEY_SERVICE_UUID_ALIASES = hdShared.createKnownBleUuidAliases(hdShared.
|
|
|
100
100
|
const ONEKEY_WRITE_UUID_ALIASES = hdShared.createKnownBleUuidAliases(hdShared.ONEKEY_WRITE_CHARACTERISTIC_UUID);
|
|
101
101
|
const ONEKEY_NOTIFY_UUID_ALIASES = hdShared.createKnownBleUuidAliases(hdShared.ONEKEY_NOTIFY_CHARACTERISTIC_UUID);
|
|
102
102
|
const BLUETOOTH_INIT_TIMEOUT = 10000;
|
|
103
|
-
const DEVICE_SCAN_TIMEOUT =
|
|
104
|
-
const FAST_SCAN_TIMEOUT =
|
|
103
|
+
const DEVICE_SCAN_TIMEOUT = 5000;
|
|
104
|
+
const FAST_SCAN_TIMEOUT = 1500;
|
|
105
105
|
const DEVICE_CHECK_INTERVAL = 500;
|
|
106
|
-
const CONNECTION_TIMEOUT =
|
|
106
|
+
const CONNECTION_TIMEOUT = 3000;
|
|
107
107
|
const SERVICE_DISCOVERY_TIMEOUT = 10000;
|
|
108
108
|
const BLE_CLEANUP_TIMEOUT = 250;
|
|
109
109
|
const BLE_PACKET_SIZE = 192;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-transport-electron",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.46",
|
|
4
4
|
"author": "OneKey",
|
|
5
5
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"electron-log": ">=4.0.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@onekeyfe/hd-core": "1.2.0-alpha.
|
|
29
|
-
"@onekeyfe/hd-shared": "1.2.0-alpha.
|
|
30
|
-
"@onekeyfe/hd-transport": "1.2.0-alpha.
|
|
28
|
+
"@onekeyfe/hd-core": "1.2.0-alpha.46",
|
|
29
|
+
"@onekeyfe/hd-shared": "1.2.0-alpha.46",
|
|
30
|
+
"@onekeyfe/hd-transport": "1.2.0-alpha.46",
|
|
31
31
|
"@stoprocent/noble": "2.3.16",
|
|
32
32
|
"p-retry": "^4.6.2"
|
|
33
33
|
},
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"electron": "^25.0.0",
|
|
37
37
|
"typescript": "^5.3.3"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "23bc93ba87e4f8557380c636b308aea06f569ae2"
|
|
40
40
|
}
|
package/src/noble-ble-handler.ts
CHANGED
|
@@ -75,10 +75,10 @@ const ONEKEY_NOTIFY_UUID_ALIASES = createKnownBleUuidAliases(ONEKEY_NOTIFY_CHARA
|
|
|
75
75
|
|
|
76
76
|
// Timeout and interval constants
|
|
77
77
|
const BLUETOOTH_INIT_TIMEOUT = 10000; // 10 seconds for Bluetooth initialization
|
|
78
|
-
const DEVICE_SCAN_TIMEOUT =
|
|
79
|
-
const FAST_SCAN_TIMEOUT =
|
|
78
|
+
const DEVICE_SCAN_TIMEOUT = 5000; // 5 seconds for device scanning
|
|
79
|
+
const FAST_SCAN_TIMEOUT = 1500; // 1.5 seconds for targeted scanning
|
|
80
80
|
const DEVICE_CHECK_INTERVAL = 500; // 500ms interval for periodic device checks
|
|
81
|
-
const CONNECTION_TIMEOUT =
|
|
81
|
+
const CONNECTION_TIMEOUT = 3000; // 3 seconds for device connection
|
|
82
82
|
const SERVICE_DISCOVERY_TIMEOUT = 10000; // 10 seconds for service discovery
|
|
83
83
|
const BLE_CLEANUP_TIMEOUT = 250;
|
|
84
84
|
|