@onekeyfe/hd-core 1.1.26-alpha.2 → 1.1.26-alpha.30
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/__tests__/protocol-v2.test.ts +912 -0
- package/dist/api/DirList.d.ts +10 -0
- package/dist/api/DirList.d.ts.map +1 -0
- package/dist/api/DirMake.d.ts +9 -0
- package/dist/api/DirMake.d.ts.map +1 -0
- package/dist/api/DirRemove.d.ts +9 -0
- package/dist/api/DirRemove.d.ts.map +1 -0
- package/dist/api/FileDelete.d.ts +9 -0
- package/dist/api/FileDelete.d.ts.map +1 -0
- package/dist/api/FileRead.d.ts +19 -0
- package/dist/api/FileRead.d.ts.map +1 -0
- package/dist/api/FileWrite.d.ts +23 -0
- package/dist/api/FileWrite.d.ts.map +1 -0
- package/dist/api/FirmwareUpdateV3.d.ts +1 -0
- package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV4.d.ts +32 -0
- package/dist/api/FirmwareUpdateV4.d.ts.map +1 -0
- package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
- package/dist/api/PathInfo.d.ts +9 -0
- package/dist/api/PathInfo.d.ts.map +1 -0
- package/dist/api/SearchDevices.d.ts +2 -1
- package/dist/api/SearchDevices.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignTransaction.d.ts +1 -1
- package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBoardloader.d.ts +1 -1
- package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +10 -2
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
- package/dist/api/index.d.ts +27 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/protocol-v2/DevFirmwareUpdate.d.ts +7 -0
- package/dist/api/protocol-v2/DevFirmwareUpdate.d.ts.map +1 -0
- package/dist/api/protocol-v2/DevGetDeviceInfo.d.ts +7 -0
- package/dist/api/protocol-v2/DevGetDeviceInfo.d.ts.map +1 -0
- package/dist/api/protocol-v2/DevGetFirmwareUpdateStatus.d.ts +6 -0
- package/dist/api/protocol-v2/DevGetFirmwareUpdateStatus.d.ts.map +1 -0
- package/dist/api/protocol-v2/DevGetOnboardingStatus.d.ts +6 -0
- package/dist/api/protocol-v2/DevGetOnboardingStatus.d.ts.map +1 -0
- package/dist/api/protocol-v2/DevReboot.d.ts +7 -0
- package/dist/api/protocol-v2/DevReboot.d.ts.map +1 -0
- package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts +7 -0
- package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts.map +1 -0
- package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts +6 -0
- package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts.map +1 -0
- package/dist/api/protocol-v2/FilesystemFixPermission.d.ts +6 -0
- package/dist/api/protocol-v2/FilesystemFixPermission.d.ts.map +1 -0
- package/dist/api/protocol-v2/FilesystemFormat.d.ts +6 -0
- package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +1 -0
- package/dist/api/protocol-v2/GetProtoVersion.d.ts +6 -0
- package/dist/api/protocol-v2/GetProtoVersion.d.ts.map +1 -0
- package/dist/api/protocol-v2/Ping.d.ts +8 -0
- package/dist/api/protocol-v2/Ping.d.ts.map +1 -0
- package/dist/api/protocol-v2/helpers.d.ts +49 -0
- package/dist/api/protocol-v2/helpers.d.ts.map +1 -0
- package/dist/api/ton/TonSignData.d.ts +7 -0
- package/dist/api/ton/TonSignData.d.ts.map +1 -0
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/data-manager/DataManager.d.ts +4 -2
- package/dist/data-manager/DataManager.d.ts.map +1 -1
- package/dist/data-manager/TransportManager.d.ts +2 -1
- package/dist/data-manager/TransportManager.d.ts.map +1 -1
- package/dist/device/Device.d.ts +5 -3
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/device/DeviceCommands.d.ts +12 -12
- package/dist/device/DeviceCommands.d.ts.map +1 -1
- package/dist/device/DeviceConnector.d.ts +2 -1
- package/dist/device/DeviceConnector.d.ts.map +1 -1
- package/dist/events/ui-request.d.ts +8 -0
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/index.d.ts +207 -23
- package/dist/index.js +2815 -182
- package/dist/inject.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/features.d.ts +56 -0
- package/dist/protocols/protocol-v2/features.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/firmware.d.ts +12 -0
- package/dist/protocols/protocol-v2/firmware.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/index.d.ts +3 -0
- package/dist/protocols/protocol-v2/index.d.ts.map +1 -0
- package/dist/types/api/export.d.ts +2 -1
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdate.d.ts +7 -0
- package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +30 -1
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/protocolV2.d.ts +123 -0
- package/dist/types/api/protocolV2.d.ts.map +1 -0
- package/dist/types/api/searchDevices.d.ts +2 -2
- package/dist/types/api/searchDevices.d.ts.map +1 -1
- package/dist/types/api/tonSignData.d.ts +18 -0
- package/dist/types/api/tonSignData.d.ts.map +1 -0
- package/dist/types/device.d.ts +1 -1
- package/dist/types/device.d.ts.map +1 -1
- package/dist/types/params.d.ts +2 -0
- package/dist/types/params.d.ts.map +1 -1
- package/dist/types/settings.d.ts +1 -1
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/patch.d.ts.map +1 -1
- package/dist/utils/versionUtils.d.ts +1 -1
- package/package.json +5 -5
- package/src/api/DirList.ts +25 -0
- package/src/api/DirMake.ts +20 -0
- package/src/api/DirRemove.ts +20 -0
- package/src/api/FileDelete.ts +20 -0
- package/src/api/FileRead.ts +161 -0
- package/src/api/FileWrite.ts +191 -0
- package/src/api/FirmwareUpdateV3.ts +21 -4
- package/src/api/FirmwareUpdateV4.ts +810 -0
- package/src/api/GetOnekeyFeatures.ts +75 -3
- package/src/api/PathInfo.ts +24 -0
- package/src/api/SearchDevices.ts +7 -2
- package/src/api/alephium/AlephiumSignTransaction.ts +6 -5
- package/src/api/device/DeviceRebootToBoardloader.ts +10 -1
- package/src/api/device/DeviceRebootToBootloader.ts +10 -1
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +27 -4
- package/src/api/index.ts +29 -0
- package/src/api/protocol-v2/DevFirmwareUpdate.ts +33 -0
- package/src/api/protocol-v2/DevGetDeviceInfo.ts +35 -0
- package/src/api/protocol-v2/DevGetFirmwareUpdateStatus.ts +18 -0
- package/src/api/protocol-v2/DevGetOnboardingStatus.ts +18 -0
- package/src/api/protocol-v2/DevReboot.ts +22 -0
- package/src/api/protocol-v2/FactoryDeviceInfoSettings.ts +27 -0
- package/src/api/protocol-v2/FactoryGetDeviceInfo.ts +18 -0
- package/src/api/protocol-v2/FilesystemFixPermission.ts +14 -0
- package/src/api/protocol-v2/FilesystemFormat.ts +14 -0
- package/src/api/protocol-v2/GetProtoVersion.ts +14 -0
- package/src/api/protocol-v2/Ping.ts +16 -0
- package/src/api/protocol-v2/helpers.ts +140 -0
- package/src/api/ton/TonSignData.ts +60 -0
- package/src/constants/index.ts +1 -1
- package/src/core/index.ts +19 -2
- package/src/data/messages/messages-pro2.json +733 -0
- package/src/data/messages/messages.json +98 -0
- package/src/data-manager/DataManager.ts +6 -2
- package/src/data-manager/TransportManager.ts +29 -3
- package/src/device/Device.ts +66 -8
- package/src/device/DeviceCommands.ts +160 -26
- package/src/device/DeviceConnector.ts +29 -4
- package/src/device/DevicePool.ts +1 -1
- package/src/events/ui-request.ts +8 -0
- package/src/inject.ts +45 -1
- package/src/protocols/protocol-v2/features.ts +259 -0
- package/src/protocols/protocol-v2/firmware.ts +26 -0
- package/src/protocols/protocol-v2/index.ts +2 -0
- package/src/types/api/export.ts +2 -0
- package/src/types/api/firmwareUpdate.ts +12 -0
- package/src/types/api/index.ts +65 -1
- package/src/types/api/protocolV2.ts +221 -0
- package/src/types/api/searchDevices.ts +2 -2
- package/src/types/api/tonSignData.ts +29 -0
- package/src/types/device.ts +3 -1
- package/src/types/params.ts +7 -0
- package/src/types/settings.ts +1 -1
- package/src/utils/deviceInfoUtils.ts +9 -5
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { DevRebootType } from '@onekeyfe/hd-transport';
|
|
2
|
+
|
|
3
|
+
import type {
|
|
4
|
+
DevFirmwareTarget,
|
|
5
|
+
DevFirmwareTargetType,
|
|
6
|
+
DevInfoTargets,
|
|
7
|
+
DevInfoTypes,
|
|
8
|
+
TransportCallOptions,
|
|
9
|
+
} from '@onekeyfe/hd-transport';
|
|
10
|
+
|
|
11
|
+
export type RebootTypeInput = DevRebootType | keyof typeof DevRebootType | string | number;
|
|
12
|
+
|
|
13
|
+
export type DevRebootParams = {
|
|
14
|
+
rebootType?: RebootTypeInput;
|
|
15
|
+
reboot_type?: RebootTypeInput;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type DevGetDeviceInfoParams = {
|
|
19
|
+
targets?: DevInfoTargets;
|
|
20
|
+
types?: DevInfoTypes;
|
|
21
|
+
targetHw?: boolean;
|
|
22
|
+
targetFw?: boolean;
|
|
23
|
+
targetBt?: boolean;
|
|
24
|
+
targetSe1?: boolean;
|
|
25
|
+
targetSe2?: boolean;
|
|
26
|
+
targetSe3?: boolean;
|
|
27
|
+
targetSe4?: boolean;
|
|
28
|
+
targetStatus?: boolean;
|
|
29
|
+
includeVersion?: boolean;
|
|
30
|
+
includeBuildId?: boolean;
|
|
31
|
+
includeHash?: boolean;
|
|
32
|
+
includeSpecific?: boolean;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type DevFirmwareTargetInput =
|
|
36
|
+
| DevFirmwareTarget
|
|
37
|
+
| {
|
|
38
|
+
targetId?: DevFirmwareTargetType | string | number;
|
|
39
|
+
target_id?: DevFirmwareTargetType | string | number;
|
|
40
|
+
path: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export type DevFirmwareUpdateParams = {
|
|
44
|
+
targets?: DevFirmwareTargetInput[];
|
|
45
|
+
targetId?: DevFirmwareTargetType | string | number;
|
|
46
|
+
target_id?: DevFirmwareTargetType | string | number;
|
|
47
|
+
path?: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type FactoryDeviceInfoSettingsParams = {
|
|
51
|
+
serial_no?: string;
|
|
52
|
+
serialNo?: string;
|
|
53
|
+
cpu_info?: string;
|
|
54
|
+
cpuInfo?: string;
|
|
55
|
+
pre_firmware?: string;
|
|
56
|
+
preFirmware?: string;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const DEV_REBOOT_TYPES: Record<string, DevRebootType> = {
|
|
60
|
+
Normal: DevRebootType.Normal,
|
|
61
|
+
normal: DevRebootType.Normal,
|
|
62
|
+
Boardloader: DevRebootType.Boardloader,
|
|
63
|
+
boardloader: DevRebootType.Boardloader,
|
|
64
|
+
Bootloader: DevRebootType.Bootloader,
|
|
65
|
+
bootloader: DevRebootType.Bootloader,
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const PROTOCOL_V2_FIRMWARE_UPDATE_OPTIONS: TransportCallOptions = {
|
|
69
|
+
intermediateTypes: ['DevFirmwareInstallProgress'],
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const PROTOCOL_V2_FIRMWARE_UPDATE_RESPONSE_TYPES: (
|
|
73
|
+
| 'Success'
|
|
74
|
+
| 'DevFirmwareUpdateStatus'
|
|
75
|
+
)[] = ['Success', 'DevFirmwareUpdateStatus'];
|
|
76
|
+
|
|
77
|
+
export function normalizeRebootType(value: RebootTypeInput | undefined): DevRebootType {
|
|
78
|
+
if (typeof value === 'number') return value;
|
|
79
|
+
if (typeof value === 'string') {
|
|
80
|
+
const numeric = Number(value);
|
|
81
|
+
if (Number.isFinite(numeric)) return numeric;
|
|
82
|
+
if (value in DEV_REBOOT_TYPES) return DEV_REBOOT_TYPES[value];
|
|
83
|
+
}
|
|
84
|
+
return DevRebootType.Normal;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function normalizeTargetId(
|
|
88
|
+
value: DevFirmwareTargetType | string | number | undefined
|
|
89
|
+
): DevFirmwareTargetType {
|
|
90
|
+
if (typeof value === 'number') return value;
|
|
91
|
+
const numeric = Number(value);
|
|
92
|
+
if (Number.isFinite(numeric)) return numeric;
|
|
93
|
+
return 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function normalizeFirmwareTargets(params: DevFirmwareUpdateParams): DevFirmwareTarget[] {
|
|
97
|
+
const targets =
|
|
98
|
+
params.targets ??
|
|
99
|
+
(params.path
|
|
100
|
+
? [
|
|
101
|
+
{
|
|
102
|
+
target_id: params.target_id ?? params.targetId ?? 0,
|
|
103
|
+
path: params.path,
|
|
104
|
+
},
|
|
105
|
+
]
|
|
106
|
+
: []);
|
|
107
|
+
|
|
108
|
+
return targets.map(target => ({
|
|
109
|
+
target_id: normalizeTargetId('target_id' in target ? target.target_id : target.targetId),
|
|
110
|
+
path: target.path,
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function buildTargets(params: DevGetDeviceInfoParams): DevInfoTargets | undefined {
|
|
115
|
+
if (params.targets) return params.targets;
|
|
116
|
+
|
|
117
|
+
const targets: DevInfoTargets = {
|
|
118
|
+
hw: params.targetHw,
|
|
119
|
+
fw: params.targetFw,
|
|
120
|
+
bt: params.targetBt,
|
|
121
|
+
se1: params.targetSe1,
|
|
122
|
+
se2: params.targetSe2,
|
|
123
|
+
se3: params.targetSe3,
|
|
124
|
+
se4: params.targetSe4,
|
|
125
|
+
status: params.targetStatus,
|
|
126
|
+
};
|
|
127
|
+
return Object.values(targets).some(value => value !== undefined) ? targets : undefined;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function buildTypes(params: DevGetDeviceInfoParams): DevInfoTypes | undefined {
|
|
131
|
+
if (params.types) return params.types;
|
|
132
|
+
|
|
133
|
+
const types: DevInfoTypes = {
|
|
134
|
+
version: params.includeVersion,
|
|
135
|
+
build_id: params.includeBuildId,
|
|
136
|
+
hash: params.includeHash,
|
|
137
|
+
specific: params.includeSpecific,
|
|
138
|
+
};
|
|
139
|
+
return Object.values(types).some(value => value !== undefined) ? types : undefined;
|
|
140
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
2
|
+
import { validatePath } from '../helpers/pathUtils';
|
|
3
|
+
import { BaseMethod } from '../BaseMethod';
|
|
4
|
+
import { validateParams } from '../helpers/paramsValidator';
|
|
5
|
+
import { formatAnyHex } from '../helpers/hexUtils';
|
|
6
|
+
|
|
7
|
+
import type { TonSignData as HardwareTonSignData } from '@onekeyfe/hd-transport';
|
|
8
|
+
import type { TonSignDataParams } from '../../types/api/tonSignData';
|
|
9
|
+
|
|
10
|
+
export default class TonSignData extends BaseMethod<HardwareTonSignData> {
|
|
11
|
+
init() {
|
|
12
|
+
// Keep strict-check off until the firmware release that ships TonSignData
|
|
13
|
+
// is decided — we don't yet know the min versions for touch/classic1s.
|
|
14
|
+
// Flip back to true and add getVersionRange() once those numbers land.
|
|
15
|
+
this.strictCheckDeviceSupport = false;
|
|
16
|
+
this.checkDeviceId = true;
|
|
17
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
|
|
18
|
+
|
|
19
|
+
validateParams(this.payload, [
|
|
20
|
+
{ name: 'path', required: true },
|
|
21
|
+
{ name: 'type', type: 'number', required: true },
|
|
22
|
+
{ name: 'payload', type: 'hexString', required: true },
|
|
23
|
+
{ name: 'schema', type: 'string' },
|
|
24
|
+
{ name: 'appdomain', type: 'string', required: true },
|
|
25
|
+
{ name: 'timestamp', required: true },
|
|
26
|
+
{ name: 'fromAddress', type: 'string' },
|
|
27
|
+
{ name: 'walletVersion' },
|
|
28
|
+
{ name: 'walletId', type: 'number' },
|
|
29
|
+
{ name: 'workchain' },
|
|
30
|
+
{ name: 'isBounceable', type: 'boolean' },
|
|
31
|
+
{ name: 'isTestnetOnly', type: 'boolean' },
|
|
32
|
+
]);
|
|
33
|
+
|
|
34
|
+
const { path } = this.payload as TonSignDataParams;
|
|
35
|
+
const addressN = validatePath(path, 3);
|
|
36
|
+
|
|
37
|
+
this.params = {
|
|
38
|
+
address_n: addressN,
|
|
39
|
+
type: this.payload.type,
|
|
40
|
+
payload: formatAnyHex(this.payload.payload),
|
|
41
|
+
schema: this.payload.schema,
|
|
42
|
+
appdomain: this.payload.appdomain,
|
|
43
|
+
timestamp: this.payload.timestamp,
|
|
44
|
+
from_address: this.payload.fromAddress,
|
|
45
|
+
wallet_version: this.payload.walletVersion,
|
|
46
|
+
wallet_id: this.payload.walletId,
|
|
47
|
+
workchain: this.payload.workchain,
|
|
48
|
+
is_bounceable: this.payload.isBounceable,
|
|
49
|
+
is_testnet_only: this.payload.isTestnetOnly,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async run() {
|
|
54
|
+
const res = await this.device.commands.typedCall('TonSignData', 'TonSignedData', {
|
|
55
|
+
...this.params,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
return Promise.resolve(res.message);
|
|
59
|
+
}
|
|
60
|
+
}
|
package/src/constants/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { safeThrowError } from './errors';
|
|
2
|
-
export { Messages as PROTO } from '@onekeyfe/hd-transport';
|
|
2
|
+
export { Messages as PROTO, TonSignDataType } from '@onekeyfe/hd-transport';
|
package/src/core/index.ts
CHANGED
|
@@ -95,6 +95,7 @@ const parseInitOptions = (method?: BaseMethod): InitOptions => ({
|
|
|
95
95
|
passphraseState: method?.payload.passphraseState,
|
|
96
96
|
deviceId: method?.payload.deviceId,
|
|
97
97
|
deriveCardano: method && hasDeriveCardano(method),
|
|
98
|
+
connectProtocol: method?.payload.connectProtocol,
|
|
98
99
|
});
|
|
99
100
|
|
|
100
101
|
let _core: Core;
|
|
@@ -648,6 +649,7 @@ function initDevice(method: BaseMethod) {
|
|
|
648
649
|
} else if (allDevices.length > 1) {
|
|
649
650
|
throw ERRORS.TypedError(
|
|
650
651
|
[
|
|
652
|
+
'firmwareUpdateV4',
|
|
651
653
|
'firmwareUpdateV3',
|
|
652
654
|
'firmwareUpdateV2',
|
|
653
655
|
'checkFirmwareRelease',
|
|
@@ -702,15 +704,30 @@ function initDeviceForBle(method: BaseMethod) {
|
|
|
702
704
|
*/
|
|
703
705
|
let bleTimeoutRetry = 0;
|
|
704
706
|
|
|
707
|
+
function isRetryableBleProtocolV2ProbeError(method: BaseMethod, error: unknown) {
|
|
708
|
+
const message = error instanceof Error ? error.message : String(error ?? '');
|
|
709
|
+
return (
|
|
710
|
+
method.payload.connectProtocol === 'V2' &&
|
|
711
|
+
message.includes('Device protocol mismatch') &&
|
|
712
|
+
message.includes('expected V2') &&
|
|
713
|
+
message.includes('did not respond to expected protocol')
|
|
714
|
+
);
|
|
715
|
+
}
|
|
716
|
+
|
|
705
717
|
async function connectDeviceForBle(method: BaseMethod, device: Device) {
|
|
706
718
|
try {
|
|
707
|
-
await device.acquire();
|
|
719
|
+
await device.acquire(method.payload.connectProtocol);
|
|
708
720
|
if (method.payload?.onlyConnectBleDevice) {
|
|
709
721
|
return;
|
|
710
722
|
}
|
|
711
723
|
await device.initialize(parseInitOptions(method));
|
|
712
724
|
} catch (err) {
|
|
713
|
-
if (
|
|
725
|
+
if (
|
|
726
|
+
(err.errorCode === HardwareErrorCode.BleTimeoutError ||
|
|
727
|
+
err.errorCode === HardwareErrorCode.BleConnectedError ||
|
|
728
|
+
isRetryableBleProtocolV2ProbeError(method, err)) &&
|
|
729
|
+
bleTimeoutRetry <= 5
|
|
730
|
+
) {
|
|
714
731
|
bleTimeoutRetry += 1;
|
|
715
732
|
Log.debug(`Bletooth connect timeout and will retry, retry count: ${bleTimeoutRetry}`);
|
|
716
733
|
await wait(3000);
|