forked from Blendman974/faceclaw
Send cleanup messages on disconnect
This commit is contained in:
1 parent
f87c8e898b
commit
b6785e5a5a
6 files changed
+202
-33
No files matched your search
@@ -42,6 +42,7 @@ public class FaceclawBleCommunicator implements FaceclawBleListener, Runnable {
|
||||
private static final String G2_SCREEN_WAKE_LOCK_TAG = "Faceclaw:G2Screen";
|
||||
private static final long FACECLAW_WAKE_LEASE_RENEW_MS = 45_000;
|
||||
private static final long FACECLAW_WAKE_CONTROL_WAIT_MS = 1_500;
|
||||
private static final long CFW_CLEANUP_WAIT_MS = 4_000;
|
||||
|
||||
private final Context appContext;
|
||||
private final PowerManager powerManager;
|
||||
@@ -102,6 +103,9 @@ public class FaceclawBleCommunicator implements FaceclawBleListener, Runnable {
|
||||
private int faceclawFramebufferControlGeneration;
|
||||
private int faceclawFramebufferControlSentCount;
|
||||
private int faceclawWakePendingNonce = -1;
|
||||
private boolean cfwCleanupSupported;
|
||||
private boolean cfwCleanupDelivered;
|
||||
private int lastCfwCleanupAckMagic;
|
||||
|
||||
private long reconnectAfterMs;
|
||||
private long ringReconnectAfterMs;
|
||||
@@ -226,7 +230,13 @@ public class FaceclawBleCommunicator implements FaceclawBleListener, Runnable {
|
||||
}
|
||||
|
||||
public void disconnect() {
|
||||
releaseFaceclawFramebufferLease();
|
||||
/* On the normal path DashboardController already sent mode 11 after
|
||||
* quiescing its producers. Also cover direct/early close callers here;
|
||||
* a successful cleanup must remain the final BLE message. Older CFWs
|
||||
* fall back to the standalone framebuffer-lease release. */
|
||||
if (!cfwCleanupDelivered && !sendCfwCleanup()) {
|
||||
releaseFaceclawFramebufferLease();
|
||||
}
|
||||
Thread threadToJoin;
|
||||
synchronized (lock) {
|
||||
userDisconnectRequested = true;
|
||||
@@ -760,6 +770,98 @@ public class FaceclawBleCommunicator implements FaceclawBleListener, Runnable {
|
||||
return sendShutdownInternal(exitMode, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send CFW image-handler mode 11 after quiescing normal traffic. A successful
|
||||
* return means the cleanup was ACKed and no later Faceclaw message should be
|
||||
* emitted before closing BLE. Unsupported/older CFWs return false so callers
|
||||
* can use the legacy shutdown-and-lease-release path.
|
||||
*/
|
||||
public boolean sendCfwCleanup() {
|
||||
int magic;
|
||||
synchronized (lock) {
|
||||
if (cfwCleanupDelivered) {
|
||||
return true;
|
||||
}
|
||||
if (!cfwCleanupSupported || !running || !sessionReady
|
||||
|| shutdownRequested || !fixedLayoutCreated || !warmedUp) {
|
||||
logLine("skip CFW cleanup; mode 11 unavailable or image path not ready");
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Stop auto-renewals, heartbeats, image generation, and control
|
||||
* retries, then discard everything that has not reached BLE yet. */
|
||||
shutdownRequested = true;
|
||||
lastCfwCleanupAckMagic = 0;
|
||||
clearPendingMessagesLocked("CFW cleanup requested");
|
||||
logLine("quiescing transport for CFW cleanup");
|
||||
}
|
||||
interruptibleSleep.interrupt();
|
||||
|
||||
/* WINDOW_SIZE can exceed one, so merely appending cleanup would allow it
|
||||
* to overlap previously-written image fragments. Wait until all of those
|
||||
* ACK or time out; shutdownRequested prevents the drive loop from adding
|
||||
* any fresh automatic traffic meanwhile. */
|
||||
long drainDeadline = SystemClock.elapsedRealtime() + CFW_CLEANUP_WAIT_MS;
|
||||
synchronized (lock) {
|
||||
while (running && sessionReady && !inFlightMessages.isEmpty()) {
|
||||
long remaining = drainDeadline - SystemClock.elapsedRealtime();
|
||||
if (remaining <= 0) break;
|
||||
try {
|
||||
lock.wait(Math.min(remaining, 100));
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!running || !sessionReady || !inFlightMessages.isEmpty()) {
|
||||
shutdownRequested = false;
|
||||
logLine("CFW cleanup could not drain prior traffic");
|
||||
return false;
|
||||
}
|
||||
|
||||
/* External producers are expected to be stopped by the caller, but
|
||||
* clear once more at the barrier so cleanup is definitely last. */
|
||||
clearPendingMessagesLocked("CFW cleanup barrier");
|
||||
OutboundMessage message = messageBuilder.cfwCleanup(
|
||||
DASHBOARD_TILE,
|
||||
nextMapSessionId(),
|
||||
connectionOptions.sendImagesToLeft
|
||||
);
|
||||
magic = message.magic;
|
||||
message.onAck = () -> {
|
||||
lastCfwCleanupAckMagic = message.magic;
|
||||
cfwCleanupDelivered = true;
|
||||
compassMaybeOn = false;
|
||||
faceclawWakeLeaseEnabled = false;
|
||||
logLine("CFW cleanup completed");
|
||||
};
|
||||
message.onTimeout = () -> logLine("CFW cleanup ack timeout");
|
||||
pendingMessages.addLast(message);
|
||||
logLine("queue CFW cleanup");
|
||||
}
|
||||
interruptibleSleep.interrupt();
|
||||
|
||||
long deadline = SystemClock.elapsedRealtime() + CFW_CLEANUP_WAIT_MS;
|
||||
synchronized (lock) {
|
||||
while (running
|
||||
&& sessionReady
|
||||
&& lastCfwCleanupAckMagic != magic
|
||||
&& hasPendingOrInflightMagicLocked(magic)) {
|
||||
long remaining = deadline - SystemClock.elapsedRealtime();
|
||||
if (remaining <= 0) break;
|
||||
try {
|
||||
lock.wait(Math.min(remaining, 100));
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
boolean acked = lastCfwCleanupAckMagic == magic;
|
||||
if (!acked) shutdownRequested = false;
|
||||
return acked;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* End the EvenHub page while retaining both arm GATT connections and all
|
||||
* notification subscriptions. A missed ACK is intentionally non-fatal:
|
||||
@@ -1253,6 +1355,8 @@ public class FaceclawBleCommunicator implements FaceclawBleListener, Runnable {
|
||||
lastAudioControlAckMagic = 0;
|
||||
audioCaptureActive = false;
|
||||
faceclawWakePendingNonce = -1;
|
||||
cfwCleanupDelivered = false;
|
||||
lastCfwCleanupAckMagic = 0;
|
||||
lastFaceclawWakeLeaseQueuedAtMs = 0;
|
||||
lastFaceclawFramebufferLeaseQueuedAtMs = 0;
|
||||
enqueueFaceclawFramebufferControlLocked(
|
||||
@@ -1456,6 +1560,13 @@ public class FaceclawBleCommunicator implements FaceclawBleListener, Runnable {
|
||||
maybeFinishNoChangeDesiredFrame();
|
||||
|
||||
synchronized (lock) {
|
||||
if (cfwCleanupDelivered) {
|
||||
/* Successful mode 11 must be the last Faceclaw write. Drop
|
||||
* anything a late external producer attempted to enqueue
|
||||
* while DashboardController was closing the transport. */
|
||||
clearPendingMessagesLocked("after CFW cleanup");
|
||||
return 250;
|
||||
}
|
||||
if (sessionReady
|
||||
&& now - lastFaceclawFramebufferLeaseQueuedAtMs >= FACECLAW_WAKE_LEASE_RENEW_MS
|
||||
&& !hasPendingOrInflightKindLocked("framebuffer-lease-control")) {
|
||||
@@ -2221,6 +2332,7 @@ public class FaceclawBleCommunicator implements FaceclawBleListener, Runnable {
|
||||
}
|
||||
BleProtocol.FirmwareInfo firmwareInfo = BleProtocol.parseSettingsFirmwareInfo(message.ackPayload);
|
||||
if (firmwareInfo != null) {
|
||||
cfwCleanupSupported = hasCapability(firmwareInfo.capabilities, "cleanup11");
|
||||
emitFirmwareInfo(firmwareInfo);
|
||||
}
|
||||
};
|
||||
@@ -2656,6 +2768,8 @@ public class FaceclawBleCommunicator implements FaceclawBleListener, Runnable {
|
||||
faceclawWakePendingNonce = -1;
|
||||
lastFaceclawWakeLeaseQueuedAtMs = 0;
|
||||
faceclawWakeControlSentCount = 0;
|
||||
cfwCleanupDelivered = false;
|
||||
lastCfwCleanupAckMagic = 0;
|
||||
wearState = -1;
|
||||
displayedFingerprint = "";
|
||||
// Deliberately not clearing silentMode: it is a property of the glasses,
|
||||
@@ -2663,6 +2777,14 @@ public class FaceclawBleCommunicator implements FaceclawBleListener, Runnable {
|
||||
// the very cause of the session teardown that got us here.
|
||||
}
|
||||
|
||||
private static boolean hasCapability(String capabilities, String token) {
|
||||
if (capabilities == null || token == null || token.isEmpty()) return false;
|
||||
for (String capability : capabilities.trim().split("\\s+")) {
|
||||
if (token.equals(capability)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void emitRingEvent(String kind, String containerName, int eventType, int eventSource, int systemExitReasonCode, int frameId) {
|
||||
final FaceclawBleCommunicatorListener current = listener;
|
||||
if (current == null) {
|
||||
|
||||
@@ -46,6 +46,7 @@ public class BleProtocol {
|
||||
public static final int FACECLAW_FB_OP_ACQUIRE = 5;
|
||||
public static final int FACECLAW_FB_OP_RELEASE = 6;
|
||||
public static final int FACECLAW_WEAR_OP_QUERY = 7;
|
||||
public static final int CFW_IMAGE_MODE_CLEANUP = 11;
|
||||
private static final int FACECLAW_WAKE_EVENT = 1;
|
||||
private static final int FACECLAW_WAKE_PROTOCOL_VERSION = 1;
|
||||
// UI_FOREGROUND_EVEN_AI_ID: the stock "Even AI" assistant app. It is a
|
||||
|
||||
@@ -103,6 +103,22 @@ public class MessageBuilder {
|
||||
);
|
||||
}
|
||||
|
||||
public OutboundMessage cfwCleanup(
|
||||
BleProtocol.ImageTileOptions tile,
|
||||
int sessionId,
|
||||
boolean leftArm
|
||||
) {
|
||||
byte[] payload = new byte[] { (byte) BleProtocol.CFW_IMAGE_MODE_CLEANUP };
|
||||
return imagePayload(
|
||||
"cfw-cleanup",
|
||||
tile,
|
||||
sessionId,
|
||||
payload,
|
||||
"CFW cleanup",
|
||||
leftArm
|
||||
);
|
||||
}
|
||||
|
||||
public OutboundMessage enableOrDisableMic(boolean enable) {
|
||||
int magic = magicPool.allocate();
|
||||
return new OutboundMessage(
|
||||
|
||||
@@ -1112,18 +1112,33 @@ class DashboardController {
|
||||
if (leaseReleased === true) {
|
||||
this.faceclawWakeLeaseState = false;
|
||||
}
|
||||
const shutdownAcked = await communicator?.sendShutdown(0).catch((error) => {
|
||||
this.appendLog(`shutdown command failed: ${this.formatError(error)}`);
|
||||
return false;
|
||||
});
|
||||
if (shutdownAcked === true) {
|
||||
this.appendLog("Shutdown command completed.");
|
||||
} else if (communicator) {
|
||||
this.appendLog("Shutdown command did not complete before disconnect.");
|
||||
}
|
||||
|
||||
// Quiesce every producer that can enqueue a glasses command before the
|
||||
// firmware cleanup barrier. On cleanup-capable CFW this leaves mode 11 as
|
||||
// Faceclaw's final BLE message before the transport closes.
|
||||
await mediaControllerBridge.stop().catch(() => {});
|
||||
await nightscoutBridge.stop().catch(() => {});
|
||||
voiceControlBridge.stop();
|
||||
|
||||
const cleanupAcked = await communicator?.sendCfwCleanup().catch((error) => {
|
||||
this.appendLog(`CFW cleanup failed: ${this.formatError(error)}`);
|
||||
return false;
|
||||
});
|
||||
if (cleanupAcked === true) {
|
||||
this.appendLog("CFW cleanup completed.");
|
||||
} else if (communicator) {
|
||||
// Older CFWs do not advertise cleanup11. Preserve their established
|
||||
// teardown behavior; close() will also send the legacy FB lease release.
|
||||
const shutdownAcked = await communicator.sendShutdown(0).catch((error) => {
|
||||
this.appendLog(`shutdown command failed: ${this.formatError(error)}`);
|
||||
return false;
|
||||
});
|
||||
if (shutdownAcked) {
|
||||
this.appendLog("Shutdown command completed (legacy cleanup fallback).");
|
||||
} else {
|
||||
this.appendLog("Cleanup did not complete before disconnect.");
|
||||
}
|
||||
}
|
||||
await communicator?.close().catch(() => {});
|
||||
} finally {
|
||||
stopForegroundNotification();
|
||||
|
||||
@@ -19,8 +19,14 @@ export type FirmwarePatchSet = {
|
||||
export const CFW_PATCH_SET: FirmwarePatchSet = {
|
||||
"base": "g2_2.2.6.10.bin",
|
||||
"baseSha256": "f4dfb0b49ad3de3c2daf17f8a27a157c3dc98411d6a0d3ab2cfd0918f41b9afa",
|
||||
"outputSha256": "ade1ca6b3329c66efe03c513d300058ef11f2112d81665fd648c54ac4c2887d6",
|
||||
"outputSha256": "68f1c26274b5ea31a3641dd24ef6d6ee10f8aa6d58c8b2b700fd8b7a1d13f1d5",
|
||||
"patches": [
|
||||
{
|
||||
"offset": 1089903,
|
||||
"old": "5ff43432",
|
||||
"new": "5ff43332",
|
||||
"desc": "reserve final 1 KiB of primary TLSF arena for CFW context anchor"
|
||||
},
|
||||
{
|
||||
"offset": 1449549,
|
||||
"old": "bdf82c10",
|
||||
@@ -42,133 +48,133 @@ export const CFW_PATCH_SET: FirmwarePatchSet = {
|
||||
{
|
||||
"offset": 1447919,
|
||||
"old": "7ef7fefd",
|
||||
"new": "baf22cfb",
|
||||
"new": "baf29efa",
|
||||
"desc": "bl snapshot_side @ 0x4db968"
|
||||
},
|
||||
{
|
||||
"offset": 1448931,
|
||||
"old": "7ef704fc",
|
||||
"new": "baf232f9",
|
||||
"new": "baf2a4f8",
|
||||
"desc": "bl snapshot_side @ 0x4dbd5c"
|
||||
},
|
||||
{
|
||||
"offset": 1165461,
|
||||
"old": "45f0cefd",
|
||||
"new": "fff2ddfa",
|
||||
"new": "fff24ffa",
|
||||
"desc": "bl image_deferred (deferred consumer -> FIFO restore + worker, both lenses)"
|
||||
},
|
||||
{
|
||||
"offset": 1186287,
|
||||
"old": "d9f7d4ff",
|
||||
"new": "fbf2e8f9",
|
||||
"new": "fbf248f8",
|
||||
"desc": "bl settings_send_wrapper (append caps field 100)"
|
||||
},
|
||||
{
|
||||
"offset": 1183983,
|
||||
"old": "f4f75aff",
|
||||
"new": "fbf2a4fb",
|
||||
"new": "fbf22cfa",
|
||||
"desc": "bl settings_decode_wrapper (Faceclaw lease field 101)"
|
||||
},
|
||||
{
|
||||
"offset": 926945,
|
||||
"old": "08f068fa",
|
||||
"new": "3af3c7f8",
|
||||
"new": "39f34fff",
|
||||
"desc": "bl faceclaw_display_start @ 0x45c65a (fail-open double-tap takeover)"
|
||||
},
|
||||
{
|
||||
"offset": 927137,
|
||||
"old": "08f008fa",
|
||||
"new": "3af367f8",
|
||||
"new": "39f3effe",
|
||||
"desc": "bl faceclaw_display_start @ 0x45c71a (fail-open double-tap takeover)"
|
||||
},
|
||||
{
|
||||
"offset": 822553,
|
||||
"old": "28f003f8",
|
||||
"new": "54f3b5f8",
|
||||
"new": "53f33dff",
|
||||
"desc": "bl evenhub_longpress (Faceclaw lease gates custom event vs stock dialog)"
|
||||
},
|
||||
{
|
||||
"offset": 823369,
|
||||
"old": "1cf09bfb",
|
||||
"new": "53f343ff",
|
||||
"new": "53f3cbfd",
|
||||
"desc": "bl ring_release (forward ring release-long-press)"
|
||||
},
|
||||
{
|
||||
"offset": 1474137,
|
||||
"old": "7fb50600",
|
||||
"new": "b4f2a1bf",
|
||||
"new": "b4f201be",
|
||||
"desc": "even_ai_display_ctrl entry -> conditional Faceclaw lease trampoline"
|
||||
},
|
||||
{
|
||||
"offset": 1022741,
|
||||
"old": "f8f7c1fe",
|
||||
"new": "20f3ebfb",
|
||||
"new": "20f303fc",
|
||||
"desc": "bl display_copy_hook @ 0x473c8e (640x480 direct framebuffer)"
|
||||
},
|
||||
{
|
||||
"offset": 1022959,
|
||||
"old": "f8f754fe",
|
||||
"new": "20f37efb",
|
||||
"new": "20f396fb",
|
||||
"desc": "bl display_copy_hook @ 0x473d68 (640x480 direct framebuffer)"
|
||||
},
|
||||
{
|
||||
"offset": 1198787,
|
||||
"old": "dff770fb",
|
||||
"new": "f7f2cafc",
|
||||
"new": "f7f2a0fb",
|
||||
"desc": "bl faceclaw_send_wear_event @ 0x49ec3c (outside onboarding)"
|
||||
},
|
||||
{
|
||||
"offset": 1198881,
|
||||
"old": "dff741fb",
|
||||
"new": "f7f29bfc",
|
||||
"new": "f7f271fb",
|
||||
"desc": "bl faceclaw_send_wear_event @ 0x49ec9a (outside onboarding)"
|
||||
},
|
||||
{
|
||||
"offset": 823567,
|
||||
"old": "1cf038fb",
|
||||
"new": "51f3aef8",
|
||||
"new": "51f3c6f8",
|
||||
"desc": "bl compass_event_forward (global IMU heading -> stock nav BLE notifier)"
|
||||
},
|
||||
{
|
||||
"offset": 4301227,
|
||||
"old": "",
|
||||
"new": "02fb01f044f6d341c0f24701084700bf084644f61751c0f24701084770b500284ed001684ef66362ccf2ff02914218bf70bd90f8081190f8095142f6c52c8d42c0f2500c2ad205eb8501014491f80d2191f80e4191f80ae191f80b3191f80c1142ea0424012c4ff0010298bf14466e1c054680f80961b9b164294eea032028bf6421012888bf024644f62060824228bf02460cf5e2731046984706e0002180f80811bde870406047e047d5f8040138b149f29942c0f244022146bde87040104770bd00bf70b54ff6fd03c0f2450314460d46984743f6fc71c2f200010e6831466ff39601b1f1005f0ad131684ef66362ccf2ff02914218bf0026412d03d070bd0026412dfbd1002cf9d04af26951c0f2450105468847002e01462846efd00129edd196f807120029e9d02168002948bf70bd47f25d02c0f2580208469047284670bd00bf2de9f04f99b043f6fc76c2f20006d6f8009048466ff39600b0f1005f40f04d81d9f800004ef66367ccf2ff07b84240f0448199f82802002800f02d81d9f82442002c00f0288140f2b870c2f20000d0f8008004a801f006f9b8f1000f00f0fb8140f2030c45f24075cff6807ca4f1600008f160026ff0bf03c0f20205016ed4182166416ec0336166816eab42a166c16ee166016f2167416f6167816fa167c16fe167d0f88010c4f88010d0f88410c4f88410d0f88810c4f88810d0f88c10c4f88c10d0f89010c4f89010d0f89410c4f89410d0f89810c4f89810d0f89c10c4f89c10d0f8a010c4f8a010d0f8a410c4f8a410d0f8a810c4f8a810d0f8ac10c4f8ac10d0f8b010c4f8b010d0f8b410c4f8b410d0f8b810c4f8b810d0f8bc10c4f8bc1050f8c01fc4f8c0104168c4f8c4108168c4f8c810c168c4f8cc100169c4f8d0104169c4f8d4108169c4f8d810c169c4f8dc10016ac4f8e010416ac4f8e410816ac4f8e810c16ac4f8ec10016bc4f8f010416bc4f8f410816bc4f8f810c16bc4f8fc10016cc4f80011416cc4f80411816cc4f80811c16cc4f80c11016dc4f81011416dc4f81411816dc4f81811c16dc4f81c117ff462afd6f800e00eea0c00b0f1005f40f08180def80000b8427cd19ef8ce00002840f050819ef8dc00002100288df8141000f0b08105aa505c002800f0838153185878002800f059819878002800f05781d878002800f055811879002800f053815879002800f051819879002800f04f81d879002800f04d81187a002800f04b81587a002800f04981987a002800f04781d87a002800f04581187b002800f04381587b002800f04181987b002800f03f81d87b002800f03d81187c002800f03b81587c002800f03981987c002800f03781d87c002800f0358114315029abd155e199f82a0270b1d9f82c0240b144f63421c2f207010968401a002800f3fb80002089f82a024cf61520c0f2460019b0bde8f04f004744f6d341c0f247014ff40c708847002800f0cc804ff6d051cff6ff7100224318463183f8302283f8312283f8322283f8332283f8342283f8352283f8362283f8372283f8382283f8392283f83a2283f83b2283f83c2283f83d2283f83e2283f83f2283f8402283f8412283f8422283f8432283f8442283f8452283f8462283f8472283f8482283f8492283f84a2283f84b2283f84c2283f84d2283f84e2283f84f2283f8502283f8512283f8522283f8532283f8542283f8552283f8562283f8572283f8582283f8592283f85a2283f85b2283f85c2283f85d2283f85e2283f85f2283f8602283f8612283f8622283f8632283f8642283f8652283f8662283f8672283f8682283f8692283f86a2283f86b2283f86c2283f86d2283f86e2283f86f2283f8702283f8712283f8722283f8732283f8742283f875227ff470af012180f8ce104ff0ff310760a0f8e010a0f8e210a0f8e410a0f8e610a0f8e810a0f8ea10a0f8ec10a0f8ee10a0f8f010a0f8f210a0f8f410a0f8f610a0f8f810a0f8fa10a0f8fc10a0f8fe1010e0002089f82802c9f8240289f82a02012089f829024cf61520c0f24600804714e000203060002089f82802c9f824024ff4163045f20f11069005a8c0f24701cdf814808847012089f82a0204a801f017f8c9f8d40019b0bde8f08f013122e0023120e003311ee004311ce005311ae0063118e0073116e0083114e0093112e00a3110e00b310ee00c310ce00d310ae00e3108e00f3106e0103104e0113102e0123100e013314f2921d84ff0520050541dd00a4445204e29507018d04f204d29907014d052204c29d07010d044204b2910710cd045204a29507108d052204929907104d020204829d07140f08d8600208df8630001219ef8dd00002870d0002205ab985c00284fd09f18787838b3b87838b3f87838b3387938b3787938b3b87938b3f87938b3387a38b3787a38b3b87a38b3f87a38b3387b38b3787b38b3b87b38b3f87b38b3387c38b3787c38b3b87c38b3f87c38b31432502ad2d13ce0013222e0023220e003321ee004321ce005321ae0063218e0073216e0083214e0093212e00a3210e00b320ee00c320ce00d320ae00e3208e00f3206e0103204e0113202e0123200e013324f2a15d84ff05300985411d013444b204e2a58700cd049204d2a987008d050204c2ad87004d020204b2a187140f0608100208df8630001319ef8de0000286cd0002105aa505c00284fd05318587838b3987838b3d87838b3187938b3587938b3987938b3d87938b3187a38b3587a38b3987a38b3d87a38b3187b38b3587b38b3987b38b3d87b38b3187c38b3587c38b3987c38b3d87c38b314315029d2d138e0013122e0023120e003311ee004311ce005311ae0063118e0073116e0083114e0093112e00a3110e00b310ee00c310ce00d310ae00e3108e00f3106e0103104e0113102e0123100e013314f2911d84ff0440050540dd00a4455204e29507008d050204d29907004d020204c29d07040f0ec8000208df8630001219ef8df0000284dd0002105aa505c002800f0bc8053185878002800f092809878002800f09080d878002800f08e801879002800f08c805879002800f08a809879002800f08880d879002800f08680187a002800f08480587a002800f08280987a002800f08080d87a00287ed0187b00287dd0587b00287cd0987b00287bd0d87b00287ad0187c002879d0587c002878d0987c002877d0d87c002876d014315029b4d1d0e0002940f0d180002105aa505c002800f0b88053185878002800f08e809878002800f08c80d878002800f08a801879002800f088805879002800f086809879002800f08480d879002800f08280187a002800f08080587a00287ed0987a00287dd0d87a00287cd0187b00287bd0587b00287ad0987b002879d0d87b002878d0187c002877d0587c002876d0987c002875d0d87c002874d014315029b6d181e0013122e0023120e003311ee004311ce005311ae0063118e0073116e0083114e00Line truncated
|
||||
"new": "02fb01f000e000bfb0b546f27424c2f22a04216846f23f52c5f28802b2eb510f44f6d3414cf67e25c0f24701caf2101518bf25608847002804bf691c2160b0bd084644f61751c0f24701084770b500284ed001684ef66562ccf2ff02914218bf70bd90f8081190f8095142f6c52c8d42c0f2500c2ad205eb8501014491f80d2191f80e4191f80ae191f80b3191f80c1142ea0424012c4ff0010298bf14466e1c054680f80961b9b164294eea032028bf6421012888bf024644f62060824228bf02460cf5e2731046984706e0002180f80811bde870406047e047d5f8040138b149f29942c0f244022146bde87040104770bd00bf70b54ff6fd03c0f2450314460d46984746f27021c2f22a010e6831466ff39601b1f1005f0ad131684ef66562ccf2ff02914218bf0026412d03d070bd0026412dfbd1002cf9d04af26951c0f2450105468847002e01462846efd00129edd196f807120029e9d02168002948bf70bd47f25d02c0f2580208469047284670bd00bf2de9f04f99b046f27027c2f22a07d7f800b058466ff39600b0f1005f40f04f81dbf800004ef66566ccf2ff06b04240f0468141f224200beb000898f80400002800f02b81d8f80040002c00f0268140f2b870c2f20000d0f800a004a801f04af9baf1000f00f0a98140f2030c45f24075cff6807ca4f160000af160026ff0bf03c0f20205016ed4182166416ec0336166816eab42a166c16ee166016f2167416f6167816fa167c16fe167d0f88010c4f88010d0f88410c4f88410d0f88810c4f88810d0f88c10c4f88c10d0f89010c4f89010d0f89410c4f89410d0f89810c4f89810d0f89c10c4f89c10d0f8a010c4f8a010d0f8a410c4f8a410d0f8a810c4f8a810d0f8ac10c4f8ac10d0f8b010c4f8b010d0f8b410c4f8b410d0f8b810c4f8b810d0f8bc10c4f8bc1050f8c01fc4f8c0104168c4f8c4108168c4f8c810c168c4f8cc100169c4f8d0104169c4f8d4108169c4f8d810c169c4f8dc10016ac4f8e010416ac4f8e410816ac4f8e810c16ac4f8ec10016bc4f8f010416bc4f8f410816bc4f8f810c16bc4f8fc10016cc4f80011416cc4f80411816cc4f80811c16cc4f80c11016dc4f81011416dc4f81411816dc4f81811c16dc4f81c117ff462af3d6805ea0c00b0f1005f40f080802868b0427cd195f8ce00002840f0008195f8dc00002100288df8141000f0608105aa505c002800f0338153185878002800f009819878002800f00781d878002800f005811879002800f003815879002800f001819879002800f0ff80d879002800f0fd80187a002800f0fb80587a002800f0f980987a002800f0f780d87a002800f0f580187b002800f0f380587b002800f0f180987b002800f0ef80d87b002800f0ed80187c002800f0eb80587c002800f0e980987c002800f0e780d87c002800f0e58014315029abd105e198f8060070b1d8f8080040b144f63421c2f207010968401a002800f3ab80002088f806004cf61520c0f2460019b0bde8f04f004741f2302041f23024fff7ddfd00287dd00021002200bf831881543032a24259709970d970197159719971d971197259729972d972197359739973d973197459749974d974197559759975d975197659769976d976197759779977d97783f8201083f8211083f8221083f8231083f8241083f8251083f8261083f8271083f8281083f8291083f82a1083f82b1083f82c1083f82d1083f82e1083f82f10bbd1012180f8ce104ff0ff310660a0f8e010a0f8e210a0f8e410a0f8e610a0f8e810a0f8ea10a0f8ec10a0f8ee10a0f8f010a0f8f210a0f8f410a0f8f610a0f8f810a0f8fa10a0f8fc10a0f8fe1010e0002088f80400c8f8000088f80600012088f805004cf61520c0f24600804714e000203860002088f80400c8f800004ff4163045f20f11069005a8c0f24701cdf814a08847012088f8060004a801f05df8cbf8d40019b0bde8f08f013122e0023120e003311ee004311ce005311ae0063118e0073116e0083114e0093112e00a3110e00b310ee00c310ce00d310ae00e3108e00f3106e0103104e0113102e0123100e013314f2921d84ff0520050541dd00a4445204e29507018d04f204d29907014d052204c29d07010d044204b2910710cd045204a29507108d052204929907104d020204829d07140f0228700208df86300012195f8dd00002870d0002205ab985c00284fd09e18707838b3b07838b3f07838b3307938b3707938b3b07938b3f07938b3307a38b3707a38b3b07a38b3f07a38b3307b38b3707b38b3b07b38b3f07b38b3307c38b3707c38b3b07c38b3f07c38b31432502ad2d13ce0013222e0023220e003321ee004321ce005321ae0063218e0073216e0083214e0093212e00a3210e00b320ee00c320ce00d320ae00e3208e00f3206e0103204e0113202e0123200e013324f2a15d84ff05300985411d013444b204e2a58700cd049204d2a987008d050204c2ad87004d020204b2a187140f0f08100208df86300013195f8de0000286cd0002205ab985c00284fd09e18707838b3b07838b3f07838b3307938b3707938b3b07938b3f07938b3307a38b3707a38b3b07a38b3f07a38b3307b38b3707b38b3b07b38b3f07b38b3307c38b3707c38b3b07c38b3f07c38b31432502ad2d138e0013222e0023220e003321ee004321ce005321ae0063218e0073216e0083214e0093212e00a3210e00b320ee00c320ce00d320ae00e3208e00f3206e0103204e0113202e0123200e013324f2a11d84ff0440098540dd0134455204e2a587008d050204d2a987004d020204c2ad87040f0258100208df86300013195f8df00002878d0002105aa505c00284fd05318587838b3987838b3d87838b3187938b3587938b3987938b3d87938b3187a38b3587a38b3987a38b3d87a38b3187b38b3587b38b3987b38b3d87b38b3187c38b3587c38b3987c38b3d87c38b314315029d2d144e0013122e0023120e003311ee004311ce005311ae0063118e0073116e0083114e0093112e00a3110e00b310ee00c310ce00d310ae00e3108e00f3106e0103104e0113102e0123100e013314f291dd84ff05300505419d00a444e204e29507014d041204d29907010d050204c29d0700cd04f204b29107108d046204a29507104d020204929907140f0b78500208df863000121786846f23f52c5f28802b2eb500f58d1c0075bd0002105aa505c002800f0f68053185878002800f09a809878002800f09a80d878002800f09a801879002800f09a805879002800f09a809879002800f09a80d879002800f09a80187a002800f09a80587a002800f09a80987a002800f09a80d87a002800f09a80187b002800f09a80587b002800f09a80987b002800f09a80d87b002800f09a80187c002800f0ab80587c002800f0ac80987c002800f0aa80d87c002800f0a88014315029abd1bfe04cf67e20caf210107860002940f0bb8000210Line truncated
|
||||
"desc": "append injected blobs to main-app payload"
|
||||
},
|
||||
{
|
||||
"offset": 777711,
|
||||
"old": "44c33500",
|
||||
"new": "9f123600",
|
||||
"new": "d2143600",
|
||||
"desc": "main-app subheader payload size (ps)"
|
||||
},
|
||||
{
|
||||
"offset": 152,
|
||||
"old": "c4c33500",
|
||||
"new": "1f133600",
|
||||
"new": "52153600",
|
||||
"desc": "main-app TOC entry size (ps + 128)"
|
||||
},
|
||||
{
|
||||
"offset": 777831,
|
||||
"old": "44c33504",
|
||||
"new": "9f123604",
|
||||
"new": "d2143604",
|
||||
"desc": "main-app preamble length (low 24 bits)"
|
||||
},
|
||||
{
|
||||
"offset": 777835,
|
||||
"old": "df8110c9",
|
||||
"new": "bf1e07ba",
|
||||
"new": "6bc58d81",
|
||||
"desc": "[5] ota/s200_firmware_ota.bin preamble crc32"
|
||||
},
|
||||
{
|
||||
"offset": 156,
|
||||
"old": "c1be0fb1",
|
||||
"new": "49a16905",
|
||||
"new": "718f48bb",
|
||||
"desc": "[5] ota/s200_firmware_ota.bin component crc32c (TOC)"
|
||||
},
|
||||
{
|
||||
"offset": 777715,
|
||||
"old": "c1be0fb1",
|
||||
"new": "49a16905",
|
||||
"new": "718f48bb",
|
||||
"desc": "[5] ota/s200_firmware_ota.bin component crc32c (subheader)"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -543,6 +543,15 @@ export class FaceclawCommunicatorBridge {
|
||||
return this.enqueueJavaCall(() => Boolean(this.communicator.sendShutdown(exitMode)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ask CFW mode 11 to release all custom-session state. On success this must
|
||||
* remain the final Faceclaw message before close(); false requests the legacy
|
||||
* shutdown/release fallback for older firmware.
|
||||
*/
|
||||
async sendCfwCleanup(): Promise<boolean> {
|
||||
return this.enqueueJavaCall(() => Boolean(this.communicator.sendCfwCleanup()));
|
||||
}
|
||||
|
||||
/**
|
||||
* End only the EvenHub page/session, leaving both arm BLE connections and
|
||||
* their async notification subscriptions alive.
|
||||
|
||||
Reference in new issue
Block a user