<?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>Bluetooth Extended Advertising limited to only 112 bytes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117878/bluetooth-extended-advertising-limited-to-only-112-bytes</link><description>Howdy! 
 I am working with the nRF52840 and currently getting a weird error. Whenever I set the data for the BT_DATA function as anything greater than 110, the system stops advertising. I have tried various different max array sizes from 114 up to 1600</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Jan 2025 10:18:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117878/bluetooth-extended-advertising-limited-to-only-112-bytes" /><item><title>RE: Bluetooth Extended Advertising limited to only 112 bytes</title><link>https://devzone.nordicsemi.com/thread/517641?ContentTypeID=1</link><pubDate>Thu, 09 Jan 2025 10:18:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55563ccb-bdb9-44b8-ac7c-6d30a329f71d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;&lt;span&gt;Howdy!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Was the CONFIG_BT_CTLR_ADV_DATA_LEN_MAX setting the one you tried increasing in your project configuration? This is typically the only setting you need to modify to support longer advertisement packets. It is usually set to a lower value by default to minimize RAM usage. I also verified this with the peripheral_hr_coded sample by applying these code and configuration changes:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="diff"&gt;diff --git a/prj.conf b/prj.conf
index 0832502..149a9a1 100644
--- a/prj.conf
+++ b/prj.conf
@@ -18,3 +18,5 @@ CONFIG_BT_CTLR_ADV_EXT=y
 
 CONFIG_BT_EXT_ADV=y
 CONFIG_BT_USER_PHY_UPDATE=y
+
+CONFIG_BT_CTLR_ADV_DATA_LEN_MAX=251
diff --git a/src/main.c b/src/main.c
index a69cd76..8320780 100644
--- a/src/main.c
+++ b/src/main.c
@@ -40,12 +40,13 @@ static K_WORK_DELAYABLE_DEFINE(notify_work, notify_work_handler);
 
 static struct bt_le_ext_adv *adv;
 
-static const struct bt_data ad[] = {
+static struct bt_data ad[] = {
 	BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
 	BT_DATA_BYTES(BT_DATA_UUID16_ALL, BT_UUID_16_ENCODE(BT_UUID_HRS_VAL),
 					  BT_UUID_16_ENCODE(BT_UUID_BAS_VAL),
 					  BT_UUID_16_ENCODE(BT_UUID_DIS_VAL)),
-	BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN)
+	BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN),
+	BT_DATA(BT_DATA_MANUFACTURER_DATA, &amp;quot;just zeroes&amp;quot;, 6),
 };
 
 
@@ -95,8 +96,7 @@ static int create_advertising_coded(void)
 	int err;
 	struct bt_le_adv_param param =
 		BT_LE_ADV_PARAM_INIT(BT_LE_ADV_OPT_CONNECTABLE |
-				     BT_LE_ADV_OPT_EXT_ADV |
-				     BT_LE_ADV_OPT_CODED,
+				     BT_LE_ADV_OPT_EXT_ADV,
 				     BT_GAP_ADV_FAST_INT_MIN_2,
 				     BT_GAP_ADV_FAST_INT_MAX_2,
 				     NULL);
@@ -107,6 +107,13 @@ static int create_advertising_coded(void)
 		return err;
 	}
 
+	static uint8_t mfg_data[120];
+
+	memset(mfg_data, 0xAA, sizeof(mfg_data));
+
+	ad[3].data = mfg_data;
+	ad[3].data_len = sizeof(mfg_data);
+	
 	printk(&amp;quot;Created adv: %p\n&amp;quot;, adv);
 
 	err = bt_le_ext_adv_set_data(adv, ad, ARRAY_SIZE(ad), NULL, 0);&lt;/pre&gt;&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;Vidar&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></channel></rss>