<?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>how to reduce advertising packet length?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89158/how-to-reduce-advertising-packet-length</link><description>Hello, 
 I used the NRF52810 controller for BLE application. I have a code in which BLE advertising packet length is 32 byte i have to reduce it to 23 bytes 
 Following is buffer which store advertising data. 
 
 
 In above buffer I reduce the Manufacture</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Jun 2022 13:35:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89158/how-to-reduce-advertising-packet-length" /><item><title>RE: how to reduce advertising packet length?</title><link>https://devzone.nordicsemi.com/thread/373475?ContentTypeID=1</link><pubDate>Tue, 21 Jun 2022 13:35:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4263f9bd-79d4-4639-a76c-415713020011</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I guess you can check what sd_ble_gap_adv_data_set() returns, and I assume that it returns something not equal to 0 (== NRF_SUCCESS).&lt;/p&gt;
&lt;p&gt;I suggest you refer to one of the samples that actually use advertising, such as the SDK\examples\ble_peripheral\ble_app_uart example. This doesn&amp;#39;t have manufacturer specific data, but if you try to add:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void advertising_init(void)
{
    uint32_t               err_code;
    ble_advertising_init_t init;

    memset(&amp;amp;init, 0, sizeof(init));

    init.advdata.name_type          = BLE_ADVDATA_FULL_NAME;
    init.advdata.include_appearance = false;
    init.advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
    init.advdata.p_manuf_specific_data = p_my_manufacturer_specific_data;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And this pointer needs to be a ble_advdata_manuf_data_t pointer. So initialize it something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ble_advdata_manuf_data_t * p_my_manufacturer_specific_data = 
    {
        .company_identifier = 0xFFFF
        .BC_advertData;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And always check the return values of the function calls where the function returns a value. If it doesn&amp;#39;t return 0, check what that return value means.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>