<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Unable to get UnicastClient to connect to UnicastServer that only supports stereo audio stream</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120907/unable-to-get-unicastclient-to-connect-to-unicastserver-that-only-supports-stereo-audio-stream</link><description>My application is based on the ncs nrf5340_audio application, but my application and hardware target are both out-of-tree and I am using ncs v2.9.0. 
 I am able to connect to several different models of earbuds that support BLE audio where the UnicastClient</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Jun 2025 13:30:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120907/unable-to-get-unicastclient-to-connect-to-unicastserver-that-only-supports-stereo-audio-stream" /><item><title>RE: Unable to get UnicastClient to connect to UnicastServer that only supports stereo audio stream</title><link>https://devzone.nordicsemi.com/thread/538434?ContentTypeID=1</link><pubDate>Fri, 06 Jun 2025 13:30:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7169b0c5-58dd-4490-9edb-6c08275ef3eb</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi Kristopher,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is my turn to apologize for the slow response.&amp;nbsp;&lt;/p&gt;
[quote user="khett-ptd"]By default the CONFIG_BT_MAX_CONN is set to 2, so it appears I would need to make the CONFIG_BT_MAX_CONN equal to the CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT to avoid the build assertion, but that does not seem like the correct solution because for these newer earbuds, I believe we need to have one BLE link, but enable multiple audio streaming endpoints using the single BLE link.[/quote]
&lt;p&gt;An ACL needs to be established between both earbuds and the gateway. But as the document I linked states, the user experience should be the same for Bluetooth Classic and Bluetooth LE, so the connection to the second earbud should be established without additional user action.&amp;nbsp;&lt;/p&gt;
[quote user="khett-ptd"]Out of curiosity, I disabled the build assertion and set&amp;nbsp;CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT to 6.&amp;nbsp; With this change I am now able to connect to the earbuds and see the following output:[/quote]
&lt;p&gt;&lt;span&gt;Interesting. The reason for the fail for CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT=12 could just be that 12 are too many.&amp;nbsp;CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT&amp;nbsp; does represent t&lt;/span&gt;he ASE sink count per connection and since there is a connection between both earbuds and the gateway, this number should reflect the endpoint amount on one earbud. I guess this is 6 in your case?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The Audio application does not cover all use-cases, and includes some limitations. The warning about using idx 0 when more than one sink EP was found is one of those limitations.&amp;nbsp;&lt;/p&gt;
[quote user="khett-ptd"]If I revert the firmware so&amp;nbsp;&lt;span&gt;CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT=2, then when I connect to these new earbuds I get a different failure.&amp;nbsp; &lt;/span&gt;[/quote]
&lt;p&gt;This is odd. Did you erase the SoC before programming the updated source code (west flash --erase)?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to get UnicastClient to connect to UnicastServer that only supports stereo audio stream</title><link>https://devzone.nordicsemi.com/thread/534644?ContentTypeID=1</link><pubDate>Fri, 09 May 2025 11:54:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa68eb28-19d7-444c-8aef-89dcd805cf90</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi Kristopher, &lt;/p&gt;
&lt;p&gt;No worries about taking some time to get back to us. &lt;/p&gt;
&lt;p&gt;I will set aside some time to study the &amp;quot;&lt;a href="https://www.bluetooth.com/bluetooth-resources/low-energy-audio-discovery-pairing-and-connection-for-earbuds/"&gt;Low Energy Audio – Discovery, Pairing, and Connection for Earbuds&lt;/a&gt;&amp;quot; document from Bluetooth SIG. It covers the flow of the connection procedure for LE-only earbuds, and it should be possible to reproduce the error you are seeing with three nRF5340 Audio DKs. &lt;/p&gt;
&lt;p&gt;While I spend some time on this, could you check if you are able to see the same behaviour with nRF Connect SDK v3.0.1? &lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to get UnicastClient to connect to UnicastServer that only supports stereo audio stream</title><link>https://devzone.nordicsemi.com/thread/534185?ContentTypeID=1</link><pubDate>Wed, 07 May 2025 04:48:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f91f29c5-f3b6-4e20-b0b1-ea739bea76c0</guid><dc:creator>khett-ptd</dc:creator><description>&lt;p&gt;Hi Maria,&lt;/p&gt;
&lt;p&gt;Apologies for my slow response, I have been trying to do some more debugging of this issue and have made a few discoveries.&lt;/p&gt;
&lt;p&gt;I did enable the CONFIG_BT_AUDIO_EP_PRINT and I am able to see some additional endpoint capability printouts for the earbuds that work and stream audio, but for the newer earbuds that don&amp;#39;t work, the connection process fails before it gets to the point where the endpoint configurations are printed.&lt;/p&gt;
&lt;p&gt;In my previous post I mentioned that in the past I had set CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT=12, but I discovered that another project config file was overriding this so the code was actually building with the ASE_SNK_COUNT set to 2, which is the default.&amp;nbsp; After I updated the build config files so the ASE_SNK_COUNT value is actually used, I then ran into another issue.&amp;nbsp; If I set the ASE_SNK_COUNT to a value greater than 2 the code won&amp;#39;t build because of the following assertion:&lt;/p&gt;
&lt;p&gt;/src/bluetooth/bt_stream/unicast/unicast_client.c:85:1: note: in expansion of macro &amp;#39;BUILD_ASSERT&amp;#39;&lt;br /&gt; 85 | BUILD_ASSERT(ARRAY_SIZE(unicast_servers[0][0]) &amp;gt;= CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT,&lt;br /&gt;&amp;quot;We need to have at least one unicast_server per ASE SINK&amp;quot;);&lt;/p&gt;
&lt;p&gt;The unicast_servers array is defined in unicast_client.c:76 as:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; le_audio_unicast_server &lt;/span&gt;&lt;span&gt;unicast_servers&lt;/span&gt;&lt;span&gt;[CONFIG_BT_ISO_MAX_CIG][&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;][CONFIG_BT_MAX_CONN];&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;By default the CONFIG_BT_MAX_CONN is set to 2, so it appears I would need to make the CONFIG_BT_MAX_CONN equal to the CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT to avoid the build assertion, but that does not seem like the correct solution because for these newer earbuds, I believe we need to have one BLE link, but enable multiple audio streaming endpoints using the single BLE link.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Out of curiosity, I disabled the build assertion and set&amp;nbsp;CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT to 6.&amp;nbsp; With this change I am now able to connect to the earbuds and see the following output:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;GW [00:00:49.782,409] &amp;lt;inf&amp;gt; main: Device connected
GW [00:00:51.638,671] &amp;lt;dbg&amp;gt; bt_mgmt: security_changed_cb: Security changed: level 2
GW [00:00:51.638,702] &amp;lt;inf&amp;gt; main: Security changed
GW [00:00:51.883,941] &amp;lt;dbg&amp;gt; unicast_client: unicast_discovery_complete_cb: Remote device does not support CSIS.
GW [00:00:51.883,972] &amp;lt;dbg&amp;gt; unicast_client: unicast_discovery_complete_cb: Unicast discovery complete cb
GW [00:00:51.884,155] &amp;lt;dbg&amp;gt; main: le_audio_msg_sub_thread: Received event = 8, current state = 1
GW [00:00:51.884,155] &amp;lt;wrn&amp;gt; main: Unexpected/unhandled le_audio event: 8
GW [00:00:52.483,978] &amp;lt;inf&amp;gt; bt_vol_ctlr: VCS discover finished
GW [00:00:56.283,843] &amp;lt;dbg&amp;gt; unicast_client: available_contexts_cb: conn: 00:02:3C:AC:F7:CB (public), snk ctx 3983 src ctx 587
GW [00:00:57.883,789] &amp;lt;wrn&amp;gt; unicast_client: More than one sink endpoint found, idx 0 is used by default
GW [00:00:58.283,813] &amp;lt;wrn&amp;gt; unicast_client: More than one sink endpoint found, idx 0 is used by default
GW [00:00:58.683,807] &amp;lt;wrn&amp;gt; unicast_client: More than one sink endpoint found, idx 0 is used by default
GW [00:01:00.283,874] &amp;lt;inf&amp;gt; unicast_client: Discovered 2 sink endpoint(s) for device 0
GW [00:01:00.283,905] &amp;lt;inf&amp;gt; unicast_client:
GW [00:01:00.283,905] &amp;lt;inf&amp;gt; unicast_client: Dev: 0 Sink EP 0
GW [00:01:00.284,027] &amp;lt;inf&amp;gt; unicast_client:     Frequencies kHz: 8, 11.025, 16, 22.05, 24, 32, 44.1, 48, 88.2, 96, 176, 192,
GW [00:01:00.284,057] &amp;lt;inf&amp;gt; unicast_client:     Frame duration ms: 7.5, 10
GW [00:01:00.284,118] &amp;lt;inf&amp;gt; unicast_client:     Channels supported: 1, 2, 3, 4, 5, 6, 7, 8
GW [00:01:00.284,118] &amp;lt;inf&amp;gt; unicast_client:     Frame length bytes: 75 - 155
GW [00:01:00.284,118] &amp;lt;inf&amp;gt; unicast_client:     Max frames per SDU: 2
GW [00:01:00.284,118] &amp;lt;inf&amp;gt; unicast_client: __________________________
GW [00:01:00.384,216] &amp;lt;inf&amp;gt; unicast_client:
GW [00:01:00.384,216] &amp;lt;inf&amp;gt; unicast_client: Dev: 0 Sink EP 1
GW [00:01:00.384,338] &amp;lt;inf&amp;gt; unicast_client:     Frequencies kHz: 8, 11.025, 16, 22.05, 24, 32, 44.1, 48, 88.2, 96, 176, 192,
GW [00:01:00.384,368] &amp;lt;inf&amp;gt; unicast_client:     Frame duration ms: 7.5, 10
GW [00:01:00.384,429] &amp;lt;inf&amp;gt; unicast_client:     Channels supported: 1, 2, 3, 4, 5, 6, 7, 8
GW [00:01:00.384,429] &amp;lt;inf&amp;gt; unicast_client:     Frame length bytes: 30 - 80
GW [00:01:00.384,429] &amp;lt;inf&amp;gt; unicast_client:     Max frames per SDU: 2
GW [00:01:00.384,429] &amp;lt;inf&amp;gt; unicast_client: __________________________
GW [00:01:00.584,808] &amp;lt;inf&amp;gt; unicast_client: LEFT sink stream configured
GW [00:01:00.584,838] &amp;lt;inf&amp;gt; le_audio: LC3 codec config for sink:
GW [00:01:00.584,838] &amp;lt;inf&amp;gt; le_audio:   Frequency: 24000 Hz
GW [00:01:00.584,869] &amp;lt;inf&amp;gt; le_audio:   Duration: 10000 us
GW [00:01:00.584,869] &amp;lt;inf&amp;gt; le_audio:   Channel allocation: 0x1
GW [00:01:00.584,869] &amp;lt;inf&amp;gt; le_audio:   Octets per frame: 60 (48000 bps)
GW [00:01:00.584,869] &amp;lt;inf&amp;gt; le_audio:   Frames per SDU: 1
GW [00:01:00.584,869] &amp;lt;dbg&amp;gt; unicast_client: stream_configured_cb: Configured Stream info: LEFT, 0x20011970, dir 1
GW [00:01:00.584,899] &amp;lt;dbg&amp;gt; unicast_client: device_pres_delay_find: Index: 0, Pref min: 0, pref max: 0, pres_min: 25000, pres
GW [00:01:00.584,899] &amp;lt;dbg&amp;gt; unicast_client: check_and_update_pd_in_group: Set LEFT, connection 0x20010d54, stream 0x20011970
GW [00:01:00.585,144] &amp;lt;dbg&amp;gt; main: le_audio_msg_sub_thread: Received event = 1, current state = 1
GW [00:01:00.585,144] &amp;lt;dbg&amp;gt; main: le_audio_msg_sub_thread: LE audio config received
GW [00:01:00.585,144] &amp;lt;dbg&amp;gt; main: le_audio_msg_sub_thread:      Sampling rate: 24000 Hz
GW [00:01:00.585,174] &amp;lt;dbg&amp;gt; main: le_audio_msg_sub_thread:      Bitrate (compressed): 48000 bps&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;Even though the firmware is now able to connect to the earbuds, I still am unable to stream audio to the earbuds.&amp;nbsp; This is likely a side effect of disabling the build assertion.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;If I revert the firmware so&amp;nbsp;&lt;span&gt;CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT=2, then when I connect to these new earbuds I get a different failure.&amp;nbsp; Here&amp;#39;s the log output that shows the error right after connecting:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;GW [00:01:31.775,756] &amp;lt;inf&amp;gt; main: Device connected
GW [00:01:33.634,368] &amp;lt;dbg&amp;gt; bt_mgmt: security_changed_cb: Security changed: level 2
GW [00:01:33.634,399] &amp;lt;inf&amp;gt; main: Security changed
GW [00:01:33.877,319] &amp;lt;dbg&amp;gt; unicast_client: unicast_discovery_complete_cb: Remote device does not support CSIS.
GW [00:01:33.877,319] &amp;lt;dbg&amp;gt; unicast_client: unicast_discovery_complete_cb: Unicast discovery complete cb
GW [00:01:33.877,502] &amp;lt;dbg&amp;gt; main: le_audio_msg_sub_thread: Received event = 8, current state = 1
GW [00:01:33.877,502] &amp;lt;wrn&amp;gt; main: Unexpected/unhandled le_audio event: 8
GW [00:01:34.477,325] &amp;lt;inf&amp;gt; bt_vol_ctlr: VCS discover finished
GW [00:01:38.277,221] &amp;lt;dbg&amp;gt; unicast_client: available_contexts_cb: conn: 00:02:3C:AC:F7:CB (public), snk ctx 3983 src ctx 587
GW [00:01:39.777,191] &amp;lt;wrn&amp;gt; unicast_client: More than one sink endpoint found, idx 0 is used by default
GW [00:01:40.227,142] &amp;lt;wrn&amp;gt; bt_bap_unicast_client: No space left to parse ASE
GW [00:01:40.227,142] &amp;lt;err&amp;gt; unicast_client: Discovery failed: -12&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Do you have any ideas for other build configuration values that might help make the code work with this kind of earbud, or are there any other tests I should try to help discover more detail about these new earbuds?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Kristopher&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to get UnicastClient to connect to UnicastServer that only supports stereo audio stream</title><link>https://devzone.nordicsemi.com/thread/532864?ContentTypeID=1</link><pubDate>Thu, 24 Apr 2025 14:24:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1aa29514-6201-4a0f-8046-d0b476526da9</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi Kristopher,&lt;/p&gt;
&lt;p&gt;We may be able to get some more details logged if you enable &lt;span&gt;CONFIG_BT_AUDIO_EP_PRINT&lt;/span&gt; in the project. &lt;/p&gt;
&lt;p&gt;Also, just to be thorough, the syntax for the Kconfig symbols you mention indicates that they are commented out. You have uncommented them in the active configuration file, right? &lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>