<?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>Multilink central adding advertising. Error 12 on advertising_start()</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49978/multilink-central-adding-advertising-error-12-on-advertising_start</link><description>Hi. I have added advertising to my multilink central project SDK15.0. Running on a nRF52840. 
 I get a error 12 when advertising_start(); is called on startup. I believe this means adv packet is too big. 
 However I don&amp;#39;t see how this could be the case</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Jul 2019 14:00:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49978/multilink-central-adding-advertising-error-12-on-advertising_start" /><item><title>RE: Multilink central adding advertising. Error 12 on advertising_start()</title><link>https://devzone.nordicsemi.com/thread/200106?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2019 14:00:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97a6d43a-a5b9-413b-a1d5-b93ae89aed05</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Thanks for the info.&lt;/p&gt;
&lt;p&gt;Non connectable is not a massive deal for this application, would be nice to get it working but might give up on this for now as it is causing knock on issues else where.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink central adding advertising. Error 12 on advertising_start()</title><link>https://devzone.nordicsemi.com/thread/200092?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2019 13:30:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cad5d7e8-2254-4127-a25f-7035b553fb4d</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Note that the Advertising Module (used in most SDK 15 examples) does not let you do Non-Connectable advertising&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/49354/non-connectable-advertising/196520#196520"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/49354/non-connectable-advertising/196520#196520&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/49872/advertise-connected-when-connected/198912#198912"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/49872/advertise-connected-when-connected/198912#198912&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink central adding advertising. Error 12 on advertising_start()</title><link>https://devzone.nordicsemi.com/thread/200080?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2019 13:22:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52ccf54d-507d-4f0f-a37c-c33f01e93e48</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Thanks Joakim.&lt;/p&gt;
&lt;p&gt;The advertising init is totally different to that in the NUS example, doesn&amp;#39;t seem to be consistent across the examples. I managed to update my code so it uses the adv init function from blinky.&lt;/p&gt;
&lt;p&gt;However I now can&amp;#39;t get the power output function to work.&lt;/p&gt;
&lt;p&gt;How would I modify the blinky example below to change the adv transmit power output? The below doesn&amp;#39;t work, gives a 3004 error.&lt;/p&gt;
&lt;p&gt;err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, &amp;amp;m_adv_handle, 8);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void advertising_init(void)
{
    ret_code_t    err_code;
    ble_advdata_t advdata;
    ble_advdata_t srdata;

    uint8_t testData[8] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88 };

    ble_advdata_manuf_data_t manuf_specific_data;
    manuf_specific_data.company_identifier = APP_COMPANY_IDENTIFIER;
    manuf_specific_data.data.p_data = testData;
    manuf_specific_data.data.size   = 0x08;

    ble_uuid_t adv_uuids[] = {{LBS_UUID_SERVICE, m_lbs.uuid_type}};

    // Build and set advertising data.
    memset(&amp;amp;advdata, 0, sizeof(advdata));

    advdata.name_type          = BLE_ADVDATA_FULL_NAME;
    advdata.include_appearance = true;
    advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    advdata.p_manuf_specific_data = &amp;amp;manuf_specific_data;

    memset(&amp;amp;srdata, 0, sizeof(srdata));
    srdata.uuids_complete.uuid_cnt = sizeof(adv_uuids) / sizeof(adv_uuids[0]);
    srdata.uuids_complete.p_uuids  = adv_uuids;

    err_code = ble_advdata_encode(&amp;amp;advdata, m_adv_data.adv_data.p_data, &amp;amp;m_adv_data.adv_data.len);
    APP_ERROR_CHECK(err_code);

    err_code = ble_advdata_encode(&amp;amp;srdata, m_adv_data.scan_rsp_data.p_data, &amp;amp;m_adv_data.scan_rsp_data.len);
    APP_ERROR_CHECK(err_code);

    ble_gap_adv_params_t adv_params;

    // Set advertising parameters.
    memset(&amp;amp;adv_params, 0, sizeof(adv_params));

    adv_params.primary_phy     = BLE_GAP_PHY_1MBPS;
    adv_params.duration        = APP_ADV_DURATION;
    adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED;
    adv_params.p_peer_addr     = NULL;
    adv_params.filter_policy   = BLE_GAP_ADV_FP_ANY;
    adv_params.interval        = APP_ADV_INTERVAL;

    err_code = sd_ble_gap_adv_set_configure(&amp;amp;m_adv_handle, &amp;amp;m_adv_data, &amp;amp;adv_params);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink central adding advertising. Error 12 on advertising_start()</title><link>https://devzone.nordicsemi.com/thread/199786?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2019 12:36:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:121e7d9b-9105-46a3-bc6f-bc60da71da31</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In order to set the advertising type as non-connectable, you have to change the advertising event properties (ref. ble_gap.h, line: 663).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can take a look how the advertising type is set in the ble_app_blinky example (ref. main.c, line: 242).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Refer to ble_gap.h, line:360 for the different GAP Advertising types.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&amp;nbsp;&lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multilink central adding advertising. Error 12 on advertising_start()</title><link>https://devzone.nordicsemi.com/thread/199232?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2019 11:14:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccd0a81e-5680-4111-92ef-baf57307ffad</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Edit: I had to make&amp;nbsp;NRF_SDH_BLE_PERIPHERAL_LINK_COUNT = 1 in the config file.&lt;/p&gt;
&lt;p&gt;It is advertising now, but as connectable device. Where in the advertsing_init function do I set it to be non-connectable?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>