@onekeyfe/hd-transport-react-native 1.2.8-alpha.115 → 1.2.8-alpha.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +319 -10
- package/package.json +5 -5
- package/src/__tests__/nativeFrameWrite.test.ts +917 -0
- package/src/__tests__/protocolV2Link.test.ts +103 -0
- package/src/index.ts +459 -17
package/dist/index.d.ts
CHANGED
|
@@ -67,12 +67,24 @@ declare const BLE_WRITE_TIMEOUT_MANAGER_RESET_THRESHOLD = 2;
|
|
|
67
67
|
type ProtocolV2BleTuning = {
|
|
68
68
|
iosPacketLength?: number;
|
|
69
69
|
androidPacketLength?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Write each multi-packet high-throughput frame with one native call when the native
|
|
72
|
+
* BLE module supports it. Defaults to true; false keeps the per-packet JS write loop.
|
|
73
|
+
*/
|
|
74
|
+
nativeFrameWrite?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Android CONNECTION_PRIORITY_HIGH around Protocol V2 high-throughput calls. 'auto' (the
|
|
77
|
+
* default) requests it below Android 17 only; true or false forces it on every version.
|
|
78
|
+
*/
|
|
79
|
+
androidHighConnectionPriority?: boolean | 'auto';
|
|
70
80
|
};
|
|
71
81
|
declare function configureProtocolV2BleTuning(tuning?: ProtocolV2BleTuning): void;
|
|
72
82
|
declare function resetProtocolV2BleTuning(): void;
|
|
73
83
|
declare function getProtocolV2BleTuning(): {
|
|
74
84
|
iosPacketLength: number;
|
|
75
85
|
androidPacketLength: number;
|
|
86
|
+
nativeFrameWrite: boolean;
|
|
87
|
+
androidHighConnectionPriority: boolean | "auto";
|
|
76
88
|
};
|
|
77
89
|
/**
|
|
78
90
|
* With no cached GATT table the stack runs its own discovery (up to ~8s) before the MTU
|
|
@@ -158,6 +170,10 @@ declare class ReactNativeBleTransport {
|
|
|
158
170
|
private protocolV2HighVolumeLogSignatures;
|
|
159
171
|
private androidHighPriorityDevices;
|
|
160
172
|
private androidPriorityResetTimers;
|
|
173
|
+
/** In-flight native frame write per device; Protocol V2 writes are serialized per device. */
|
|
174
|
+
private protocolV2FrameWrites;
|
|
175
|
+
private protocolV2FrameWriteCounter;
|
|
176
|
+
private protocolV2FileWritePerfs;
|
|
161
177
|
private nextMonitorToken;
|
|
162
178
|
/** Serializes transport lifecycle changes for the same physical device. */
|
|
163
179
|
private lifecycleOperations;
|
|
@@ -259,6 +275,21 @@ declare class ReactNativeBleTransport {
|
|
|
259
275
|
private readProtocolV2Frame;
|
|
260
276
|
private writeProtocolV2Packet;
|
|
261
277
|
private writeProtocolV2Frame;
|
|
278
|
+
/**
|
|
279
|
+
* The native frame write only replaces the per-packet loop where its JS<->native round trips
|
|
280
|
+
* dominate: multi-packet (checked by the caller) high-throughput frames written without response.
|
|
281
|
+
*/
|
|
282
|
+
private resolveProtocolV2NativeFrameWriter;
|
|
283
|
+
/**
|
|
284
|
+
* Writes one frame with a single native call that sends its packets in order without response.
|
|
285
|
+
* Nothing here retries it: a resend could duplicate bytes the device already received. The
|
|
286
|
+
* native transaction is cancelled on abort, watchdog expiry, generation change and link
|
|
287
|
+
* teardown so the native side stops writing a frame nobody waits for any more.
|
|
288
|
+
*/
|
|
289
|
+
private writeProtocolV2NativeFrame;
|
|
290
|
+
/** Stops the native frame write in flight on `uuid`, optionally only one of `generation`. */
|
|
291
|
+
private cancelProtocolV2FrameWrite;
|
|
292
|
+
private cancelNativeTransaction;
|
|
262
293
|
private callProtocolV2;
|
|
263
294
|
private ensureProtocolV2HighThroughputMtu;
|
|
264
295
|
private clearAndroidPriorityResetTimer;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAGL,UAAU,IAAI,aAAa,EAG5B,MAAM,sBAAsB,CAAC;AAE9B,OA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D"}
|
package/dist/index.js
CHANGED
|
@@ -400,6 +400,8 @@ const ANDROID_NOTIFY_READY_DELAY_MS = 300;
|
|
|
400
400
|
const DEFAULT_PROTOCOL_V2_BLE_TUNING = {
|
|
401
401
|
iosPacketLength: IOS_PROTOCOL_V2_PACKET_LENGTH,
|
|
402
402
|
androidPacketLength: ANDROID_PROTOCOL_V2_PACKET_LENGTH,
|
|
403
|
+
nativeFrameWrite: true,
|
|
404
|
+
androidHighConnectionPriority: 'auto',
|
|
403
405
|
};
|
|
404
406
|
let protocolV2BleTuning = Object.assign({}, DEFAULT_PROTOCOL_V2_BLE_TUNING);
|
|
405
407
|
const normalizePositiveInteger = (value, fallback) => {
|
|
@@ -412,6 +414,13 @@ function configureProtocolV2BleTuning(tuning = {}) {
|
|
|
412
414
|
protocolV2BleTuning = {
|
|
413
415
|
iosPacketLength: normalizePositiveInteger(tuning.iosPacketLength, protocolV2BleTuning.iosPacketLength),
|
|
414
416
|
androidPacketLength: normalizePositiveInteger(tuning.androidPacketLength, protocolV2BleTuning.androidPacketLength),
|
|
417
|
+
nativeFrameWrite: typeof tuning.nativeFrameWrite === 'boolean'
|
|
418
|
+
? tuning.nativeFrameWrite
|
|
419
|
+
: protocolV2BleTuning.nativeFrameWrite,
|
|
420
|
+
androidHighConnectionPriority: typeof tuning.androidHighConnectionPriority === 'boolean' ||
|
|
421
|
+
tuning.androidHighConnectionPriority === 'auto'
|
|
422
|
+
? tuning.androidHighConnectionPriority
|
|
423
|
+
: protocolV2BleTuning.androidHighConnectionPriority,
|
|
415
424
|
};
|
|
416
425
|
Log === null || Log === void 0 ? void 0 : Log.debug('[ReactNativeBleTransport] BLE tuning configured', protocolV2BleTuning);
|
|
417
426
|
}
|
|
@@ -422,12 +431,107 @@ function resetProtocolV2BleTuning() {
|
|
|
422
431
|
function getProtocolV2BleTuning() {
|
|
423
432
|
return Object.assign({}, protocolV2BleTuning);
|
|
424
433
|
}
|
|
434
|
+
const getProtocolV2NativeFrameWriter = (manager) => {
|
|
435
|
+
var _a;
|
|
436
|
+
const candidate = manager;
|
|
437
|
+
if (!candidate || typeof candidate.writeCharacteristicWithoutResponseFrame !== 'function') {
|
|
438
|
+
return undefined;
|
|
439
|
+
}
|
|
440
|
+
try {
|
|
441
|
+
return ((_a = candidate.isWriteCharacteristicWithoutResponseFrameSupported) === null || _a === void 0 ? void 0 : _a.call(candidate)) === true
|
|
442
|
+
? candidate
|
|
443
|
+
: undefined;
|
|
444
|
+
}
|
|
445
|
+
catch (_b) {
|
|
446
|
+
return undefined;
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
const getNativeBleErrorReason = (error) => {
|
|
450
|
+
const { reason, message } = (error !== null && error !== void 0 ? error : {});
|
|
451
|
+
if (typeof reason === 'string' && reason)
|
|
452
|
+
return reason;
|
|
453
|
+
return typeof message === 'string' && message ? message : undefined;
|
|
454
|
+
};
|
|
455
|
+
const nowMs = () => typeof performance !== 'undefined' && typeof performance.now === 'function'
|
|
456
|
+
? performance.now()
|
|
457
|
+
: Date.now();
|
|
458
|
+
const roundMs = (ms) => Math.round(ms * 10) / 10;
|
|
459
|
+
const FILE_WRITE_PACKET_HISTOGRAM_BOUNDS_MS = [1, 2, 3, 5, 8];
|
|
460
|
+
const createDurationStats = () => {
|
|
461
|
+
let total = 0;
|
|
462
|
+
let count = 0;
|
|
463
|
+
let max = 0;
|
|
464
|
+
return {
|
|
465
|
+
add(ms) {
|
|
466
|
+
total += ms;
|
|
467
|
+
count += 1;
|
|
468
|
+
max = Math.max(max, ms);
|
|
469
|
+
},
|
|
470
|
+
summarize: () => ({
|
|
471
|
+
total: roundMs(total),
|
|
472
|
+
avg: count ? roundMs(total / count) : 0,
|
|
473
|
+
max: roundMs(max),
|
|
474
|
+
}),
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
const createProtocolV2FileWritePerf = () => {
|
|
478
|
+
const startedAt = nowMs();
|
|
479
|
+
let nativeFrames = 0;
|
|
480
|
+
let frames = 0;
|
|
481
|
+
let packets = 0;
|
|
482
|
+
let frameBytes = 0;
|
|
483
|
+
const write = createDurationStats();
|
|
484
|
+
const readWait = createDurationStats();
|
|
485
|
+
const packet = createDurationStats();
|
|
486
|
+
const packetHistogram = FILE_WRITE_PACKET_HISTOGRAM_BOUNDS_MS.map(() => 0).concat(0);
|
|
487
|
+
return {
|
|
488
|
+
startFrame(mode) {
|
|
489
|
+
if (mode === 'native-frame')
|
|
490
|
+
nativeFrames += 1;
|
|
491
|
+
},
|
|
492
|
+
recordFrame(bytes, framePackets, elapsedMs) {
|
|
493
|
+
frames += 1;
|
|
494
|
+
packets += framePackets;
|
|
495
|
+
frameBytes += bytes;
|
|
496
|
+
write.add(elapsedMs);
|
|
497
|
+
},
|
|
498
|
+
recordPacket(elapsedMs) {
|
|
499
|
+
packet.add(elapsedMs);
|
|
500
|
+
const bucket = FILE_WRITE_PACKET_HISTOGRAM_BOUNDS_MS.findIndex(bound => elapsedMs < bound);
|
|
501
|
+
packetHistogram[bucket < 0 ? FILE_WRITE_PACKET_HISTOGRAM_BOUNDS_MS.length : bucket] += 1;
|
|
502
|
+
},
|
|
503
|
+
recordReadWait(elapsedMs) {
|
|
504
|
+
readWait.add(elapsedMs);
|
|
505
|
+
},
|
|
506
|
+
summarize(ok) {
|
|
507
|
+
const mode = nativeFrames > 0 ? 'native-frame' : 'per-packet';
|
|
508
|
+
const packetStats = packet.summarize();
|
|
509
|
+
return Object.assign({ platform: reactNative.Platform.OS, mode,
|
|
510
|
+
ok,
|
|
511
|
+
frames,
|
|
512
|
+
packets,
|
|
513
|
+
frameBytes, elapsedMs: roundMs(nowMs() - startedAt), writeMs: write.summarize(), readWaitMs: readWait.summarize() }, (mode === 'per-packet'
|
|
514
|
+
? { packetMs: { avg: packetStats.avg, max: packetStats.max, hist: [...packetHistogram] } }
|
|
515
|
+
: {}));
|
|
516
|
+
},
|
|
517
|
+
};
|
|
518
|
+
};
|
|
425
519
|
function getDeviceDisplayName(device) {
|
|
426
520
|
return (device === null || device === void 0 ? void 0 : device.name) || (device === null || device === void 0 ? void 0 : device.localName) || null;
|
|
427
521
|
}
|
|
428
522
|
const IOS_REQUEST_MTU = 247;
|
|
429
523
|
const ANDROID_REQUEST_MTU = 517;
|
|
430
524
|
const ANDROID_HIGH_PRIORITY_IDLE_MS = 1000;
|
|
525
|
+
const ANDROID_HIGH_PRIORITY_PERIPHERAL_LATENCY_API_LEVEL = 37;
|
|
526
|
+
const shouldRequestAndroidHighConnectionPriority = () => {
|
|
527
|
+
if (reactNative.Platform.OS !== 'android')
|
|
528
|
+
return false;
|
|
529
|
+
const { androidHighConnectionPriority } = protocolV2BleTuning;
|
|
530
|
+
if (typeof androidHighConnectionPriority === 'boolean')
|
|
531
|
+
return androidHighConnectionPriority;
|
|
532
|
+
const apiLevel = Number(reactNative.Platform.Version);
|
|
533
|
+
return !(Number.isFinite(apiLevel) && apiLevel >= ANDROID_HIGH_PRIORITY_PERIPHERAL_LATENCY_API_LEVEL);
|
|
534
|
+
};
|
|
431
535
|
const getRequestedBleMtu = () => reactNative.Platform.OS === 'android' ? ANDROID_REQUEST_MTU : IOS_REQUEST_MTU;
|
|
432
536
|
const BLE_NATIVE_CONNECT_TIMEOUT_MS = 3000;
|
|
433
537
|
const BLE_MTU_REQUEST_TIMEOUT_MS = BLE_NATIVE_CONNECT_TIMEOUT_MS;
|
|
@@ -620,6 +724,9 @@ class ReactNativeBleTransport {
|
|
|
620
724
|
this.protocolV2HighVolumeLogSignatures = new Map();
|
|
621
725
|
this.androidHighPriorityDevices = new Set();
|
|
622
726
|
this.androidPriorityResetTimers = new Map();
|
|
727
|
+
this.protocolV2FrameWrites = new Map();
|
|
728
|
+
this.protocolV2FrameWriteCounter = 0;
|
|
729
|
+
this.protocolV2FileWritePerfs = new Map();
|
|
623
730
|
this.nextMonitorToken = 1;
|
|
624
731
|
this.lifecycleOperations = new Map();
|
|
625
732
|
this.scanCleanups = new Set();
|
|
@@ -1418,6 +1525,7 @@ class ReactNativeBleTransport {
|
|
|
1418
1525
|
}
|
|
1419
1526
|
releaseUnlocked(uuid, onclose = false) {
|
|
1420
1527
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1528
|
+
this.cancelProtocolV2FrameWrite(uuid, new Error('React Native BLE transport released'));
|
|
1421
1529
|
yield this.protocolV2Links.invalidateLink(uuid, 'React Native BLE transport released');
|
|
1422
1530
|
return this.releaseNative(uuid, onclose);
|
|
1423
1531
|
});
|
|
@@ -1425,6 +1533,7 @@ class ReactNativeBleTransport {
|
|
|
1425
1533
|
releaseNative(uuid, onclose = false) {
|
|
1426
1534
|
var _a, _b, _c, _d, _e;
|
|
1427
1535
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1536
|
+
this.cancelProtocolV2FrameWrite(uuid, new Error('React Native BLE transport released'));
|
|
1428
1537
|
const transport = transportCache[uuid];
|
|
1429
1538
|
const manager = this.blePlxManager;
|
|
1430
1539
|
if (this.runPromise && this.runPromiseDeviceId === uuid) {
|
|
@@ -1751,6 +1860,9 @@ class ReactNativeBleTransport {
|
|
|
1751
1860
|
disconnectUnlocked(session) {
|
|
1752
1861
|
var _a, _b, _c;
|
|
1753
1862
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1863
|
+
this.clearAndroidPriorityResetTimer(session);
|
|
1864
|
+
this.androidHighPriorityDevices.delete(session);
|
|
1865
|
+
this.cancelProtocolV2FrameWrite(session, new Error('React Native BLE transport disconnected'));
|
|
1754
1866
|
yield this.protocolV2Links.invalidateLink(session, 'React Native BLE transport disconnected');
|
|
1755
1867
|
const transport = transportCache[session];
|
|
1756
1868
|
const manager = this.blePlxManager;
|
|
@@ -2120,6 +2232,7 @@ class ReactNativeBleTransport {
|
|
|
2120
2232
|
Log === null || Log === void 0 ? void 0 : Log.error('[ReactNativeBleTransport] BLE write timed out, tearing down link:', uuid, {
|
|
2121
2233
|
consecutiveWriteTimeouts: timeouts,
|
|
2122
2234
|
});
|
|
2235
|
+
this.cancelProtocolV2FrameWrite(uuid, hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.BleWriteCharacteristicError, `BLE write timeout after ${BLE_WRITE_PACKET_TIMEOUT_MS}ms`));
|
|
2123
2236
|
const wedged = transportCache[uuid];
|
|
2124
2237
|
this.disconnect(uuid).catch(error => {
|
|
2125
2238
|
Log === null || Log === void 0 ? void 0 : Log.debug('[ReactNativeBleTransport] wedged link teardown failed (ignored):', error);
|
|
@@ -2143,6 +2256,7 @@ class ReactNativeBleTransport {
|
|
|
2143
2256
|
const manager = this.blePlxManager;
|
|
2144
2257
|
this.blePlxManager = undefined;
|
|
2145
2258
|
const reason = 'React Native BLE manager reset';
|
|
2259
|
+
Array.from(this.protocolV2FrameWrites.keys()).forEach(uuid => this.cancelProtocolV2FrameWrite(uuid, new Error(reason)));
|
|
2146
2260
|
Object.entries(transportCache).forEach(([uuid, cachedTransport]) => {
|
|
2147
2261
|
var _a, _b, _c, _d;
|
|
2148
2262
|
try {
|
|
@@ -2532,16 +2646,162 @@ class ReactNativeBleTransport {
|
|
|
2532
2646
|
androidPacketLength: tuning.androidPacketLength,
|
|
2533
2647
|
mtu: transport$1.mtuSize,
|
|
2534
2648
|
});
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2649
|
+
const perf = context.messageName === 'FilesystemFileWrite'
|
|
2650
|
+
? this.protocolV2FileWritePerfs.get(uuid)
|
|
2651
|
+
: undefined;
|
|
2652
|
+
const startedAt = perf ? nowMs() : 0;
|
|
2653
|
+
const nativeFrameWriter = frame.length > packetCapacity
|
|
2654
|
+
? this.resolveProtocolV2NativeFrameWriter(transport$1, context, tuning.nativeFrameWrite)
|
|
2655
|
+
: undefined;
|
|
2656
|
+
perf === null || perf === void 0 ? void 0 : perf.startFrame(nativeFrameWriter ? 'native-frame' : 'per-packet');
|
|
2657
|
+
if (nativeFrameWriter) {
|
|
2658
|
+
yield this.writeProtocolV2NativeFrame(uuid, transport$1, nativeFrameWriter, frame, packetCapacity, context, assertCurrentGeneration);
|
|
2659
|
+
}
|
|
2660
|
+
else {
|
|
2661
|
+
yield transport.writeProtocolV2BleFrame({
|
|
2662
|
+
frame,
|
|
2663
|
+
packetCapacity,
|
|
2664
|
+
assertActive: assertCurrentGeneration,
|
|
2665
|
+
signal: context.signal,
|
|
2666
|
+
abortMessage: `Protocol V2 BLE write aborted for ${context.messageName}`,
|
|
2667
|
+
wait: delay,
|
|
2668
|
+
writePacket: (packet) => __awaiter(this, void 0, void 0, function* () {
|
|
2669
|
+
const packetStartedAt = perf ? nowMs() : 0;
|
|
2670
|
+
yield this.writeProtocolV2Packet(uuid, transport$1, buffer.Buffer.from(packet).toString('base64'), context, assertCurrentGeneration);
|
|
2671
|
+
perf === null || perf === void 0 ? void 0 : perf.recordPacket(nowMs() - packetStartedAt);
|
|
2672
|
+
}),
|
|
2673
|
+
});
|
|
2674
|
+
}
|
|
2675
|
+
perf === null || perf === void 0 ? void 0 : perf.recordFrame(frame.length, Math.ceil(frame.length / packetCapacity), nowMs() - startedAt);
|
|
2676
|
+
});
|
|
2677
|
+
}
|
|
2678
|
+
resolveProtocolV2NativeFrameWriter(transport, context, nativeFrameWrite) {
|
|
2679
|
+
if (!context.highThroughput || nativeFrameWrite === false)
|
|
2680
|
+
return undefined;
|
|
2681
|
+
if (shouldWriteProtocolV2WithResponse({
|
|
2682
|
+
platform: reactNative.Platform.OS,
|
|
2683
|
+
highThroughput: context.highThroughput,
|
|
2684
|
+
requestedWithResponse: context.writeWithResponse,
|
|
2685
|
+
characteristic: transport.writeCharacteristic,
|
|
2686
|
+
})) {
|
|
2687
|
+
return undefined;
|
|
2688
|
+
}
|
|
2689
|
+
if (typeof transport.writeCharacteristic.id !== 'number')
|
|
2690
|
+
return undefined;
|
|
2691
|
+
return getProtocolV2NativeFrameWriter(this.blePlxManager);
|
|
2692
|
+
}
|
|
2693
|
+
writeProtocolV2NativeFrame(uuid, transport, manager, frame, packetCapacity, context, assertCurrentGeneration) {
|
|
2694
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2695
|
+
const abortMessage = `Protocol V2 BLE write aborted for ${context.messageName}`;
|
|
2696
|
+
assertCurrentGeneration();
|
|
2697
|
+
if (context.signal.aborted) {
|
|
2698
|
+
throw new Error(abortMessage);
|
|
2699
|
+
}
|
|
2700
|
+
this.protocolV2FrameWriteCounter += 1;
|
|
2701
|
+
const transactionId = `${uuid}:v2frame:${context.generation}:${this.protocolV2FrameWriteCounter}`;
|
|
2702
|
+
let cancelError;
|
|
2703
|
+
let rejectCancelled = () => undefined;
|
|
2704
|
+
const cancelled = new Promise((_, reject) => {
|
|
2705
|
+
rejectCancelled = reject;
|
|
2543
2706
|
});
|
|
2707
|
+
const active = {
|
|
2708
|
+
transactionId,
|
|
2709
|
+
generation: context.generation,
|
|
2710
|
+
cancel: error => {
|
|
2711
|
+
if (cancelError)
|
|
2712
|
+
return;
|
|
2713
|
+
cancelError = error;
|
|
2714
|
+
if (this.protocolV2FrameWrites.get(uuid) === active) {
|
|
2715
|
+
this.protocolV2FrameWrites.delete(uuid);
|
|
2716
|
+
}
|
|
2717
|
+
rejectCancelled(error);
|
|
2718
|
+
this.cancelNativeTransaction(manager, transactionId);
|
|
2719
|
+
},
|
|
2720
|
+
};
|
|
2721
|
+
const isCurrentOwner = () => {
|
|
2722
|
+
try {
|
|
2723
|
+
assertCurrentGeneration();
|
|
2724
|
+
return !context.signal.aborted;
|
|
2725
|
+
}
|
|
2726
|
+
catch (_a) {
|
|
2727
|
+
return false;
|
|
2728
|
+
}
|
|
2729
|
+
};
|
|
2730
|
+
const onAbort = () => active.cancel(new Error(abortMessage));
|
|
2731
|
+
let timer;
|
|
2732
|
+
let completed = false;
|
|
2733
|
+
let nativeError;
|
|
2734
|
+
try {
|
|
2735
|
+
const nativeWrite = Promise.resolve(manager.writeCharacteristicWithoutResponseFrame(transport.writeCharacteristic.id, buffer.Buffer.from(frame).toString('base64'), packetCapacity, transactionId));
|
|
2736
|
+
nativeWrite.catch(() => undefined);
|
|
2737
|
+
this.protocolV2FrameWrites.set(uuid, active);
|
|
2738
|
+
context.signal.addEventListener('abort', onAbort);
|
|
2739
|
+
yield Promise.race([
|
|
2740
|
+
nativeWrite,
|
|
2741
|
+
cancelled,
|
|
2742
|
+
new Promise((_, reject) => {
|
|
2743
|
+
timer = setTimeout(() => {
|
|
2744
|
+
const owner = isCurrentOwner();
|
|
2745
|
+
const error = hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.BleWriteCharacteristicError, `BLE write timeout after ${BLE_WRITE_PACKET_TIMEOUT_MS}ms`);
|
|
2746
|
+
active.cancel(error);
|
|
2747
|
+
reject(error);
|
|
2748
|
+
if (owner) {
|
|
2749
|
+
this.tearDownWedgedLink(uuid);
|
|
2750
|
+
}
|
|
2751
|
+
else {
|
|
2752
|
+
Log === null || Log === void 0 ? void 0 : Log.debug('[ReactNativeBleTransport] stale BLE frame write timed out, link kept');
|
|
2753
|
+
}
|
|
2754
|
+
}, BLE_WRITE_PACKET_TIMEOUT_MS);
|
|
2755
|
+
}),
|
|
2756
|
+
]);
|
|
2757
|
+
completed = true;
|
|
2758
|
+
}
|
|
2759
|
+
catch (error) {
|
|
2760
|
+
nativeError = error;
|
|
2761
|
+
}
|
|
2762
|
+
finally {
|
|
2763
|
+
if (timer)
|
|
2764
|
+
clearTimeout(timer);
|
|
2765
|
+
context.signal.removeEventListener('abort', onAbort);
|
|
2766
|
+
}
|
|
2767
|
+
if (completed) {
|
|
2768
|
+
this.writeTimeoutCounts.delete(uuid);
|
|
2769
|
+
try {
|
|
2770
|
+
assertCurrentGeneration();
|
|
2771
|
+
}
|
|
2772
|
+
catch (error) {
|
|
2773
|
+
active.cancel(error instanceof Error ? error : new Error(String(error)));
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2776
|
+
if (this.protocolV2FrameWrites.get(uuid) === active) {
|
|
2777
|
+
this.protocolV2FrameWrites.delete(uuid);
|
|
2778
|
+
}
|
|
2779
|
+
if (cancelError)
|
|
2780
|
+
throw cancelError;
|
|
2781
|
+
if (completed)
|
|
2782
|
+
return;
|
|
2783
|
+
if (isNativeBleDisconnectError(nativeError)) {
|
|
2784
|
+
throw toBleDisconnectHardwareError(nativeError);
|
|
2785
|
+
}
|
|
2786
|
+
throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.BleWriteCharacteristicError, getNativeBleErrorReason(nativeError));
|
|
2787
|
+
});
|
|
2788
|
+
}
|
|
2789
|
+
cancelProtocolV2FrameWrite(uuid, error, generation) {
|
|
2790
|
+
const active = this.protocolV2FrameWrites.get(uuid);
|
|
2791
|
+
if (!active || (generation !== undefined && active.generation !== generation))
|
|
2792
|
+
return;
|
|
2793
|
+
active.cancel(error);
|
|
2794
|
+
}
|
|
2795
|
+
cancelNativeTransaction(manager, transactionId) {
|
|
2796
|
+
const logFailure = (error) => Log === null || Log === void 0 ? void 0 : Log.debug('[ReactNativeBleTransport] Protocol V2 frame write cancellation failed', {
|
|
2797
|
+
error: error instanceof Error ? error.message : String(error),
|
|
2544
2798
|
});
|
|
2799
|
+
try {
|
|
2800
|
+
Promise.resolve(manager.cancelTransaction(transactionId)).catch(logFailure);
|
|
2801
|
+
}
|
|
2802
|
+
catch (error) {
|
|
2803
|
+
logFailure(error);
|
|
2804
|
+
}
|
|
2545
2805
|
}
|
|
2546
2806
|
callProtocolV2(uuid, name, data, options) {
|
|
2547
2807
|
var _a;
|
|
@@ -2581,12 +2841,36 @@ class ReactNativeBleTransport {
|
|
|
2581
2841
|
packetCapacity,
|
|
2582
2842
|
});
|
|
2583
2843
|
}
|
|
2844
|
+
const frameWriteMode = this.resolveProtocolV2NativeFrameWriter(currentTransport, { highThroughput: true, writeWithResponse: options === null || options === void 0 ? void 0 : options.writeWithResponse }, tuning.nativeFrameWrite)
|
|
2845
|
+
? 'native-frame'
|
|
2846
|
+
: 'per-packet';
|
|
2847
|
+
const frameWriteModeSignature = `frameWriteMode:${frameWriteMode}`;
|
|
2848
|
+
if (!loggedSignatures.has(frameWriteModeSignature)) {
|
|
2849
|
+
loggedSignatures.add(frameWriteModeSignature);
|
|
2850
|
+
this.protocolV2HighVolumeLogSignatures.set(uuid, loggedSignatures);
|
|
2851
|
+
Log === null || Log === void 0 ? void 0 : Log.debug('[ReactNativeBleTransport] Protocol V2 frame write mode', {
|
|
2852
|
+
platform: reactNative.Platform.OS,
|
|
2853
|
+
mode: frameWriteMode,
|
|
2854
|
+
nativeFrameWrite: tuning.nativeFrameWrite,
|
|
2855
|
+
nativeFrameWriteSupported: !!getProtocolV2NativeFrameWriter(this.blePlxManager),
|
|
2856
|
+
packetCapacity,
|
|
2857
|
+
});
|
|
2858
|
+
}
|
|
2584
2859
|
}
|
|
2585
2860
|
if (highThroughputWrite) {
|
|
2586
2861
|
yield this.enableAndroidHighConnectionPriority(uuid);
|
|
2587
2862
|
}
|
|
2863
|
+
const fileWritePerf = name === 'FilesystemFileWrite' && (options === null || options === void 0 ? void 0 : options.fileWritePipeline)
|
|
2864
|
+
? createProtocolV2FileWritePerf()
|
|
2865
|
+
: undefined;
|
|
2866
|
+
if (fileWritePerf) {
|
|
2867
|
+
this.protocolV2FileWritePerfs.set(uuid, fileWritePerf);
|
|
2868
|
+
}
|
|
2869
|
+
let fileWriteOk = false;
|
|
2588
2870
|
try {
|
|
2589
|
-
|
|
2871
|
+
const response = yield this.protocolV2Links.call(uuid, () => this.createProtocolV2Adapter(uuid), name, data, callOptions);
|
|
2872
|
+
fileWriteOk = response.type !== 'Failure';
|
|
2873
|
+
return response;
|
|
2590
2874
|
}
|
|
2591
2875
|
catch (e) {
|
|
2592
2876
|
Log === null || Log === void 0 ? void 0 : Log.error('[ReactNativeBleTransport] Protocol V2 call error:', e);
|
|
@@ -2604,6 +2888,12 @@ class ReactNativeBleTransport {
|
|
|
2604
2888
|
if (highThroughputWrite) {
|
|
2605
2889
|
this.scheduleAndroidBalancedConnectionPriority(uuid);
|
|
2606
2890
|
}
|
|
2891
|
+
if (fileWritePerf) {
|
|
2892
|
+
if (this.protocolV2FileWritePerfs.get(uuid) === fileWritePerf) {
|
|
2893
|
+
this.protocolV2FileWritePerfs.delete(uuid);
|
|
2894
|
+
}
|
|
2895
|
+
Log === null || Log === void 0 ? void 0 : Log.debug('[ReactNativeBleTransport] FileWrite perf', fileWritePerf.summarize(fileWriteOk));
|
|
2896
|
+
}
|
|
2607
2897
|
}
|
|
2608
2898
|
});
|
|
2609
2899
|
}
|
|
@@ -2629,12 +2919,25 @@ class ReactNativeBleTransport {
|
|
|
2629
2919
|
}
|
|
2630
2920
|
}
|
|
2631
2921
|
enableAndroidHighConnectionPriority(uuid) {
|
|
2922
|
+
var _a;
|
|
2632
2923
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2633
2924
|
if (reactNative.Platform.OS !== 'android')
|
|
2634
2925
|
return;
|
|
2635
2926
|
this.clearAndroidPriorityResetTimer(uuid);
|
|
2636
2927
|
if (this.androidHighPriorityDevices.has(uuid))
|
|
2637
2928
|
return;
|
|
2929
|
+
if (!shouldRequestAndroidHighConnectionPriority()) {
|
|
2930
|
+
const loggedSignatures = (_a = this.protocolV2HighVolumeLogSignatures.get(uuid)) !== null && _a !== void 0 ? _a : new Set();
|
|
2931
|
+
if (!loggedSignatures.has('androidPriority:peripheral')) {
|
|
2932
|
+
loggedSignatures.add('androidPriority:peripheral');
|
|
2933
|
+
this.protocolV2HighVolumeLogSignatures.set(uuid, loggedSignatures);
|
|
2934
|
+
Log === null || Log === void 0 ? void 0 : Log.debug('[ReactNativeBleTransport] Android BLE connection priority left to peripheral', {
|
|
2935
|
+
apiLevel: reactNative.Platform.Version,
|
|
2936
|
+
setting: protocolV2BleTuning.androidHighConnectionPriority,
|
|
2937
|
+
});
|
|
2938
|
+
}
|
|
2939
|
+
return;
|
|
2940
|
+
}
|
|
2638
2941
|
const transport = transportCache[uuid];
|
|
2639
2942
|
if (!transport)
|
|
2640
2943
|
return;
|
|
@@ -2704,9 +3007,14 @@ class ReactNativeBleTransport {
|
|
|
2704
3007
|
const currentTransport = this.getCachedTransport(uuid);
|
|
2705
3008
|
yield this.writeProtocolV2Frame(uuid, currentTransport, frame, context, assertCurrentGeneration);
|
|
2706
3009
|
}),
|
|
2707
|
-
readFrame: () => __awaiter(this, void 0, void 0, function* () {
|
|
3010
|
+
readFrame: (context) => __awaiter(this, void 0, void 0, function* () {
|
|
2708
3011
|
assertCurrentGeneration();
|
|
3012
|
+
const perf = (context === null || context === void 0 ? void 0 : context.messageName) === 'FilesystemFileWrite'
|
|
3013
|
+
? this.protocolV2FileWritePerfs.get(uuid)
|
|
3014
|
+
: undefined;
|
|
3015
|
+
const startedAt = perf ? nowMs() : 0;
|
|
2709
3016
|
const rxFrame = yield this.readProtocolV2Frame(uuid);
|
|
3017
|
+
perf === null || perf === void 0 ? void 0 : perf.recordReadWait(nowMs() - startedAt);
|
|
2710
3018
|
if (!(rxFrame instanceof Uint8Array)) {
|
|
2711
3019
|
throw new Error('Protocol V2 response is not Uint8Array');
|
|
2712
3020
|
}
|
|
@@ -2714,6 +3022,7 @@ class ReactNativeBleTransport {
|
|
|
2714
3022
|
}),
|
|
2715
3023
|
reset: (reason) => {
|
|
2716
3024
|
var _a;
|
|
3025
|
+
this.cancelProtocolV2FrameWrite(uuid, new Error(reason), generation);
|
|
2717
3026
|
if (this.monitorTokens.get(uuid) !== generation)
|
|
2718
3027
|
return;
|
|
2719
3028
|
(_a = this.protocolV2Assemblers.get(uuid)) === null || _a === void 0 ? void 0 : _a.reset();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-transport-react-native",
|
|
3
|
-
"version": "1.2.8-alpha.
|
|
3
|
+
"version": "1.2.8-alpha.117",
|
|
4
4
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"lint:fix": "eslint . --fix"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@onekeyfe/hd-core": "1.2.8-alpha.
|
|
24
|
-
"@onekeyfe/hd-shared": "1.2.8-alpha.
|
|
25
|
-
"@onekeyfe/hd-transport": "1.2.8-alpha.
|
|
23
|
+
"@onekeyfe/hd-core": "1.2.8-alpha.117",
|
|
24
|
+
"@onekeyfe/hd-shared": "1.2.8-alpha.117",
|
|
25
|
+
"@onekeyfe/hd-transport": "1.2.8-alpha.117",
|
|
26
26
|
"@onekeyfe/react-native-ble-utils": "0.1.9",
|
|
27
27
|
"react-native-ble-plx": "3.5.1"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "610f1a979c682817acf9b4d195365dc5ed806138"
|
|
30
30
|
}
|