Skip to content

fix(audio-response): make repeated seal checks reliable - #257

Merged
TobiasRoeddiger merged 2 commits into
feature/audio-responsefrom
codex/fix-repeatable-seal-check
Jul 31, 2026
Merged

fix(audio-response): make repeated seal checks reliable#257
TobiasRoeddiger merged 2 commits into
feature/audio-responsefrom
codex/fix-repeatable-seal-check

Conversation

@TobiasRoeddiger

@TobiasRoeddiger TobiasRoeddiger commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

  • prevent audio decimation buffers from overflowing for supported factors
  • allow a completed tone upload to be replaced by the next Seal Check session
  • restore codec unmuting before playback so every requested point, including 1.025 kHz, contains a real signal
  • defer upload credits until the current GATT write releases its ACL buffer, add receive-buffer headroom, and remove per-chunk debug-log pressure

Root causes

Several independent failures appeared as the same intermittent BLE/Seal Check error:

  1. The shared decimation output and stereo scratch buffers were too small for their supported worst cases and could corrupt adjacent state.
  2. A new upload was rejected with Android GATT error 19 while the previous upload was still marked committed.
  3. The measurement setup enabled the codec but no longer explicitly unmuted it, producing near-silent response values.
  4. Upload credits were advertised from inside the active GATT write callback while the firmware had only five incoming ACL buffers. Under sustained uploads this intermittently produced No available ACL buffers followed by a lost L2CAP frame and an app timeout.

Validation

  • flashed the FOTA image to a right OpenEarable 2 through J-Link, restoring the settings partition after every flash
  • 20/20 rapid full sessions, each with a fresh 32,000-sample upload, commit, playback, capture, and nine-point result
  • 89/89 same-session measurements (one initial upload plus 88 cached repeats) before the extended run was stopped at the user's request
  • all results contained the requested 40, 60, 90, 135, 203, 304, 456, 683, and 1,025 Hz points
  • zero firmware ACL/L2CAP, transfer, playback, timeout, or result errors in the passing runs
  • zero Android UniversalBle, Pigeon, write, timeout, or operation-state errors attributable to the app
  • normal and FOTA firmware builds
  • phone bonding remained intact and encrypted throughout

Companion Flutter fix: OpenEarable/open_earable_flutter#144

@github-actions

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.elf.zip
openearable_v2_fota.zip

@github-actions

Copy link
Copy Markdown

Build output available:
openearable_v2_firmware.elf.zip
openearable_v2_fota.zip

@TobiasRoeddiger
TobiasRoeddiger merged commit 32ae4a2 into feature/audio-response Jul 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant