<?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>Failed to set the broadcast type</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126827/failed-to-set-the-broadcast-type</link><description>If the BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE is not set successfully in the broadcast settings, it will result in an error of NRF_ERROR_INVALID_FLAGS when calling sd_ble_gap_adv_data_set. What should I do? 
 
 
 
 
 The following is the usage condition</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Feb 2026 01:16:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126827/failed-to-set-the-broadcast-type" /><item><title>RE: Failed to set the broadcast type</title><link>https://devzone.nordicsemi.com/thread/560600?ContentTypeID=1</link><pubDate>Mon, 09 Feb 2026 01:16:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70c56d1d-ee32-439c-821a-9ac96a3dc847</guid><dc:creator>zhg77</dc:creator><description>&lt;p&gt;Hi ,&lt;/p&gt;
&lt;p&gt;OK,Thank you.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;zhg77&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to set the broadcast type</title><link>https://devzone.nordicsemi.com/thread/560465?ContentTypeID=1</link><pubDate>Thu, 05 Feb 2026 14:53:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2c834ea-d4fd-409d-910a-a509d9a40033</guid><dc:creator>Samruddhi Jadhav</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE is 1 bit which has the value 0x02. On the other hand, BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE is a combination of 2 bits which gives the value of 0x06. The Bluetooth stack or SoftDevice only accepts certain flag values such as 0x06 or 0x05. If you try to use only BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE which has the value of 0x02, then it isn&amp;#39;t an allowed combination and you will therefore receive that error.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Samruddhi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to set the broadcast type</title><link>https://devzone.nordicsemi.com/thread/560276?ContentTypeID=1</link><pubDate>Wed, 04 Feb 2026 01:06:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e5b3cc5-cbbc-4cf1-a1af-3c85c82f7cb8</guid><dc:creator>zhg77</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is a combination of:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE&amp;nbsp;&amp;nbsp;and&amp;nbsp;&amp;nbsp;BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED，&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This combination setting is fine.But&amp;nbsp; I need that&amp;nbsp;&lt;span&gt;&amp;nbsp;using a single flag&amp;nbsp;&amp;nbsp;BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE，Is this not allowed? Why? Is it due to the limitations of the Bluetooth protocol stack?&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;zhg77&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to set the broadcast type</title><link>https://devzone.nordicsemi.com/thread/560229?ContentTypeID=1</link><pubDate>Tue, 03 Feb 2026 13:10:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33b3b73d-fd20-41f5-9e39-ada4291ab29d</guid><dc:creator>Samruddhi Jadhav</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The issue here seems to be that the advertising flags you set are forming an invalid combination which is why you are seeing that error. Nordic recommends using predefined valid combinations. The flags field must use a valid combination of bits. Currently, you are using a single flag. Try using:&lt;/p&gt;
&lt;p&gt;BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is a combination of:&lt;/p&gt;
&lt;p&gt;BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE and&amp;nbsp; BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Let me know if you have any further questions.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Samruddhi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>