<?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>Update extended advert error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91528/update-extended-advert-error</link><description>Hi, 
 
 I create two extended adverts, one connectable and one none, (nRF Connect 2.0.0) using the following code: 
 
 
 
 This works great, but then i want to amend the data in the manufacturer data array and update the adverts data, so i do the array</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Oct 2022 10:38:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91528/update-extended-advert-error" /><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/389368?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 10:38:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cb709bc-6828-4abb-9e0c-ec0c23e2fbe5</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have attached my sample I used to try to recreate the issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For me&amp;nbsp;update_advert_data() seem to be working fine.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/multiple_5F00_adv_5F00_sets_5F00_test.zip"&gt;devzone.nordicsemi.com/.../multiple_5F00_adv_5F00_sets_5F00_test.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/389343?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 08:36:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c926d15-717c-407d-a07a-72596a123342</guid><dc:creator>billywalton</dc:creator><description>&lt;p&gt;I have even tried to delete the sets using the following code, with the view to recreate them:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:401px;max-width:535px;" height="401" src="https://devzone.nordicsemi.com/resized-image/__size/1070x802/__key/communityserver-discussions-components-files/4/pastedimage1664958909732v1.png" width="535" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;but bt_le_ext_adv_delete errors with a -5 (EIO?)&lt;/p&gt;
&lt;p&gt;so maybe there is some fundamental problem with the ext_ad construction&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/389331?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 08:23:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a82078e-6b2b-4dcd-84f0-bc646a218329</guid><dc:creator>billywalton</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Many thanks, i have run out of time now and am being pressed for a deliverable so would certainly appreciate a way forward.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/389326?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 08:18:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ba15a7a-944e-438d-864d-e64c4101de70</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have tried to combine your code here with the multiple_adv_sets sample, but here it fails already with the&amp;nbsp;first call at&amp;nbsp;advertising_set_create(). I think it have something to do with how&amp;nbsp;ext_ad is construed, so I&amp;#39;m looking into that now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/389316?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2022 07:45:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a4254f8-27ce-4fa5-8fe5-83b6be0881cb</guid><dc:creator>billywalton</dc:creator><description>&lt;p&gt;Everybody gone again?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/388472?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2022 07:31:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42a6a5a4-75cd-4fc3-bd9e-48967d7985f4</guid><dc:creator>billywalton</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Did you have any luck with this issue yet? is there anything else you need?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Billy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/387847?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 09:03:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94963716-bbce-48a8-90e1-6549dd4a8aeb</guid><dc:creator>billywalton</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;typedef struct __attribute__((packed)) ble_network_manufacturer_flags
{
	uint8_t                       ProhibitConnect:1;
    uint8_t                       Schedule:2;
    uint8_t                       unused:1;
    uint8_t                       TXPower:4;
	

} ble_network_manufacturer_flags_t;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/387845?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 09:01:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39ac6aaa-4aaa-4bec-b0fa-7817f8908f80</guid><dc:creator>billywalton</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;typedef struct __attribute__((packed)) ble_network_manufacturer_data
{
	uint8_t									LismoreID_0;
	uint8_t             					LismoreID_1;
	uint8_t 					   			DeviceType;
	uint8_t 					   			ChannelID;
	uint8_t 					   			AddressID;
	uint8_t 					   			EventID;
	uint16_t 					   			UserID;
    uint16_t                                PreviousUserID;
	ble_network_manufacturer_flags_t 		Flags;
	uint8_t 					   			CurrentPriority;
	int8_t 					   				CalibratedRSSI;
	int8_t 					   				MinimumRSSI;

    uint32_t                                NetworkCRC;



} ble_network_manufacturer_data_t;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/387839?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 08:55:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8aa19614-570a-43f6-8cb5-a6a534a22bf7</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="billywalton"]Using the code at the top of this ticket[/quote]
&lt;p&gt;I got&amp;nbsp;error: unknown type name &amp;#39;ble_network_manufacturer_data_t&amp;#39; when building.&lt;/p&gt;
&lt;p&gt;Could you post the code that shows how you have defined&amp;nbsp;&lt;span&gt;ble_network_manufacturer_data_t as well?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/387810?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 07:36:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad7e56b9-64e9-4c34-b185-936ec93a0dcf</guid><dc:creator>billywalton</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Many thanks for the reply, CONFIG_BT_EXT_ADV_MAX_ADV_SET is set to two, as all i want is two advertisements, i do not want to add another advertisement, just amend the values (not length) od the current ones:&lt;/p&gt;
&lt;p&gt;Using the code at the top of this ticket, setup and start the adverts - everything works perfectly, and i see the two adverts with correct data&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;now change the advert data, for example&lt;/p&gt;
&lt;p&gt;m_network_manufacturer_data.NetworkCRC = 0x12345678&lt;/p&gt;
&lt;p&gt;now call update_advert_data() - this is where the error appears; rather than updating the current adverts, it seems to be trying to make them longer or adding a new one&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/387690?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2022 12:23:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f21ef55-153c-4d46-84da-f9233c19228e</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry for the delay. Joakim is out of office. This case have been assigned to me.&lt;/p&gt;
&lt;p&gt;What did you set&amp;nbsp;&lt;span&gt;CONFIG_BT_EXT_ADV_MAX_ADV_SET to? Could to try to increase that value?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If increasing the value does not work, would it be possible for you to create a small sample&amp;nbsp;that reproduces this issue, that I could have a look at? I think that might be the fastest way to solve this now.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/387079?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2022 12:55:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73875def-582a-49dd-9d02-c312612349c6</guid><dc:creator>billywalton</dc:creator><description>&lt;p&gt;Gentle bump.... Its been 11 days&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is it possible to assign this ticket to someone who has a little more time on their hands please?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/385570?ContentTypeID=1</link><pubDate>Fri, 09 Sep 2022 20:36:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a2e3a50-8969-449e-8d97-333197ab151e</guid><dc:creator>billywalton</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Even when i start and stop the adverts with the following code, i get the same error&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:487px;max-width:638px;" height="487" src="https://devzone.nordicsemi.com/resized-image/__size/1276x974/__key/communityserver-discussions-components-files/4/pastedimage1662755795749v1.png" width="638" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/385345?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 14:47:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a6899d4-b2d7-424d-bef8-2bc3bb3eaeec</guid><dc:creator>billywalton</dc:creator><description>&lt;p&gt;The advertisement works fine when initially started, everything is great&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I want to update the adverts manufacturing data value, the size is never changed, its the second call to the bt_le_ext_adv_set_data function that causes the error, not the first call.&amp;nbsp; If it was a size problem, then the first call would also fail, the same array is being used in both calls&lt;/p&gt;
&lt;p&gt;I suspect the bt_le_ext_adv_set_data call is trying to pend the array onto the end of the array from the first call, rather than remove the array and replace it - thus increasing the size - but this is not what i want.&lt;/p&gt;
&lt;p&gt;All i want to do is update the values being advertised by the first call to bt_le_ext_adv_set_data - how can i do this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/385336?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 14:06:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7082a871-62a4-40a9-bee7-b62fa11b9ab8</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If the advertising set has been configured for extended advertising, then the maximum data length is defined by the controller with the maximum possible of&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/gap.html?highlight=bt_le_ext_adv_set_data#group__bt__gap__defines_1ga53af114e4925482739dc50dc84c2f641"&gt;&lt;span&gt;BT_GAP_ADV_MAX_EXT_ADV_DATA_LEN&lt;/span&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;bytes.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When updating the advertising data while advertising the advertising data and scan response data length must be smaller or equal to what can be fit in a single advertising packet. Otherwise the advertiser must be stopped.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Br,&amp;nbsp;&lt;br /&gt;Joakim&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/385222?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 09:45:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77123a72-756b-408a-9993-7c9245f5751c</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry about the delay.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll look at your ticket and get back to you by the end of day today!&lt;/p&gt;
&lt;p&gt;Br,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/385174?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 07:52:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51fc0e7c-44a3-466b-acab-7fee76b7a7f0</guid><dc:creator>billywalton</dc:creator><description>&lt;p&gt;anybody there?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update extended advert error</title><link>https://devzone.nordicsemi.com/thread/384467?ContentTypeID=1</link><pubDate>Sun, 04 Sep 2022 20:12:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af7007de-92f9-4a04-81af-613706914f80</guid><dc:creator>billywalton</dc:creator><description>&lt;p&gt;Just like to add to this, when i edit the array data i am not increasing the size of the array, i am only changing the value of an array member - is the call to bt_le_ext_adv_set_data trying to append the entire array onto the end of the current array?&lt;/p&gt;
&lt;p&gt;What i want to do is replace it, not append it&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>