When the check itself fails, the only option was Retry. Add two more:
Install proceeds as if stock flashable firmware had been detected (straight
to the flash page), and Skip proceeds as if compatible custom firmware had
been detected — routed through the same classification path, so the
phone-side G2 font extraction still runs when the fonts are missing. Both
appear only in the error phase; Back and Retry keep their places.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ZqzwmRQ3HQxasBz5rYyZV
On stock 2.2.9 the settings read on the right lens goes unanswered even after
a successful security-auth exchange and fresh pairing. Since no 2.2.9-era
capture of a settings read exists (g2flash only exercises auth + OTA), turn
the probe into an experiment that a single on-device run can settle:
- Log every control-channel frame (sid/flag/type/magic/frag/payload prefix)
and every write under the FaceclawDeviceInfo logcat tag.
- Retry the settings read once before concluding a lens is silent.
- Accept a sid-0x09 frame carrying firmware versions on the device's own
magic (an unsolicited push) as an answer, not just the awaited ack.
- If the right lens stays silent, run the same connect/auth/prelude/read
against the LEFT lens and use its answer, logging which lens replied, to
test whether 2.2.9 moved the settings endpoint.
The probe now takes both arm addresses; the firmware-check page passes them.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ZqzwmRQ3HQxasBz5rYyZV
Firmware 2.2.9 requires the sid-0x80 DEVICE_SETTINGS/AUTHENTICATION(4)
exchange shortly after each GATT connection: it gates query responses on
completing it over an encrypted link, and closes unauthenticated links after
~30 s. On a phone with no existing bond (no inherited stock-app pairing) the
exchange is also what triggers SMP pairing. This is why the onboarding
firmware check failed with "no response to the device-info query" on a fresh
device: the probe connected, the prelude was acked, but the settings query was
never answered and no pairing ever happened. (See
../notes/ble-connections-2.2.9.md, validated by g2flash on hardware.)
- BleProtocol: buildAuthenticationRequest / isAuthenticationSuccess (strict:
command 4, matching magic, empty result message), SID_SECURITY_AUTH.
- Device-info probe: authenticates before the prelude with a 30 s window (the
user may need to accept an OS pairing prompt; the check page says so). Soft
on non-response since the probe also runs against the custom firmware —
but a query timeout after unconfirmed auth now names the pairing problem.
- Flash-prompt communicator: authenticates each arm before the prelude
(mandatory — it only ever talks to stock firmware).
- Firmware flasher: control-channel notifications are now mandatory, each
lens authenticates before OTA BEGIN, and the OTA-time heartbeat is gone —
official captures show no control traffic during a transfer, heartbeats
demonstrably do not satisfy the 2.2.9 deadline, and a concurrent control
writer interleaves with the marker/data transactions. The OTA envelope
counter now resets after bring-up, mirroring the stock sequence.
- Main communicator: authenticates both arms after connecting, before the
prelude, with a short soft wait (logs and continues on timeout so firmware
that never answers cannot stall reconnects).
Hardware test pending: fresh-device onboarding against stock 2.2.9 (check,
prompt, flash), and a regression pass on custom-firmware connect + probe.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ZqzwmRQ3HQxasBz5rYyZV
Correctness:
- Pair-glasses flows no longer strand the app in the manual-disconnected
state: the pre-scan disconnect is followed by resumeAutoReconnect(), and
the config page's scan hand-off drops the live link too.
- The mixed-arms serial warning is reachable now: pairs() groups by the
canonical serial key, and a lone left + lone right with different serials
get the mismatch warning on both rows (it previously required two
different serials inside one serial-keyed group, which cannot happen).
- A selected pair that degrades to one arm (prune while the page is open)
is deselected, and Save never pads a missing arm from stored addresses.
- DiscoveryAggregator.ingest no longer lets a bonded re-emit or split
advertisement overwrite the note/name/flag learned from a full
advertisement, and reclassifies split reports using remembered fields so
a nameless half doesn't drop the arm.
- estimateProximity ignores the advertised TX Power Level (radiated power,
not measured-power-at-1m); the calibration table is the only reference.
- Saving a ring without a glasses pair updates the stored identity's ring
name/address instead of leaving the previous ring on record.
- Ring detection requires the stock "EVEN R1" name prefix in both the TS
classifier and the Java pre-filter; a bare "R1" substring matched
unrelated devices, and ring rows are always selectable.
- One-shot scans keep every sample (buildAddressSet merges them through
DiscoveryAggregator), and flash-flow address resolution takes left/right
from one serial-joined complete pair instead of latest-per-role.
Lifecycle:
- The pairing scan and its refresh timer pause on app suspend and resume
with the app, and the model's app-event hooks are detached when the page
is left for good.
Cleanup:
- One MAC normalizer (even-advertisement.normalizeMacAddress, re-exported
by device-addresses), used for the ring "Yours" comparison too.
- One serial-equality definition (serialKey/serialsMatch); the containment
fallback in isPreviouslyPaired is gone.
- Shared formatErrorMessage replaces five per-view-model copies; shared
hex-util replaces the duplicate TS hex codecs; one Java bytesToHex in
FaceclawFirmwareUtil replaces three hand-rolled encoders.
- glassesRow/ringRow share a presentation-base helper; dead row address
fields, the constant glassesSectionVisibility, the identical-branch
status ternary, and zoneRank/ZONE_ORDER are removed.
- .gitignore now actually covers .test-build/ as tests/README claims.
UI:
- Dark-mode styles for the pairing page: readable instructions, dark-gray
cards with consistent light text; light mode keeps its current look.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ZqzwmRQ3HQxasBz5rYyZV
Removes unused keyword-spotting model. Makes on-device voice model a
runtime download rather than bundling it. Removes native-code library
versions for 32-bit and x86_64 processors.
Stream BLE advertisements into a dedicated pairing flow with arm, ring, serial, and hardware variant detection.
Add proximity ranking, device artwork, pairing safeguards, and unit coverage for discovery and candidate grouping.