Skip to content

feat(host): reassemble ISO SDUs and deliver them to ISO link sinks - #1014

Open
zxzxwu wants to merge 1 commit into
google:mainfrom
zxzxwu:iso-sdu-reassembly
Open

zxzxwu wants to merge 1 commit into
google:mainfrom
zxzxwu:iso-sdu-reassembly

Conversation

@zxzxwu

@zxzxwu zxzxwu commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator
  • Add IsoSdu and IsoSduAssembler to bumble.host. Each host IsoLink owns an
    assembler that reassembles fragmented HCI ISO Data packets into complete
    SDUs; malformed or out-of-sequence fragments are logged and dropped.
  • Host now emits 'iso_sdu' (handle, IsoSdu) instead of 'iso_packet', and
    CisLink/BisLink sinks receive IsoSdu instead of raw HCI_IsoDataPacket
    fragments. Drop the experimental decorator from Device.on_iso_sdu.
  • Fix Packet_Status_Flag parsing/serialization: it is a 2-bit field at
    bits 14-15 of the ISO_SDU_Length field, not a single bit at bit 15. Add
    HCI_IsoDataPacket.PbFlag and HCI_IsoDataPacket.PacketStatus enums.
  • Update apps (bench, auracast, lea_unicast) and the unicast server example
    to the new sink interface.

Breaking changes

  • Host event iso_packet is replaced by iso_sdu (handle, IsoSdu).
  • CisLink.sink / BisLink.sink now receive bumble.host.IsoSdu (use sdu.data) instead of HCI_IsoDataPacket fragments.

Testing

  • New unit tests in tests/host_test.py (assembler, packet status, error recovery, per-link assembly in Host) and tests/hci_test.py (2-bit Packet_Status_Flag).
  • pytest tests, mypy, black, ruff pass.

- Add IsoSdu and IsoSduAssembler to bumble.host. Each host IsoLink owns an
  assembler that reassembles fragmented HCI ISO Data packets into complete
  SDUs; malformed or out-of-sequence fragments are logged and dropped.
- Host now emits 'iso_sdu' (handle, IsoSdu) instead of 'iso_packet', and
  CisLink/BisLink sinks receive IsoSdu instead of raw HCI_IsoDataPacket
  fragments. Drop the experimental decorator from Device.on_iso_sdu.
- Fix Packet_Status_Flag parsing/serialization: it is a 2-bit field at
  bits 14-15 of the ISO_SDU_Length field, not a single bit at bit 15. Add
  HCI_IsoDataPacket.PbFlag and HCI_IsoDataPacket.PacketStatus enums.
- Update apps (bench, auracast, lea_unicast) and the unicast server example
  to the new sink interface.

This branch has not been deployed

No deployments
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