Could not create unicast group (err -134)

I am trying the Zephry Bluetooth samples unicast_audio_server and unicast_audio_client at 

https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/bluetooth/unicast_audio_server and 

https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/bluetooth/unicast_audio_client 

On the client side when the client connects to the server, it fails to create a unicast group with error -134 on calling bt_audio_unicast_group_create()

The terminal out of the clint program is below. What could be causing this? Thanks in advance. 

[AD]: 1 data_len 1
[AD]: 3 data_len 2
Audio server found; connecting
MTU exchanged: 23/23
Connected: F4:5D:59:89:91:45 (random)
MTU exchanged: 65/65
Connected
Discovering sinks
#0: codec_capabilities 0x2000324c dir 0x01
codec 0x06 cid 0x0000 vid 0x0000 count 5
data #0: type 0x01 len 2
f5
data #1: type 0x02 len 1data #2: type 0x03 len 1data #3: type 0x04 len 4
280078
data #4: type 0x05 len 1meta #0: type 0x01 len 2
06
dir 1 loc 4
snk ctx 31 src ctx 15
Sink #0: ep 0x20003070
Sink #1: ep 0x2000315c
Discover sinks complete: err 0
Sinks discovered
Discovering sources
#0: codec_capabilities 0x200032b4 dir 0x02
codec 0x06 cid 0x0000 vid 0x0000 count 5
data #0: type 0x01 len 2
f5
data #1: type 0x02 len 1data #2: type 0x03 len 1data #3: type 0x04 len 4
280078
data #4: type 0x05 len 1meta #0: type 0x01 len 2
06
dir 2 loc 3
snk ctx 31 src ctx 15
Sink #0: ep 0x20002e98
Discover sources complete: err 0
Sources discovered
Configuring streams
Audio Stream 0x20002064 configured
Configured sink stream[0]
Audio Stream 0x20002088 configured
Configured sink stream[1]
Audio Stream 0x200020ac configured
Configured source stream[0]
Stream configured
Creating unicast group
Could not create unicast group (err -134)
[00:01:27.483,917] <err> bt_audio_stream: bt_audio_cig_create: bt_iso_cig_create failed: -134

Parents
  • Hello,

    Which controller are you using, the Zephyr Controller or the SoftDevice controller?

    The SoftDevice controller does not support ISO channels, so you will have to use the Zephyr controller to test these samples. The -134 error code means Unsupported Value, and would be returned if you were using the SoftDevice controller, for instance.

    Best regards,
    Karl

  •   Thanks for your reply. I am using the Zephyr controller ( I believe ). I build the following sample and flash it to the network core.

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/bluetooth/hci_rpmsg/README.html

    My proj.conf for the hci_rpmsg sample is as follows : 

    CONFIG_IPC_SERVICE=y
    CONFIG_MBOX=y
    
    CONFIG_HEAP_MEM_POOL_SIZE=8192
    
    CONFIG_MAIN_STACK_SIZE=512
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
    
    CONFIG_BT=y
    CONFIG_BT_HCI_RAW=y
    CONFIG_BT_HCI_RAW_RESERVE=1
    CONFIG_BT_MAX_CONN=16
    
    CONFIG_BT_CTLR_ASSERT_HANDLER=y
    
    # Workaround: Unable to allocate command buffer when using K_NO_WAIT since
    # Host number of completed commands does not follow normal flow control.
    CONFIG_BT_BUF_CMD_TX_COUNT=10
    
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_CTLR_ADV_EXT=y
    CONFIG_BT_PER_ADV=y
    
    

  • Ok. If you don't have nRF Connect SDK (NCS)  installed, please follow these instructions to install it.

    Then you can find unicast_server and unicast_client located at <ncs-installation>/zephyr/samples/bluetooth. Include CONFIG_BT_LL_SW_SPLIT to the prj.conf for both samples as Karl described and build the modified sample.

    Regards,
    Maria

  •  Thanks for your reply. However, there is still an issue. The server fails to set advertising data. Here is my output

    *** Booting Zephyr OS build v3.2.99-ncs1-1547-ge2bec540218d ***
    [00:00:00.395,599] <inf> bt_hci_core: hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.395,660] <inf> bt_hci_core: hci_vs_init: HW Variant: nRF53x (0x0003)
    [00:00:00.395,690] <inf> bt_hci_core: hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 3.2 Build 99
    [00:00:00.397,796] <inf> bt_hci_core: bt_dev_show_info: Identity: E6:15:13:0B:35:CD (random)
    [00:00:00.397,827] <inf> bt_hci_core: bt_dev_show_info: HCI: version 5.3 (0x0c) revision 0x0000, manufacturer 0x05f1
    [00:00:00.397,857] <inf> bt_hci_core: bt_dev_show_info: LMP: version 5.3 (0x0c) subver 0xffff
    Bluetooth initialized
    Location successfully set
    Available contexts successfully set
    [00:00:00.399,291] <wrn> bt_hci_core: bt_hci_cmd_send_sync: opcode 0x2037 status 0x0c
    Failed to set advertising data (err -5)
    

  • Hello,

    Sorry for the delay.

    I have reproduced your issue, but I need to do some more tests to figure out why this fails. Thank you for your patience.

    Best Regards,
    Maria

  • Hello,

    I am very sorry for taking so long to get back to you.

    Have you been able to solve your issue while you were waiting?

    I will strive to give you a further response within end of day.

    Best Regards,
    Maria

  • Hello again,

    I have not been able to completely resolve this. But I will share the progress I had.

    I modified the Unicast Audio Client and Unicast Audio Server directories by doing the following.

    This configuration was added to <ncs-installation>/zephyr/samples/bluetooth/unicast_audio_server/child_image/hci_rpmsg.conf:

    CONFIG_IPC_SERVICE=y
    CONFIG_MBOX=y
    
    CONFIG_HEAP_MEM_POOL_SIZE=8192
    
    CONFIG_MAIN_STACK_SIZE=512
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
    
    CONFIG_BT=y
    CONFIG_BT_HCI_RAW=y
    CONFIG_BT_HCI_RAW_RESERVE=1
    
    CONFIG_BT_CTLR_ASSERT_HANDLER=y
    
    # Workaround: Unable to allocate command buffer when using K_NO_WAIT since
    # Host number of completed commands does not follow normal flow control.
    CONFIG_BT_BUF_CMD_TX_COUNT=10
    
    CONFIG_BT_BROADCASTER=n
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_OBSERVER=n
    CONFIG_BT_CENTRAL=n
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_CTLR_ADV_EXT=y
    CONFIG_BT_PER_ADV=y
    CONFIG_BT_ISO_BROADCASTER=y
    CONFIG_BT_ISO_MAX_CHAN=2
    
    # ISO Broadcast Controller
    CONFIG_BT_LL_SW_SPLIT=y
    CONFIG_BT_CTLR_ADV_PERIODIC=y
    CONFIG_BT_CTLR_ADV_DATA_LEN_MAX=191
    CONFIG_BT_CTLR_ADV_ISO=y
    CONFIG_BT_CTLR_ADV_ISO_PDU_LEN_MAX=251
    CONFIG_BT_CTLR_ISO_TX_BUFFERS=16
    CONFIG_BT_CTLR_ISO_TX_BUFFER_SIZE=251
    CONFIG_BT_CTLR_ADV_ISO_STREAM_MAX=2

    This configuration was added to <ncs-installation>/zephyr/samples/bluetooth/unicast_audio_client/child_image/hci_rpmsg.conf:

    CONFIG_IPC_SERVICE=y
    CONFIG_MBOX=y
    
    CONFIG_HEAP_MEM_POOL_SIZE=8192
    
    CONFIG_MAIN_STACK_SIZE=512
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
    
    CONFIG_BT=y
    CONFIG_BT_HCI_RAW=y
    CONFIG_BT_HCI_RAW_RESERVE=1
    
    CONFIG_BT_CTLR_ASSERT_HANDLER=y
    
    # Workaround: Unable to allocate command buffer when using K_NO_WAIT since
    # Host number of completed commands does not follow normal flow control.
    CONFIG_BT_BUF_CMD_TX_COUNT=10
    
    CONFIG_BT_BROADCASTER=n
    CONFIG_BT_PERIPHERAL=n
    CONFIG_BT_OBSERVER=n
    CONFIG_BT_CENTRAL=y
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_CTLR_ADV_EXT=y
    CONFIG_BT_PER_ADV_SYNC=y
    CONFIG_BT_ISO_SYNC_RECEIVER=y
    CONFIG_BT_ISO_MAX_CHAN=2
    
    # ISO Receive Controller
    CONFIG_BT_LL_SW_SPLIT=y
    CONFIG_BT_CTLR_SYNC_PERIODIC=y
    CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX=191
    CONFIG_BT_CTLR_SYNC_ISO=y
    CONFIG_BT_CTLR_SYNC_ISO_PDU_LEN_MAX=251
    CONFIG_BT_CTLR_SYNC_ISO_STREAM_MAX=2
    CONFIG_BT_CTLR_ISOAL_SINKS=2
    

    This resolved the "Failed to set advertising data (err -5)" error. Unfortunately it resulted in another error: BT_HCI_ERR_UNKNOWN_CONN_ID, which occurs when the client attempts to connect to the server. 

    To get further help with this I advise you to contact the Zephyr Project on Discord. The reason for this being that the samples and the controller was all created by Zephyr.

    Best Regards,
    Maria

Reply
  • Hello again,

    I have not been able to completely resolve this. But I will share the progress I had.

    I modified the Unicast Audio Client and Unicast Audio Server directories by doing the following.

    This configuration was added to <ncs-installation>/zephyr/samples/bluetooth/unicast_audio_server/child_image/hci_rpmsg.conf:

    CONFIG_IPC_SERVICE=y
    CONFIG_MBOX=y
    
    CONFIG_HEAP_MEM_POOL_SIZE=8192
    
    CONFIG_MAIN_STACK_SIZE=512
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
    
    CONFIG_BT=y
    CONFIG_BT_HCI_RAW=y
    CONFIG_BT_HCI_RAW_RESERVE=1
    
    CONFIG_BT_CTLR_ASSERT_HANDLER=y
    
    # Workaround: Unable to allocate command buffer when using K_NO_WAIT since
    # Host number of completed commands does not follow normal flow control.
    CONFIG_BT_BUF_CMD_TX_COUNT=10
    
    CONFIG_BT_BROADCASTER=n
    CONFIG_BT_PERIPHERAL=y
    CONFIG_BT_OBSERVER=n
    CONFIG_BT_CENTRAL=n
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_CTLR_ADV_EXT=y
    CONFIG_BT_PER_ADV=y
    CONFIG_BT_ISO_BROADCASTER=y
    CONFIG_BT_ISO_MAX_CHAN=2
    
    # ISO Broadcast Controller
    CONFIG_BT_LL_SW_SPLIT=y
    CONFIG_BT_CTLR_ADV_PERIODIC=y
    CONFIG_BT_CTLR_ADV_DATA_LEN_MAX=191
    CONFIG_BT_CTLR_ADV_ISO=y
    CONFIG_BT_CTLR_ADV_ISO_PDU_LEN_MAX=251
    CONFIG_BT_CTLR_ISO_TX_BUFFERS=16
    CONFIG_BT_CTLR_ISO_TX_BUFFER_SIZE=251
    CONFIG_BT_CTLR_ADV_ISO_STREAM_MAX=2

    This configuration was added to <ncs-installation>/zephyr/samples/bluetooth/unicast_audio_client/child_image/hci_rpmsg.conf:

    CONFIG_IPC_SERVICE=y
    CONFIG_MBOX=y
    
    CONFIG_HEAP_MEM_POOL_SIZE=8192
    
    CONFIG_MAIN_STACK_SIZE=512
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
    
    CONFIG_BT=y
    CONFIG_BT_HCI_RAW=y
    CONFIG_BT_HCI_RAW_RESERVE=1
    
    CONFIG_BT_CTLR_ASSERT_HANDLER=y
    
    # Workaround: Unable to allocate command buffer when using K_NO_WAIT since
    # Host number of completed commands does not follow normal flow control.
    CONFIG_BT_BUF_CMD_TX_COUNT=10
    
    CONFIG_BT_BROADCASTER=n
    CONFIG_BT_PERIPHERAL=n
    CONFIG_BT_OBSERVER=n
    CONFIG_BT_CENTRAL=y
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_CTLR_ADV_EXT=y
    CONFIG_BT_PER_ADV_SYNC=y
    CONFIG_BT_ISO_SYNC_RECEIVER=y
    CONFIG_BT_ISO_MAX_CHAN=2
    
    # ISO Receive Controller
    CONFIG_BT_LL_SW_SPLIT=y
    CONFIG_BT_CTLR_SYNC_PERIODIC=y
    CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX=191
    CONFIG_BT_CTLR_SYNC_ISO=y
    CONFIG_BT_CTLR_SYNC_ISO_PDU_LEN_MAX=251
    CONFIG_BT_CTLR_SYNC_ISO_STREAM_MAX=2
    CONFIG_BT_CTLR_ISOAL_SINKS=2
    

    This resolved the "Failed to set advertising data (err -5)" error. Unfortunately it resulted in another error: BT_HCI_ERR_UNKNOWN_CONN_ID, which occurs when the client attempts to connect to the server. 

    To get further help with this I advise you to contact the Zephyr Project on Discord. The reason for this being that the samples and the controller was all created by Zephyr.

    Best Regards,
    Maria

Children
No Data
Related