<?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>NCS mutiple_adv_sets  get adv index</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115459/ncs-mutiple_adv_sets-get-adv-index</link><description>Hello, 
 When I use the sample mutiple_adv_sets in NCS v2.5.0, 
 I am wondering if there is a way to print the index of each AD after it has been started, so as to distinguish between different ads when they are sent (such as bt_le_ext_adv_get_index(</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 25 Oct 2024 07:33:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115459/ncs-mutiple_adv_sets-get-adv-index" /><item><title>RE: NCS mutiple_adv_sets  get adv index</title><link>https://devzone.nordicsemi.com/thread/507857?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 07:33:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0801aec3-7eaf-4dbe-b7af-0a6e7318b96d</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;An advertisement is just one advertising event that a peripheral sends out. Advertising sets is a set of advertisements with the same parameters, and setting multiple advertising sets is possible with the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/bluetooth/multiple_adv_sets/README.html"&gt;multiple adv sets sample&lt;/a&gt;. So multiple advertising sets lets a device send different advertisements concurrently with different parameters.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS mutiple_adv_sets  get adv index</title><link>https://devzone.nordicsemi.com/thread/507699?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 09:35:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8be1f6f-f870-4ba2-948b-6429b3694c5b</guid><dc:creator>qianjunwang</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Sorry, I seem to have misunderstood the concept of AD sets.&lt;br /&gt;I had thought that the number of bt_le_ext_adv established Pointers combined would be called an AD set, with one AD for each index. But to hear you say, is it building multiple AD sets? What&amp;#39;s the difference between a single AD set and a single AD?&lt;br /&gt;I expect to get the index every time I send an AD（AD set？） with that index. Just like the original multiple_adv_sets example, it has one connectable AD （set）and one unconnectable AD（set）, with different cycles. Can I get the index every time an AD packet is sent to distinguish which AD (AD set?) it is.&lt;/p&gt;
&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/pastedimage1729761609319v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My original confusion was called like this&lt;/p&gt;
&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/pastedimage1729762408380v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;In fact, the index is already specified by the argument.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m confused about this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;qianjunwang&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS mutiple_adv_sets  get adv index</title><link>https://devzone.nordicsemi.com/thread/507682?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 06:57:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77157269-4c4d-4709-9477-4be277e8a53b</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;For&amp;nbsp;&lt;strong&gt;bt_le_ext_adv_get_index()&amp;nbsp;&lt;/strong&gt;You input a struct with the advertising set, right. So you need to make different calls to this function for the different advertising sets. I&amp;#39;m not sure I understand what you mean further by how to get the pointers for them. When do you need/expect to get the array index of these adv sets?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS mutiple_adv_sets  get adv index</title><link>https://devzone.nordicsemi.com/thread/507517?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2024 08:12:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b40277c6-8033-49fb-acc6-0c1efa8c2d73</guid><dc:creator>qianjunwang</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;bt_le_ext_adv_set_data&lt;/strong&gt;&lt;span&gt;()&lt;/span&gt;&amp;nbsp;is really useful！&lt;/p&gt;
&lt;p&gt;About&amp;nbsp;&lt;strong&gt;bt_le_ext_adv_get_index&lt;/strong&gt;&lt;span&gt;()，the function is passed a pointer（*adv）as an argument.&amp;nbsp;In my example above,&amp;nbsp; I have three connectable ads in my AD set with 20ms, 50ms, and 100ms periods.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After these ads have been sent,&lt;/span&gt;&lt;span&gt;when and how should I get this pointer to use this function？&lt;/span&gt;&lt;/p&gt;
&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/pastedimage1729670807223v1.jpeg" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;qianjunwang&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS mutiple_adv_sets  get adv index</title><link>https://devzone.nordicsemi.com/thread/507273?ContentTypeID=1</link><pubDate>Tue, 22 Oct 2024 08:13:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bda8b90-0260-463a-a83c-f6da3a42daf0</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;The&amp;nbsp;&lt;strong&gt;bt_le_adv_update_data()&amp;nbsp;&lt;/strong&gt;sets single advertisments, correct. To change an advertising set&amp;#39;s adv/scan response data you can use &lt;strong&gt;bt_le_ext_adv_set_data&lt;/strong&gt;().&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;bt_le_ext_adv_get_index&lt;/strong&gt;() function gets an array index of an advertising set. The function is used to map &lt;strong&gt;bt_adv&lt;/strong&gt; to an index of an array of adv sets. It returns the index of the advertising set object.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS mutiple_adv_sets  get adv index</title><link>https://devzone.nordicsemi.com/thread/507094?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2024 09:31:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e98aed06-aa3d-4ae7-9c2c-2f2d7e29e84c</guid><dc:creator>qianjunwang</dc:creator><description>&lt;p&gt;Thank you very much for your answer.&lt;/p&gt;
&lt;p&gt;I tried bt_le_adv_update_data() again, and it seemed to work only for single AD updates, not AD set updates.&lt;/p&gt;
&lt;p&gt;Also, about the use of the bt_le_ext_adv_get_index() function. For example, if I have three connectable ads in my AD set with 20ms, 50ms, and 100ms periods, can I use this function to know which AD I am sending before each AD is sent (or at some other time)? How to use it?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;qianjunwang&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS mutiple_adv_sets  get adv index</title><link>https://devzone.nordicsemi.com/thread/506619?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2024 07:02:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2b298f3-d0f8-4104-bd1e-a334309c3d43</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;3, If two advertisers are due to be scheduled at the same time, the first one scheduled will take that slot and the second one will be rescheduled to be sent right afterwards. So it will in practice only be a slightly larger delay for the second advertiser.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS mutiple_adv_sets  get adv index</title><link>https://devzone.nordicsemi.com/thread/506536?ContentTypeID=1</link><pubDate>Wed, 16 Oct 2024 13:33:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d5b8719-0eb8-43c1-adf1-c24377fa620e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;1. The&amp;nbsp;&lt;span&gt;&lt;strong&gt;bt_le_ext_adv_get_index&lt;/strong&gt;() does exactly that, and returns the array index of an advertising set. This however is not possible for individual advertisement packets.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. Seems like you&amp;#39;ve set the bt_le_adv_update_data() params for &lt;strong&gt;bt_data&lt;/strong&gt; and &lt;strong&gt;size&lt;/strong&gt; are set to NULL and 0 respectively, which would be my guess to what this invalid argument error is caused by. I can&amp;#39;t say I understand what you&amp;#39;re trying to do here though, and in general I don&amp;#39;t think counting the advertisement index will be possible.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. That is a good question actually. I assumed the MPSL timeslots handled this, but I can&amp;#39;t see any mention of this in the sample project, so I have asked the developers now to get a straight forward answer on this.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS mutiple_adv_sets  get adv index</title><link>https://devzone.nordicsemi.com/thread/506255?ContentTypeID=1</link><pubDate>Tue, 15 Oct 2024 09:11:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35da2cd5-6184-4001-8b77-a6a4230cf203</guid><dc:creator>qianjunwang</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for your answer.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I did confuse the concept of an AD set with an AD.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1.About adv set&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Whether there is a sample for using the&amp;nbsp; &lt;em&gt;bt_le_ext_adv_get_index()&lt;/em&gt;&amp;nbsp; to&amp;nbsp;&lt;/span&gt;&lt;span&gt;distinguish between AD sets&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2.About adv packet index&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For the Counting ads package, before NCS v2.5.3 there was a function called radio notification,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; (link:&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.5.3/page/nrfxlib/mpsl/doc/radio_notification.html"&gt; https://docs.nordicsemi.com/bundle/ncs-2.5.3/page/nrfxlib/mpsl/doc/radio_notification.html&lt;/a&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I was wondering if I could count the AD packages in the callback function and write the index information to the AD packages via &lt;em&gt;bt_le_adv_update_data()&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tried counting and updating in that callback.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;By combining the (link: &lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/lessons/lesson-2-bluetooth-le-advertising/)"&gt;academy.nordicsemi.com/.../)&lt;/a&gt; Exercise 2 and (link: &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/75374/radio-notification-in-ncs"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/75374/radio-notification-in-ncs&lt;/a&gt;) a sample called 6013. The peripheral_limited_adv. Zip&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1728982309260v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1728982577371v4.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;the result：&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1728982354524v3.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It looks like I used &lt;em&gt;bt_le_adv_update_data&lt;/em&gt; incorrectly.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-22 mean &amp;nbsp;EINVAL&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is this solution theoretically sound, and how can I fix it?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3.About multiple_adv_sets sample&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It can send two ads on the same device, and if at some point these two ads collide, what will the RF do?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS mutiple_adv_sets  get adv index</title><link>https://devzone.nordicsemi.com/thread/506145?ContentTypeID=1</link><pubDate>Mon, 14 Oct 2024 13:21:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94e3bab1-51a0-4edc-a243-f6a0db6e2c04</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I think you might be mixing up advertising sets and advertisements here, and the multiple_adv_sets sample does not seem to be relevant to this question really. It seems like you want to get the index for every single advertisement packet, which is not possible I&amp;#39;m afraid.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you do in fact want to differentiate the advertising sets, you can do so with extended advertising&amp;nbsp;and the&amp;nbsp;&lt;span&gt;&lt;span&gt;bt_le_ext_adv&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;sets, which is used when setting up and starting the advertisement set, and also used with the get index function you mentioned.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>