Skip to content

Windows: BLE workflow serial notifications are delivered twice #11212

Description

@dhalbert

Claude wrote this:

Over the BLE workflow serial connection from Chrome on Windows, every notification arrives twice. Consistently, not intermittently. The same board and the same firmware do not show it from Chrome on macOS.

Not investigated beyond the observation, so the cause could be anywhere: the peripheral sending twice, the Windows BLE stack delivering twice, or the editor subscribing twice.

What is known

  • Seen on Chrome on Windows; not reproduced on macOS with the same board and build.
  • The board was a Feather nRF52840 Express running CircuitPython 10.3.0-alpha.4.
  • It duplicates the data the user sees in the terminal, so it is user-visible rather than merely wasteful.

Worth checking first

  • Whether the duplication is on air or above it. A sniffer or btmon-equivalent trace would settle immediately whether the peripheral sends one notification or two.
  • Whether the TX characteristic's CCCD gets subscribed twice — connectToSerial() in the web editor removes and re-adds its characteristicvaluechanged listener before calling startNotifications(), so a double subscription is a plausible shape for this.
  • Whether it survives a page reload, and whether it appears on a first connection or only after a reconnect.

Notes

Observed during the three-platform testing behind #11178, and originally recorded in a comment there that has since been removed because most of its content was superseded. This observation was not, and it is unrelated to that PR's changes.

Also unexplained on Windows, and possibly related: Chrome spins while reading boot_out.txt for the board-information dialog. That one is noted as pre-existing in #11178.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions