<?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>LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102821/le-audio-device-as-central-and-peripheral-simultaneously</link><description>My question is related to LE Audio, i guess, since i have no previous experience from it. Is it possible to have a device as a peripheral for mobile phone sending data to some characteristics and same time as a central to another nRF5340 streaming LE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 May 2024 11:00:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102821/le-audio-device-as-central-and-peripheral-simultaneously" /><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/486146?ContentTypeID=1</link><pubDate>Tue, 28 May 2024 11:00:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:880ff5bd-4be1-4511-9624-3de79837c3cf</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="MaxLi"]it seems bt_nus_init() only register callback and&amp;nbsp; return 0 directly. nus service was static register with marco&amp;nbsp;BT_GATT_SERVICE_DEFINE.[/quote]
&lt;p&gt;Have you also added the nus files and kconfigs to your project?&lt;/p&gt;
[quote user="MaxLi"]my question is whether static and dynamic registration of services can coexist？[/quote]
&lt;p&gt;Yes, you my have static and dynamic registration of services in your application.&lt;br /&gt;You will just need to make sure that your call to bt_gatt_service_register for the dynamic part does not violated the sequence order as described in the API reference documentation.&lt;br /&gt;If you do dynamically change your services you will also need to use the &amp;#39;services changed&amp;#39; service to alert a peer that it needs to do a new discovery (since all services and characteristics are discovered and cached upon connection).&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/486128?ContentTypeID=1</link><pubDate>Tue, 28 May 2024 09:40:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13c5f866-ad7f-40f0-919e-7daab4aaf9ba</guid><dc:creator>MaxLi</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1716888885944v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;it seems bt_nus_init() only register callback and&amp;nbsp; return 0 directly. nus service was static register with marco&amp;nbsp;BT_GATT_SERVICE_DEFINE.&lt;/p&gt;
&lt;p&gt;the mcs service was registed with&amp;nbsp;bt_gatt_service_register() fuction in line 1348 of&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1716889025996v3.png" alt=" " /&gt;&amp;nbsp;.&lt;/p&gt;
&lt;p&gt;my question is whether static and dynamic registration of services can coexist？&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/486118?ContentTypeID=1</link><pubDate>Tue, 28 May 2024 08:59:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9504d6ae-8e89-4aed-bbb8-1e7a4eaf11cd</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Thank you for your patience with this.&lt;/p&gt;
[quote user="MaxLi"]Is it MCS service take too much room which cause the NUS service&amp;nbsp;can not be registered?[/quote]
&lt;p&gt;This should not be a problem, no.&lt;br /&gt;Do you receive an error message from the bt_nus_init call when MCS is already initialized?&lt;br /&gt;I think the sequencing here could be the issue, &lt;a href="https://docs.zephyrproject.org/apidoc/latest/group__bt__gatt__server.html#gab4d9cfea04e44445d5dc30ad52842b64"&gt;as described in the bt_gatt_service_register API reference documentation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/485013?ContentTypeID=1</link><pubDate>Tue, 21 May 2024 09:01:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e6cfa7e-63e5-4bc2-880a-a42c185f895e</guid><dc:creator>MaxLi</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;i added the NUS service to the nrf5340_audio example act as Gateway. I also can connect to the device using NRFConnect application, but no services or characteristics appear on the NrfConnect app.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;if i comment 1.mcs service in line 726 and reflash the Gateway, the NUS service appear on NrfConnect app. any suggestion?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/6013.main.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf5340_5F00_audio_5F00_01.zip"&gt;devzone.nordicsemi.com/.../nrf5340_5F00_audio_5F00_01.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;In the&amp;nbsp;fuction bt_mcs_init() located in&amp;nbsp; \v2.6.0\zephyr\subsys\bluetooth\audio\mcs.c&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;when i comment&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;bt_gatt_service_register(&amp;amp;mcs), the nrfconnect app could show the NUS services.&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;Is it MCS service take too much room which cause the NUS service&amp;nbsp;can not be registered?&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/451214?ContentTypeID=1</link><pubDate>Thu, 19 Oct 2023 08:32:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60158cb7-125e-498f-96e4-90c3cc69d48c</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;No worries, we can resume this whenever you get a chance or would like to.&lt;br /&gt;&lt;br /&gt;You are correct that you can call &lt;a href="https://docs.zephyrproject.org/latest/connectivity/bluetooth/api/gatt.html#c.bt_gatt_service_register"&gt;bt_gatt_service_register&lt;/a&gt;&amp;nbsp;multiple times, so that should not cause any issue itself, but it could be a symptom of something else being wrong in the code.&lt;br /&gt;Please share more of the project or changes that you have made if you would like us to take a closer look at what might be going on here.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/451137?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2023 19:38:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05879f75-a1ed-486e-8d29-75739250dedb</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;Ultimately I&amp;#39;ll have to figure out why this breaks -- I thought that there could be&amp;nbsp; multiple calls to bt_gatt_register_services...&lt;/p&gt;
&lt;p&gt;For the moment, though, I don&amp;#39;t need to worry about this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/451117?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2023 16:47:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8052108e-840f-45d8-8fe1-c84cfb805f40</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Oh, I see it now - I am glad to read that you were able to resolve the issue.&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if you should encounter any other issues or questions in your work! :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/451115?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2023 16:35:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16b3522c-c975-4217-a35a-faec7699c0f4</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;I don&amp;#39;t know if you saw my update, but I tracked down the issue to the audio sample calling ble_mcs_server_init(). If I set&amp;nbsp;CONFIG_BT_MCS=n then my services/attributes show up normally.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/451113?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2023 15:41:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba71e99b-859c-4abb-b4d1-525115db6a47</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Could you share some details on what changes you made to the application to add the NUS service, and how it is behaving following these changes?&lt;br /&gt;Do you get any unexpected logs, or are there logs you would expect to see that are missing, etc?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/451103?ContentTypeID=1</link><pubDate>Wed, 18 Oct 2023 14:44:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4392ca02-64fb-46d9-a886-14903018a921</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;Ok, I tried modifying the audio sample (gateway) to only connect to a single headset and added the NUS service similar to the example referenced above. I can connect to the device using NRFConnect application, but no services or characteristics appear on the NrfConnect app. Any idea what I might be doing wrong?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Update: I found that if I temporarily remove the call to&amp;nbsp;ble_mcs_server_init() in the audio sample code, then my services will appear. Perhaps there is a conflict with the gatt_register_services done by mcs and&amp;nbsp;other gatt services?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/450495?ContentTypeID=1</link><pubDate>Mon, 16 Oct 2023 09:34:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc76ba5f-0a07-4749-8209-da717edfdb7e</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;You are correct that you will have to remove one of the existing ACLs if you wish to use it for another connection, in order to stay within the LE Audio controllers limits for concurrent connections (2 ACL + 2 ISO), since 1 CIS uses both an ACL and an ISO.&lt;br /&gt;&lt;br /&gt;If you have questions about roadmaps or future releases I must ask that you contact your Regional Sales Manager about these, since we do not discuss roadmaps and future releases here on DevZone.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/450387?ContentTypeID=1</link><pubDate>Fri, 13 Oct 2023 18:52:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f9f79d6-1c75-4b3f-843d-ded20717012d</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;[I am goijng to piggy-back a question onto this thread, as we are looking to do something similar]&lt;/p&gt;
&lt;p&gt;If I were to modify the audio example to allow the gateway to act as a peripheral BLE device, would I need to remove one of the existing ACL&amp;#39;s (e.g., remove the L or R channel) so that the ACL could be used for my peripheral connection, or is there a way to use one of the existing ACL&amp;#39;s to work for BOTH the audio/gateway connection AND the peripheral connection?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/442559?ContentTypeID=1</link><pubDate>Tue, 22 Aug 2023 12:28:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c3dd8d8-7242-4675-801a-fb970062e496</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;This approach that you detail is the best one - first familiarizing with the nRF5340 LE Audio reference application, and then merging in the &amp;#39;regular BLE&amp;#39; functionality that you require.&lt;br /&gt;Please keep in mind that you in the stereo CIS case already have 2x ISO and 2x ACLs implemented, and so you would just need to add the BLE functionality that you need to the existing ACLs.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://github.com/rick1082/sdk-nrf/commits/iso_peripheral_example"&gt;You can see an example of how quickly/easily additional services can be added to the nRF5340 Audio reference application here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Please do not hesitate at all to ask additional questions once you start looking into this yourself in the case that you should run into any issues or questions! :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/442201?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2023 07:26:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb510813-0e59-40c6-aed3-23b042edcea6</guid><dc:creator>Turo</dc:creator><description>&lt;p&gt;How would one go on about creating this kind of firmware?&lt;br /&gt;&lt;br /&gt;I am planning on buying few nRF5340 Audio DK&amp;#39;s to first play around with the Connect SDK&amp;#39;s LE Audio examples. I know there is in the Connect SDK a Central and Peripheral HRS -example and a nRF5340 Audio Application. Could this functionality be achieved by the help of these examples or is there some compatibility issues?&lt;br /&gt;&lt;br /&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LE Audio device as central and peripheral simultaneously</title><link>https://devzone.nordicsemi.com/thread/441872?ContentTypeID=1</link><pubDate>Thu, 17 Aug 2023 13:01:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8ec2ddf-4f92-4257-9dc2-b1407fdb500c</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]i guess, since i have no previous experience from it.[/quote]
&lt;p&gt;Thank you for clarifying, this is very helpful for us to know when answering the remaining questions! :)&amp;nbsp;&lt;/p&gt;
[quote user=""]Is it possible to have a device as a peripheral for mobile phone sending data to some characteristics and same time as a central to another nRF5340 streaming LE Audio (CIS)?[/quote]
&lt;p&gt;Yes, that is indeed possible - the &amp;#39;ACL&amp;#39; which runs alongside the CIS to control the stream is actually nothing more than a regular BLE connection as you already know it.&lt;br /&gt;There is currently a limitation of concurrently supporting 2 ISO + 2 ACLs, but so long as you are within this you should be fine. Essentially, you may indeed act as a gateway to another nRF5340 Headset device, and concurrently work as a peripheral to a connected smartphone (regular BLE connection).&lt;/p&gt;
[quote user=""]I&amp;#39;m just wondering for example how much resources this LE Audio (CIS) takes.[/quote]
&lt;p&gt;The largest swath of resources are used for the LC3 encoding, and the rule of thumb there is that it will consume roughly ~30% CPU to encode a 96 kbps stream, and ~16% to decode the same stream.&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if you should have any follow-up questions to this! :)&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>