Unable to create broadcast source when running broadcast_audio_source sample on nRF5340-DK

Hi,

VS Code nRF Connect plugin v2023.4.179

ncs v2.3.0

Using broadcast audio source sample on my nRF5340-DK fail with the following error:

*** Booting Zephyr OS build v3.2.99-ncs2 ***
[00:00:00.449,310] <inf> bt_hci_core: bt_dev_show_info: Identity: D2:AE:84:35:BD:E5 (random)
[00:00:00.449,340] <inf> bt_hci_core: bt_dev_show_info: HCI: version 5.2 (0x0b) revision 0x0d02, manufacturer 0x07e8
[00:00:00.449,371] <inf> bt_hci_core: bt_dev_show_info: LMP: version 5.2 (0x0b) subver 0x0d02
Bluetooth initialized
Creating broadcast source
Creating broadcast source with 2 subgroups with 2 streams
Unable to create broadcast source: -22
Unable to setup broadcast source: -22
*** Booting Zephyr OS build v3.2.99-ncs2 ***
[00:00:00.405,151] <inf> bt_hci_core: bt_dev_show_info: Identity: CB:7E:AE:B6:9F:EA (random)
[00:00:00.405,212] <inf> bt_hci_core: bt_dev_show_info: HCI: version 5.2 (0x0b) revision 0x0d02, manufacturer 0x07e8
[00:00:00.405,242] <inf> bt_hci_core: bt_dev_show_info: LMP: version 5.2 (0x0b) subver 0x0d02
Bluetooth initialized
Creating broadcast source
Creating broadcast source with 2 subgroups with 2 streams
Unable to create broadcast source: -22
Unable to setup broadcast source: -22

prj.conf is as follow:

CONFIG_MAIN_STACK_SIZE=2048

CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_AUDIO=y
CONFIG_BT_AUDIO_BROADCAST_SOURCE=y

CONFIG_BT_ISO_MAX_CHAN=2
CONFIG_BT_AUDIO_BROADCAST_SRC_STREAM_COUNT=2
CONFIG_BT_AUDIO_BROADCAST_SRC_SUBGROUP_COUNT=2
CONFIG_BT_ISO_TX_BUF_COUNT=4

CONFIG_BT_DEVICE_NAME="Broadcast Audio Source"
CONFIG_NCS_INCLUDE_RPMSG_CHILD_IMAGE=n # Make sure NCS build system won't build network core for us
CONFIG_BT_HCI_VS_EXT=n # Since we are not going to use Zephyr controller, so we have to disabled the VS command for Zephyr

I already add the configs as this post indicated,and program the firmware hex under nrf\applications\nrf5340_audio\bin\ on the network core.

What am I doing wrong?

Thanks in advance.

  • I have the same problem, my hardware is nrf 5340 audio DK.

    Working normally on xx unicast_audio_server,but same err on broadcast_audio_source.

    00> *** Booting Zephyr OS build v3.2.99-ncs2 ***
    00> -- [00:00:00.390,533] <inf> bt_hci_core: bt_dev_show_info: Identity: F4:BB:51:B1:76:8C (random)
    00> -- [00:00:00.390,594] <inf> bt_hci_core: bt_dev_show_info: HCI: version 5.2 (0x0b) revision 0x0d02, manufacturer 0x07e8
    00> -- [00:00:00.390,594] <inf> bt_hci_core: bt_dev_show_info: LMP: version 5.2 (0x0b) subver 0x0d02
    00> Bluetooth initialized
    00> Creating broadcast source
    00> Creating broadcast source with 2 subgroups with 2 streams
    00> Unable to create broadcast source: -22
    00> Unable to setup broadcast source: -22

    I don't know where the problem occurred too.

  • Hello YuChen  and 

    Just wanted to mention that this is Zephyr sample as opposed to an NCS one, so it might be a little bit harder to get running as it might support nRFs right out of the box. Though as you've seen the other case I guess you already know that.

    Did you both follow the steps in the other case? You didn't enable the zephyr controller using the config file described here

    Could you try to increase the log level and see what else is being logged?

    Regards,

    Elfving

  • Hi Elfving,

    I follow the steps in this case, program the firmware 'ble5-ctr-rpmsg_3330.hex' on the network core and add three configs:

    CONFIG_NCS_INCLUDE_RPMSG_CHILD_IMAGE=n # Make sure NCS build system won't build network core for us
    CONFIG_BT_HCI_VS_EXT=n # Since we are not going to use Zephyr controller, so we have to disabled the VS command for Zephyr
    CONFIG_BT_EXT_ADV=y

    As the note above says, I guess we are not going to use Zephyr controller?How can I enable Zephyr controller by the way?

    These are the message I got after increasing log level:

    [00:00:00.450,866] <dbg> bt_hci_core: bt_hci_driver_register: Registered RPMsg
    *** Booting Zephyr OS build v3.2.99-ncs2 ***
    --- 441 messages dropped ---
    [00:00:00.480,651] <dbg> bt_hci_core: bt_hci_cmd_create: buf 0x2000f02c
    [00:00:00.480,682] <dbg> bt_hci_core: bt_hci_cmd_send_sync: buf 0x2000f02c opcode 0x203e len 10
    [00:00:00.480,712] <dbg> bt_hci_core: process_events: count 2
    [00:00:00.480,712] <dbg> bt_hci_core: process_events: ev->state 4
    [00:00:00.480,712] <dbg> bt_hci_core: send_cmd: calling net_buf_get
    [00:00:00.480,743] <dbg> bt_hci_core: send_cmd: calling sem_take_wait
    [00:00:00.480,743] <dbg> bt_hci_core: send_cmd: Sending command 0x203e (buf 0x2000f02c) to driver
    [00:00:00.480,773] <dbg> bt_hci_core: bt_send: buf 0x2000f02c len 10 type 0
    [00:00:00.480,773] <dbg> bt_hci_driver: bt_rpmsg_send: buf 0x2000f02c type 0 len 10
    [00:00:00.480,804] <dbg> bt_hci_driver: bt_rpmsg_send: Final HCI buffer:
                                            01 3e 20 07 00 20 03 c0  03 00 00                |.> .. .. ...
    [00:00:00.480,865] <dbg> bt_hci_core: process_events: ev->state 0
    [00:00:00.480,865] <dbg> bt_conn: bt_conn_prepare_events:
    [00:00:00.480,895] <dbg> bt_hci_core: hci_tx_thread: Calling k_poll with 2 events
    [00:00:00.480,987] <dbg> bt_hci_driver: bt_rpmsg_rx: RPMsg data:
                                            04 0e 04 01 3e 20 00                             |....> .
    [00:00:00.481,018] <dbg> bt_hci_driver: bt_rpmsg_evt_recv: len 4
    [00:00:00.481,018] <dbg> bt_hci_driver: bt_rpmsg_rx: Calling bt_recv(0x2000f02c)
    [00:00:00.481,048] <dbg> bt_hci_core: bt_recv: buf 0x2000f02c len 6
    [00:00:00.481,048] <dbg> bt_hci_core: hci_cmd_complete: opcode 0x203e
    [00:00:00.481,079] <dbg> bt_hci_core: hci_cmd_done: opcode 0x203e status 0x00 buf 0x2000f02c
    [00:00:00.481,109] <dbg> bt_hci_driver: bt_rpmsg_rx: RX buf payload:
                                            00                                               |.
    [00:00:00.481,140] <dbg> bt_hci_core: bt_hci_cmd_send_sync: rsp 0x2000f02c opcode 0x203e len 1
    Creating broadcast source
    Creating broadcast source with 2 subgroups with 2 streams
    [00:00:00.481,231] <dbg> bt_audio_broadcast_source: valid_create_param: param->packing 61 is invalid
    [00:00:00.481,231] <dbg> bt_audio_broadcast_source: bt_audio_broadcast_source_create: Invalid parameters
    Unable to create broadcast source: -22
    Unable to setup broadcast source: -22

  • Hello,

    yc said:
    As the note above says, I guess we are not going to use Zephyr controller?How can I enable Zephyr controller by the way?

    You are correct that there is a difference between the Zephyr controller, and the Nordic supplied LE Audio controller (ble5-ctr-rpmsg_3330.hex, for instance). The Nordic supplied LE Audio controller is distributed as a precompiled hex, so in the case that you are using it you will need to disable the building of a network core for the sample, using the CONFIG_NCS_INCLUDE_RPMSG_CHILD_IMAGE=n kconfig.
    You will then need to program the network core separately for the sample to work.

    You could for instance use the following nrfjprog command to program the network core:

    nrfjprog --program nrf/lib/bin/bt_ll_acs_nrf53/bin/ble5-ctr-rpmsg_3330.hex --sectorerase


    Could you detail how you programmed the network core in your test?

    If you would like to use the Zephyr controller you can add the following kconfig to your prj.conf:


    CONFIG_BT_LL_SW_SPLIT=y

    Best regards,
    Karl

  • Hi Karl,

    I used the ''Programmer'' app in nRF Connect for Desktop(Both are latest version) to program the network core.

    I still don't understand how to get broadcast_audio_source sample running.

Related