Skip to content

CV1 firmware advances SD read cursor before the client safely stores audio #13100

Open

Description

@j2h4u

Product impact (see PRODUCT.md and ISSUE_TRIAGE_GUIDE.MD)

  • Primary loop layer: Capture
  • Involves data loss, failed capture, or broken sync/trust

Describe the bug

Omi CV1 firmware 3.0.21 can permanently discard a small tail of offline audio when a BLE storage transfer disconnects.

The firmware advances and persists the SD ring read pointer from the bt_gatt_notify_cb completion callback every approximately two seconds and again on disconnect. That callback means a notification was transmitted over BLE; it does not prove that the client application received a complete record and saved it locally. If the link drops between those two events, reconnect starts after records that the client cannot recover.

This behavior was introduced by #9954, which describes TX completion as proof that the phone has received the data and claims there is no data-loss risk. The later storage-authoritative firmware work in #10654 identifies the same boundary explicitly: "notification completion is flow control, not durability", and changes deletion to occur only after explicit client ADVANCE. That PR was closed without promotion.

To Reproduce

  1. Run CV1 firmware 3.0.21 with offline audio in the SD ring.
  2. Start a bounded ring READ from the current read_seq using a client that saves complete records before advancing its durable local cursor.
  3. Interrupt BLE during the transfer, especially on a weak link.
  4. Reconnect and request RING_INFO.
  5. Compare the device read_seq with the first sequence not yet durably saved by the client.

Current behavior

The device read_seq can be ahead of the client's saved prefix, making those records permanently unavailable.

Observed with a protocol-compatible self-hosted collector and an unmodified retail CV1 on official firmware 3.0.21:

  • 2026-09-07 23:25 UTC: a transfer was interrupted on a very weak BLE link; the last advertisement sample was -127 dBm.
  • 2026-09-08 07:45 UTC: on reconnect, the device cursor was 22 records ahead of the client's locally saved prefix.
  • Confirmed loss: 22 records, 9,768 raw bytes.
  • Earlier runs repeatedly produced the same 21- or 22-record cursor gap, consistent with a bounded systematic acknowledgement window.

The collector records a loss only after the device reports a cursor strictly beyond the client's saved prefix. No audio content, Bluetooth address, account identifier, or user identifier is included here.

Expected behavior

BLE transmission completion must not delete source audio. The firmware should advance read_seq only after an explicit CMD_RING_ADVANCE from the client, sent after complete records have been safely stored. A disconnect before that command should leave the records available for replay.

Suggested acceptance checks:

  • Interrupt a transfer at arbitrary notification boundaries and verify that read_seq never exceeds the last explicit client advance.
  • Reconnect and replay every unadvanced record without gaps or duplicates.
  • Cover notification completion followed immediately by disconnect.
  • Preserve the explicit INFO / READ / ADVANCE behavior developed in feat(firmware): make CV1 capture storage-authoritative #10654 without requiring the broader experimental rollout from that PR.

Smartphone + device

  • Client: protocol-compatible Linux BLE collector
  • Device: retail Omi CV1
  • Device firmware: official 3.0.21
  • Omi app/account: not involved in this reproduction

Additional context

Activity

  1. aryanorastar commented on Oct 3, 2026

    @aryanorastar
    Collaborator

    Related Featurebase report: an iOS/CV1 user reports that an approximately 80-minute recording begins syncing from pendant to phone, then disappears from the app and never processes after they background and reopen Omi. This has happened several times. The report does not include app/iOS/firmware versions, device ring cursor, local WAL state, or server-job evidence, so it is not yet proven to be this firmware bug (the iOS background-sync path could also be involved). Please compare the affected recording time with pendant read/write sequence, phone-local recordings/WAL, and backend sync jobs before declaring it unrecoverable or attributing it to #13100. Related physical-device validation: #19563; firmware fix PR #19327 remains open.

  2. added
    capture
    p1
    p0
    and removed
    capture
    p1
    p0
    on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    capturep0

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions