Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setup_data_path for iso queues #648

Merged
merged 5 commits into from
Feb 18, 2025

Conversation

pstrueb
Copy link
Contributor

@pstrueb pstrueb commented Feb 16, 2025

The auracast app only starts work again if we call setup_data_path after instantiating the IsoPacketStream object.

Before this change, the Number of completed packages event from controller to host always returns a zero handle like so:

< ISO Data TX: Handle 39 flags 0x02 dlen 104                                                                                                                                      #97 284.682500
> HCI Event: Number of Completed Packets (0x13) plen 5                                                                                                                            #98 284.682700
        Num handles: 1
        Handle: 0
        Count: 1

After this change, The broadcast is sent without any errors and can also be received with a pair of earbuds.

The setup that was used two test is with transport serial.
Tested with:

  1. nrf54l15-dk with hci_uart firmware
  2. nrf52dongle with hci_uart over usb cdc

apps/auracast.py Outdated
@@ -965,6 +965,11 @@ async def run_transmit(
bumble.device.IsoPacketStream(big.bis_links[1], 64),
]

for queue in iso_queues:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching that. Somehow this got accidentally removed in a recent PR and went unnoticed (it still worked with the BT controller on my Pixel phone...).
However, it might be more straightforward to express this as:

for bis_link in big.bis_links:
    await bis_link.setup_data_path(
        direction=bis_link.Direction.HOST_TO_CONTROLLER
)

above line 963

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will do

@barbibulle
Copy link
Collaborator

Would you be able to share the .conf files you used to build the HCI UART sample apps on Zephyr with ISO packets enabled? (I have a few nrf54l15-dk and nrf52dongle boards, I'd love to be able to use them for LE audio, but the config "out of the box" doesn't seem to have all the controller features enabled, and my very simple attempt at trying to add things to the config didn't quite work out)

@pstrueb
Copy link
Contributor Author

pstrueb commented Feb 17, 2025

Would you be able to share the .conf files you used to build the HCI UART sample apps on Zephyr with ISO packets enabled? (I have a few nrf54l15-dk and nrf52dongle boards, I'd love to be able to use them for LE audio, but the config "out of the box" doesn't seem to have all the controller features enabled, and my very simple attempt at trying to add things to the config didn't quite work out)

It dont see why not :). I put it here: hci_uart. Im not sure if this covers all the usecases since I tested mostly broadcasting but it sure is a starting point. See sample.yaml for some hints how to build. The flash_dongle.sh script can be used to flash the nrf52dongle after putting it into bootloader mode.

apps/auracast.py Outdated
@@ -692,7 +692,7 @@ async def run_receive(
def on_new_broadcast(broadcast: BroadcastScanner.Broadcast) -> None:
if scan_result.done():
return
if broadcast_id is None or broadcast.broadcast_id == broadcast_id:
if broadcast_id is None or broadcast.broadcast_:id == broadcast_id:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidental keystroke?

@barbibulle
Copy link
Collaborator

This just needs a formatting pass before we can commit (check the error message in the output of the GH Actions)

@pstrueb
Copy link
Contributor Author

pstrueb commented Feb 17, 2025

This just needs a formatting pass before we can commit (check the error message in the output of the GH Actions)

Sorry buts its not really clear for me from the logs what the formatter wanted to change or what the linter complained about. I was able to run black locally. So we will see if this is ok now.

@barbibulle barbibulle merged commit 8315a60 into google:main Feb 18, 2025
57 checks 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.

2 participants