The CONFIG_BT_MAX_CONN of nRF5340 audio application on SDK V2.6.0

Hello,

Because i want to connect more than two headset to one gateway, so i modify the prj.conf as follow

CONFIG_AUDIO_DEV=2
CONFIG_BT_MAX_CONN=4
CONFIG_BT_MAX_PAIRED=4
But when it will crashed when the gateway started to run:
So what is the problem? How can i can implement the function of more than two headset connect to one gateway.
Thank you very much and looking forward to your help!
Parents
  • Hi, 

    The nRF5340 Audio: Unicast client currently supports up to 2 headsets, one for left and one for right. 

    The default configuration will try to allocate high-quality QoS settings for two headsets. Trying to extend the BT_MAX_CONN will make the controller cannot allocate the proper resource (out of bandwidth). The crash error code shows the controller cannot allocate proper timing resources when creating CIG (connected isochronous group). 

    Would you like to make every headset get different streams or share the same stream contents? 

    If you want to share the same stream with multiple headsets, BIS would be the better way. BIS is a unidirectional communication protocol that allows for broadcasting one or more audio streams from a source device to an unlimited number of receivers that are not connected to the source.

    Regards,
    Amanda H.

  • Hello Amanda

    Thank you for your reply!

    Would you like to make every headset get different streams or share the same stream contents? 

    Yes, in our user scenarios, the gateway may be send different signal to more than two headsets,  and this scenarios in our product in not work in the BIS mode. So i need to check the limitation of connection.

    So, can i decrease the quality to increase the connection number? If i can, how much will the audio quality will decrease? I need to test and evaluate this result. So do you have any suggestions for me?

    Thank you very much and looking forward to your reply!

Reply
  • Hello Amanda

    Thank you for your reply!

    Would you like to make every headset get different streams or share the same stream contents? 

    Yes, in our user scenarios, the gateway may be send different signal to more than two headsets,  and this scenarios in our product in not work in the BIS mode. So i need to check the limitation of connection.

    So, can i decrease the quality to increase the connection number? If i can, how much will the audio quality will decrease? I need to test and evaluate this result. So do you have any suggestions for me?

    Thank you very much and looking forward to your reply!

Children
  • Hi,

    Unfortunately, the current audio application cannot support more than 2 headsets 

    1. The CPU resource is not enough since stereo channels could need ~66% CPU. It will increase the CPU workload while using the USB interface. It also requires more CPU workload to decode with BIDIR. 
    2. The current configuration on the unicast client is for connecting two headsets and then setting them separately for L and R channels. Then the unicast client will send the streams to each of them. The application won't be able to support the extra headsets.

    -Amanda H.

  • Hello Amanda

    Thank you for your reply! I think I understand what you mean.

    But please forgive me, I still want to ask one more questions.

    Now I am using the I2S in, so the USB function actually disabled. I want to ask if i only use the I2S in, is there enough resources can connect more than two headsets?

    Thank you very much and looking forward to your reply!

  • Hi,

    huma said:
    can i decrease the quality to increase the connection number? If i can, how much will the audio quality will decrease? I need to test and evaluate this result. So do you have any suggestions for me?

    This is not easy, since the nRF5340 audio project is designed for the TWS earbuds solution.

    But you could make a trial with

    1. In the default CIS demo, add the following configs for evaluating the CPU usage

    # Use I2S interface
    
    CONFIG_AUDIO_SOURCE_I2S=y
    
    # Change the bitrate between 32000 to 96000, the low bitrate leads to lower CPU rate
    
    CONFIG_BT_AUDIO_BITRATE_UNICAST_SRC=32000 
    
    # Change the sampling frequency
    CONFIG_BT_AUDIO_PREF_SAMPLE_RATE_16KHZ=y
    
    # Print CPU usage numbers
    CONFIG_THREAD_ANALYZER=y
    
    CONFIG_THREAD_ANALYZER_USE_PRINTK=y
    
    CONFIG_THREAD_ANALYZER_AUTO=y
    
    CONFIG_THREAD_ANALYZER_AUTO_INTERVAL=5
     

    2. You would need to figure out a way to input a multiple-channel audio stream since I2S only supports two channels.

    If you are not going to send live streams, you could store the encoded LC3 in the SD card or flash and then send the encoded streams.

    3. You would need to study the nrf/applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/unicast_client.c because that is the core of the unicast client.

    A lot of exchange will be expected. Here is a reference based on old NCS for showing how to make the unicast client be able to handle multiple unicast servers https://github.com/alexsven/sdk-nrf/commit/68a7ac3452a5c55a25ab275d761393dbdea4d5df

    -Amanda H.

  • Hello Amanda

    Sorry for late, because i was deal with another function..

    Now, i am back to this question. i use the v2.7.0 SDK, and when i modify the CONFIG_BT_MAX_CONN to 3, it will crashed, i followed the code, found the status is 7 means there is a "BT_HCI_ERR_MEM_CAPACITY_EXCEEDED" error.

    I don't understand where the memory is insufficient, is it the network core or the application core?

    It hard to continue... I found if the "param->params_count" is more than 2, in the for loop if the "

    unicast_group_add_stream_pair" called more than 2 times, the “bt_audio_cig_create” will failed.

    Can you give me some suggestions about that, Thank you very much and looking forward to your reply!

  • Hi,

    Did you follow my suggestion in the previous reply to modify?

    -Amanda H.

Related