<?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>Unable to hexdump complete extended advertisement data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40367/unable-to-hexdump-complete-extended-advertisement-data</link><description>NRF_LOG_RAW_HEXDUMP_INFO() is not printing complete Extended Advertisement data in HEX format. It just prints first 80 bytes of whole advertisement packet. 
 I added below case in ble_evt_handler() function to catch advertisement. 
 case BLE_GAP_EVT_ADV_REPORT</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 11 Oct 2019 11:37:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40367/unable-to-hexdump-complete-extended-advertisement-data" /><item><title>RE: Unable to hexdump complete extended advertisement data</title><link>https://devzone.nordicsemi.com/thread/214581?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2019 11:37:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60732126-0640-45d3-bb43-7403febe4dda</guid><dc:creator>Martin H.</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I can confirm that this was a problem with the config of the logger module.&lt;br /&gt;I found:&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define NRF_LOG_MAX_HEXDUMP            (NRF_LOG_MSGPOOL_ELEMENT_SIZE*NRF_LOG_MSGPOOL_ELEMENT_COUNT/2)&lt;/pre&gt;Which in my case would evaluate to 80!.&lt;/p&gt;
&lt;p&gt;I adjusted the configs like this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;//==========================================================
// &amp;lt;o&amp;gt; NRF_LOG_MSGPOOL_ELEMENT_SIZE - Size of a single element in the pool of memory objects. 
// &amp;lt;i&amp;gt; If a small value is set, then performance of logs processing
// &amp;lt;i&amp;gt; is degraded because data is fragmented. Bigger value impacts
// &amp;lt;i&amp;gt; RAM memory utilization. The size is set to fit a message with
// &amp;lt;i&amp;gt; a timestamp and up to 2 arguments in a single memory object.

#ifndef NRF_LOG_MSGPOOL_ELEMENT_SIZE
#define NRF_LOG_MSGPOOL_ELEMENT_SIZE 32
#endif

// &amp;lt;o&amp;gt; NRF_LOG_MSGPOOL_ELEMENT_COUNT - Number of elements in the pool of memory objects 
// &amp;lt;i&amp;gt; If a small value is set, then it may lead to a deadlock
// &amp;lt;i&amp;gt; in certain cases if backend has high latency and holds
// &amp;lt;i&amp;gt; multiple messages for long time. Bigger value impacts
// &amp;lt;i&amp;gt; RAM memory usage.

#ifndef NRF_LOG_MSGPOOL_ELEMENT_COUNT
#define NRF_LOG_MSGPOOL_ELEMENT_COUNT 16
#endif&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to hexdump complete extended advertisement data</title><link>https://devzone.nordicsemi.com/thread/214557?ContentTypeID=1</link><pubDate>Fri, 11 Oct 2019 10:44:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20f43164-ef50-4db0-81c1-80468b72d617</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see. This looks like a problem with the configuration of the logger module. The first thing I would try is to increase the value of&amp;nbsp;NRF_LOG_MSGPOOL_ELEMENT_SIZE and/or&amp;nbsp;NRF_LOG_MSGPOOL_ELEMENT_COUNT in your projects nrf_config.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to hexdump complete extended advertisement data</title><link>https://devzone.nordicsemi.com/thread/214331?ContentTypeID=1</link><pubDate>Thu, 10 Oct 2019 10:47:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44979df9-23e6-4b65-9abe-e9fd5bd958c6</guid><dc:creator>Martin H.</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I`m also struggling with this issue.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;ble_pheriperal:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void advertising_init(void)
{
    ret_code_t                  err_code;
    ble_advertising_init_t      init;
    ble_advdata_manuf_data_t    manuf_data;     //Variable to hold manufacturer specific data

    memset(&amp;amp;init, 0, sizeof(init));
    
    
    uint8_t data[]                       = &amp;quot;This is my extended manufacture-data which I always send with my advertise. May the force be with U&amp;quot;; //Our data to advertise
    manuf_data.company_identifier        = 0x0059;  //Nordic company ID
    manuf_data.data.p_data               = data;
    manuf_data.data.size                 = sizeof(data);
    init.advdata.p_manuf_specific_data   = &amp;amp;manuf_data;

    init.advdata.name_type               = BLE_ADVDATA_NO_NAME;
    init.advdata.include_appearance      = true;
    init.advdata.flags                   = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    init.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    init.advdata.uuids_complete.p_uuids  = m_adv_uuids;

    init.config.ble_adv_fast_enabled     = true;
    init.config.ble_adv_fast_interval    = APP_ADV_INTERVAL;
    init.config.ble_adv_fast_timeout     = APP_ADV_DURATION;

    init.config.ble_adv_primary_phy      = BLE_GAP_PHY_1MBPS;
    init.config.ble_adv_secondary_phy    = BLE_GAP_PHY_1MBPS;
    init.config.ble_adv_extended_enabled = true;

    init.evt_handler = on_adv_evt;

    err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);
    APP_ERROR_CHECK(err_code);

    ble_advertising_conn_cfg_tag_set(&amp;amp;m_advertising, APP_BLE_CONN_CFG_TAG);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;ble_central:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void scan_evt_handler(scan_evt_t const * p_scan_evt)
{
    switch(p_scan_evt-&amp;gt;scan_evt_id)
    {
        case NRF_BLE_SCAN_EVT_SCAN_TIMEOUT:
        {
            NRF_LOG_INFO(&amp;quot;Scan timed out.&amp;quot;);
            scan_start();
        } break;
        case NRF_BLE_SCAN_EVT_FILTER_MATCH:         // A filter is matched or all filters are matched in the multifilter mode
        {
            ble_gap_evt_adv_report_t const *p_adv_report = p_scan_evt-&amp;gt;params.filter_match.p_adv_report;
            NRF_LOG_INFO(&amp;quot;advertising data ID: %d&amp;quot;, p_adv_report-&amp;gt;data_id);
            NRF_LOG_INFO(&amp;quot;Reported length of scan buffer: %d&amp;quot;, p_adv_report-&amp;gt;data.len);
            NRF_LOG_INFO(&amp;quot;Extended advertising set: %d&amp;quot;, p_adv_report-&amp;gt;type.extended_pdu);            
            NRF_LOG_INFO(&amp;quot;primary PHY: %d&amp;quot;, p_adv_report-&amp;gt;primary_phy);
            NRF_LOG_INFO(&amp;quot;secondary PHY: %d&amp;quot;, p_adv_report-&amp;gt;secondary_phy);
            NRF_LOG_INFO(&amp;quot;aux_offset: %d [uS] * 100&amp;quot;, p_adv_report-&amp;gt;aux_pointer.aux_offset);
            NRF_LOG_INFO(&amp;quot;aux_phy: %d&amp;quot;, p_adv_report-&amp;gt;aux_pointer.aux_phy);
            NRF_LOG_RAW_HEXDUMP_INFO(p_adv_report-&amp;gt;data.p_data, p_adv_report-&amp;gt;data.len);
            NRF_LOG_RAW_INFO (&amp;quot;----------------------------------\r\n&amp;quot;);
         } break;
        default:
          break;
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;ble_central_scan_params:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static ble_gap_scan_params_t m_scan_param =                 /**&amp;lt; Scan parameters requested for scanning and connection. */
{
    .active        = 0x00,
    .interval      = SCAN_INTERVAL,
    .window        = SCAN_WINDOW,
    .filter_policy = BLE_GAP_SCAN_FP_ACCEPT_ALL,
    .timeout       = SCAN_DURATION,
//    .scan_phys     = BLE_GAP_PHY_CODED,                                 // Choose only one of the following scan_phys
    .scan_phys     = BLE_GAP_PHY_1MBPS,
//    .scan_phys     = BLE_GAP_PHY_2MBPS,
    .extended      = 1,
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Log-output:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1570704395290v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to hexdump complete extended advertisement data</title><link>https://devzone.nordicsemi.com/thread/156914?ContentTypeID=1</link><pubDate>Mon, 12 Nov 2018 14:17:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53f2eb4f-112c-4a3c-9df6-fc6caf54b63d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I cannot see for sure which buffer you are printing. Are you sure it the same as&amp;nbsp;ble_gap_evt_adv_report_t::data.p_data (which is passed with the BLE_GAP_EVT_ADV_REPORT event)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>