<?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>Advertising a group of services failed.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3511/advertising-a-group-of-services-failed</link><description>Hi, 
 I tried to combine BLE HRS &amp;amp; UART together on nrf51822. The service initialization code is 
 void advertising_init(void)
{
 uint32_t err_code;
 ble_advdata_t advdata;
	
 uint8_t flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;

 ble_uuid_t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 17 Aug 2014 05:35:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3511/advertising-a-group-of-services-failed" /><item><title>RE: Advertising a group of services failed.</title><link>https://devzone.nordicsemi.com/thread/12699?ContentTypeID=1</link><pubDate>Sun, 17 Aug 2014 05:35:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cf0b2d1-5ec9-4131-9cdb-9e2073c971c6</guid><dc:creator>Nikita</dc:creator><description>&lt;p&gt;There is not enough space in advertising packet to contain all your sercives UUIDs. Just send all the UUIDs in scan response packet:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void advertising_init(void)
{
    uint32_t      err_code;
    ble_advdata_t advdata;
    ble_advdata_t scanrsp;

    uint8_t       flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;

    ble_uuid_t adv_uuids[] = 
    {
        {BLE_UUID_BATTERY_SERVICE,                  BLE_UUID_TYPE_BLE},
        {BLE_UUID_HEART_RATE_SERVICE,               BLE_UUID_TYPE_BLE},     
        {BLE_UUID_DEVICE_INFORMATION_SERVICE,               BLE_UUID_TYPE_BLE},
        {BLE_UUID_NUS_SERVICE,                      m_nus.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.size              = sizeof(flags);
    advdata.flags.p_data            = &amp;amp;flags;

    memset(&amp;amp;scanrsp, 0, sizeof(scanrsp));

    scanrsp.uuids_complete.uuid_cnt = sizeof(adv_uuids) / sizeof(adv_uuids[0]);
    scanrsp.uuids_complete.p_uuids  = adv_uuids;

    err_code = ble_advdata_set(&amp;amp;advdata, &amp;amp;scanrsp);
    APP_ERROR_CHECK(err_code);


}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>