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 Reply Children
  • 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

Related