title: ESP-IDF BLE scanning an advertisement package
body: <p>i am working on the ESP32 chip and am trying to get the all avaliable information from advertising. For this purpose I use the nRF connect app by NORDIC with prepare advertiser <a href="https://i.stack.imgur.com/Y01Oo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y01Oo.jpg" alt="enter image description here" /></a></p>
  <p>I scan for the device and successfully only read the complete name but i want to extract all the information from advertising.</p>
  <pre><code>case ESP_GAP_BLE_SCAN_RESULT_EVT:           
              if(param-&gt;scan_rst.search_evt == ESP_GAP_SEARCH_INQ_RES_EVT) {
  
  
                  if(!alreadyDiscovered(param-&gt;scan_rst.bda)) {
                      
                      printf(&quot;##############################\n&quot;);
                       esp_log_buffer_hex(&quot;!!!!&quot;, param-&gt;scan_rst.ble_adv, 62);
                      printf(&quot;##############################\n&quot;);
                      printf(&quot;ESP_GAP_BLE_SCAN_RESULT_EVT\n&quot;);
                      printf(&quot;Device found: ADDR=&quot;);
                      for(int i = 0; i &lt; ESP_BD_ADDR_LEN; i++) {
                          printf(&quot;%02X&quot;, param-&gt;scan_rst.bda[i]);
                          if(i != ESP_BD_ADDR_LEN -1) printf(&quot;:&quot;);
                      }
                      
                      // try to read the complete name
                      uint8_t *adv_name = NULL;
                      uint8_t adv_name_len = 0;
                      adv_name = esp_ble_resolve_adv_data(param-&gt;scan_rst.ble_adv, ESP_BLE_AD_TYPE_NAME_CMPL, &amp;adv_name_len);
                      if(adv_name) {
                          printf(&quot;\nFULL NAME=&quot;);
                          for(int i = 0; i &lt; adv_name_len; i++) printf(&quot;%c&quot;, adv_name[i]);
                      }
                      
                      printf(&quot;\n\n&quot;);
                      addDevice(param-&gt;scan_rst.bda);
                  }
                  
              }
  </code></pre>
  <p>Do you know why  <code>esp_log_buffer_hex(&quot;!!!!&quot;, param-&gt;scan_rst.ble_adv, 62);</code>  doesn't work</p>