<?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>Manufacturer data read fails</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45930/manufacturer-data-read-fails</link><description>SDK 15.2 API 6.1 SES 
 I am trying to read manufacturer data. I know i am advertising it because i can see it on the nRF connect app on my phone. When i try an dparse the data it is like data is not there. My info line for p_adv_report-&amp;gt;data.len = 18</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 May 2019 19:49:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45930/manufacturer-data-read-fails" /><item><title>RE: Manufacturer data read fails</title><link>https://devzone.nordicsemi.com/thread/184723?ContentTypeID=1</link><pubDate>Wed, 01 May 2019 19:49:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40ebd23d-675d-41f1-ac3d-31cc7fac3f39</guid><dc:creator>ricardo vasquez rossi</dc:creator><description>&lt;p&gt;Hi Dmleone&lt;/p&gt;
&lt;p&gt;did you solve your problem? could you share to me?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks..&lt;/p&gt;
&lt;p&gt;Ricardo&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Manufacturer data read fails</title><link>https://devzone.nordicsemi.com/thread/181054?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 12:32:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:760519f2-a563-4b26-81d6-7bcf485986f1</guid><dc:creator>dmleone</dc:creator><description>&lt;p&gt;Here is my advertising_init function. Looking at it,it appears i wrap the UUID i am looking for in srdata and the manuf data in advdata and then encode those separately. Are these encode advertising packets you speak of?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am looking for the TB_UUID_SERVICE and parsing the packet with that information. However it appears the manufacturing data appears in the packet with the m_adv_data[0] UUID.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**@brief Function for initializing the Advertising functionality.
 */ 
static void advertising_init(void)
{
    ret_code_t      err_code;
    ble_advdata_t   advdata;
    ble_advdata_t   srdata;
    
    is_advertising                      = false;
    
    ble_advdata_manuf_data_t            manuf_data; //Variable to hold manufacturer specific data
    uint8_t data[]                      = {25,13}; //Our data to advertise
    manuf_data.company_identifier       =  MANUFACTURER_COMPANY_ID;
    manuf_data.data.p_data              = data;
    manuf_data.data.size                = sizeof(data);
    
    ble_uuid_t adv_uuids[] = {{TB_UUID_SERVICE, m_tlbx.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.uuids_complete.uuid_cnt     = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    advdata.uuids_complete.p_uuids      = m_adv_uuids;
    advdata.p_manuf_specific_data       = &amp;amp;manuf_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: Manufacturer data read fails</title><link>https://devzone.nordicsemi.com/thread/181045?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 12:22:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d648856a-de37-4226-adc8-d7ee182cd1dc</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It may be that the UUIDs and the manufacturer data are not present in the same advertising packets. If the manufacturer data or the uuids are in the scan response, and the other is in the &amp;quot;normal&amp;quot; advertising packet, these will be two different advertising reports.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How is the advertisement set up in the peripheral?&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>