<?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>nRF5340 LE Audio: BIS switching</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93038/nrf5340-le-audio-bis-switching</link><description>Hello, 
 I am developing an application based on the sample project &amp;quot;nrf5340_audio&amp;quot; and would like to be able to select which gateway signal the headset receives when there are multiple gateways. 
 Is there an API to switch the target gateway of BIS?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Dec 2022 01:13:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93038/nrf5340-le-audio-bis-switching" /><item><title>RE: nRF5340 LE Audio: BIS switching</title><link>https://devzone.nordicsemi.com/thread/398662?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2022 01:13:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c049f97-ffad-4d00-8a1e-6b4b7ec8d3a7</guid><dc:creator>gocchan</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We have confirmed that BIS reception can be stopped and resynchronized by using bis_headset_cleanup() and bt_audio_broadcast_sink_scan_start().&lt;/p&gt;
&lt;p&gt;And by using the id available with the callback, it seems that we can choose which gateway to receive next.&lt;/p&gt;
&lt;p&gt;Resynchronization takes 2-3 seconds. I wish it was a bit more seamless, but I got it to work the way I wanted it to.&lt;/p&gt;
&lt;p&gt;Regards,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Gotoda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 LE Audio: BIS switching</title><link>https://devzone.nordicsemi.com/thread/398185?ContentTypeID=1</link><pubDate>Tue, 29 Nov 2022 16:45:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef24cfeb-8da1-4c42-a9a3-8c3d702b5414</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello Gotoda,&lt;/p&gt;
&lt;p&gt;Sorry&amp;nbsp; about the delay.&lt;/p&gt;
&lt;p&gt;I will look into this shortly.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 LE Audio: BIS switching</title><link>https://devzone.nordicsemi.com/thread/396331?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2022 06:32:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fba758a6-5b53-4eb1-915a-cb6dd864f0b0</guid><dc:creator>gocchan</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I implemented it as follows.&lt;/p&gt;
&lt;p&gt;First, I increased the number of elements of the broadcast_sinks[] array defined in broadcast_sink.c to 2 to store 2 pieces of broadcast information.&amp;nbsp;However, even with two gateways in close proximity, only one piece of information was stored.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define HOSI_BT_AUDIO_BROADCAST_SNK_COUNT 2

static struct bt_audio_iso broadcast_sink_iso
	[HOSI_BT_AUDIO_BROADCAST_SNK_COUNT][BROADCAST_SNK_STREAM_CNT];
static struct bt_audio_ep broadcast_sink_eps
	[HOSI_BT_AUDIO_BROADCAST_SNK_COUNT][BROADCAST_SNK_STREAM_CNT];
static struct bt_audio_broadcast_sink broadcast_sinks[HOSI_BT_AUDIO_BROADCAST_SNK_COUNT];&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Next, thinking that the scan to find other gateways had stopped when it synchronized with the first gateway, I called bt_audio_broadcast_sink_scan_start() at the end of the sync_broadcast_pa() function in broadcast_sink.c. However, an error code of -120 is returned.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void sync_broadcast_pa(const struct bt_le_scan_recv_info *info,
			      uint32_t broadcast_id)
{
	struct bt_audio_broadcast_sink_cb *listener;
	struct bt_le_per_adv_sync_param param;
	struct bt_audio_broadcast_sink *sink;
	static bool pa_cb_registered;
	int err;

	if (!pa_cb_registered) {
		static struct bt_le_per_adv_sync_cb cb = {
			.synced = pa_synced,
			.recv = pa_recv,
			.term = pa_term,
			.biginfo = biginfo_recv
		};

		bt_le_per_adv_sync_cb_register(&amp;amp;cb);

		pa_cb_registered = true;
	}

	sink = broadcast_sink_free_get();
	/* Should never happen as we check for free entry before
	 * scanning
	 */
	__ASSERT(sink != NULL, &amp;quot;sink is NULL&amp;quot;);

	bt_addr_le_copy(&amp;amp;param.addr, info-&amp;gt;addr);
	param.options = 0;
	param.sid = info-&amp;gt;sid;
	param.skip = PA_SYNC_SKIP;
	param.timeout = interval_to_sync_timeout(info-&amp;gt;interval);
	err = bt_le_per_adv_sync_create(&amp;amp;param, &amp;amp;sink-&amp;gt;pa_sync);
	if (err != 0) {
		BT_ERR(&amp;quot;Could not sync to PA: %d&amp;quot;, err);
		err = bt_le_scan_stop();
		if (err != 0 &amp;amp;&amp;amp; err != -EALREADY) {
			BT_ERR(&amp;quot;Could not stop scan: %d&amp;quot;, err);
		}

		SYS_SLIST_FOR_EACH_CONTAINER(&amp;amp;sink_cbs, listener, _node) {
			if (listener-&amp;gt;scan_term != NULL) {
				listener-&amp;gt;scan_term(err);
			}
		}
	} else {
		sink-&amp;gt;syncing = true;
		sink-&amp;gt;pa_interval = info-&amp;gt;interval;
		sink-&amp;gt;broadcast_id = broadcast_id;
#if 1 /* Added. */
		if(bt_audio_broadcast_get_array_size() &amp;lt; ARRAY_SIZE(broadcast_sinks))
		{
			err = bt_audio_broadcast_sink_scan_start(BT_LE_SCAN_PASSIVE);
			if(err)
			{
				BT_ERR(&amp;quot;bt_audio_broadcast_sink_scan_start(): %d&amp;quot;, err);
			}
		}
#endif
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Is it possible to play broadcast signals from one gateway while receiving broadcast signals from another gateway?&lt;/p&gt;
&lt;p&gt;Regards,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Gotoda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 LE Audio: BIS switching</title><link>https://devzone.nordicsemi.com/thread/394051?ContentTypeID=1</link><pubDate>Fri, 04 Nov 2022 06:53:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23e3a6d6-ad9a-44d4-aa28-9c14653ad653</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="gocchan"]Thank you, I&amp;#39;ll refer to the function and the thread.[/quote]
&lt;p&gt;Great! &lt;/p&gt;
[quote user="gocchan"]Is there a function for establishing BIS?[/quote]
&lt;p&gt;You can find all Bluetooth related code relating to BIS in the files &lt;code&gt;&lt;span&gt;le_audio_bis_gateway.c&lt;/span&gt;&lt;/code&gt; and &lt;code&gt;&lt;span&gt;le_audio_bis_headset.c&lt;/span&gt;&lt;/code&gt; from the nRF5340 Audio application. &lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;br /&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 LE Audio: BIS switching</title><link>https://devzone.nordicsemi.com/thread/393555?ContentTypeID=1</link><pubDate>Wed, 02 Nov 2022 01:53:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fb1f802-67f6-4764-87a8-832be2475ee6</guid><dc:creator>gocchan</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you, I&amp;#39;ll refer to the function and the thread.&lt;/p&gt;
&lt;p&gt;Is there a function for establishing BIS?&lt;/p&gt;
&lt;p&gt;Regards,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Gotoda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 LE Audio: BIS switching</title><link>https://devzone.nordicsemi.com/thread/393060?ContentTypeID=1</link><pubDate>Fri, 28 Oct 2022 14:03:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ad8d28a-84ed-4db8-af32-ea76d499c036</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/subsys/bluetooth/audio/broadcast_sink.c#L796"&gt;bt_audio_broadcast_sink_scan_start()&lt;/a&gt; may help to scan for available gateways.&lt;/p&gt;
&lt;p&gt;You can also add the gateway you want to connect to to a whitelist. &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/83306/selective-connection-to-a-specific-gateway"&gt;This thread &lt;/a&gt;may be of some help here.&lt;/p&gt;
&lt;p&gt;I am happy to help more and maybe test some configurations after the weekend.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;br /&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 LE Audio: BIS switching</title><link>https://devzone.nordicsemi.com/thread/392867?ContentTypeID=1</link><pubDate>Thu, 27 Oct 2022 14:03:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c31a3b8-63c2-4202-a643-5cfdd760b74a</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
&lt;p&gt;I have not found an existing API for gateway switching, but I will search some more.&lt;/p&gt;
&lt;p&gt;Thank you for your patience.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;br /&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 LE Audio: BIS switching</title><link>https://devzone.nordicsemi.com/thread/391775?ContentTypeID=1</link><pubDate>Fri, 21 Oct 2022 06:09:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22154d44-6f05-4269-92bb-9b6959af8f8a</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello Gotoda,&lt;/p&gt;
&lt;p&gt;This should be possible, but I need some more time to find out if there is an existing API for gateway switching.&lt;/p&gt;
&lt;p&gt;Thank you for your patience.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;br /&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>