<?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>Read BLE complete advertising packets</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119930/read-ble-complete-advertising-packets</link><description>How can I read the whole advertising packet when are packets larger than some specific size? This is the issue. I want to read this adv packet: 
 
 But I only get this on the device: I read a similar question in the forum and the answer is that: &amp;quot;The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 Mar 2025 13:28:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119930/read-ble-complete-advertising-packets" /><item><title>RE: Read BLE complete advertising packets</title><link>https://devzone.nordicsemi.com/thread/528014?ContentTypeID=1</link><pubDate>Wed, 19 Mar 2025 13:28:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ae4c295-59a3-4426-931b-259d8b078c2d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]&lt;p&gt;Also, I&amp;#39;m using the advance mode scanning with the callbacks:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="max-width:100%;overflow:auto;max-height:762.4px;"&gt;&lt;div&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;And are yhou seeing &amp;quot;Scan response recivida!&amp;quot; in your log?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You are on the track of something here. The total amount of bytes in the advertising packet you refer to is:&lt;/p&gt;
&lt;p&gt;3 (the 3 bytes indicating the length of the different sections) + 2 (flags data structure), + 9 (name data structure) + 22 (manufacturer specific data structure) = 36 bytes. The maximum length of an advertising packet is 31 bytes, so this has to be split up in the normal advertising packet and a scan response packet.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you are scanning with an&amp;nbsp;BT_SCAN_TYPE_SCAN_ACTIVE, it means that it will request scan response packets from the advertiser. However, these will arrive in a different event, so my guess is that the advertising response packets doesn&amp;#39;t pass your scan_filter.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I suggest you look into the example: NCS\zephyr\samples\bluetooth\central&lt;/p&gt;
&lt;p&gt;This sample is a bit weird, but it shows how you can start scanning, and get an event for each advertisement scanned. What you need to do is to then parse the advertisement packet (that you now know the format of). Then be aware that the scan response packet does not contain any information about the initial packet, other than that they will have the same&amp;nbsp;bt_addr_le_t * addr.&lt;/p&gt;
&lt;p&gt;So you need to implement the filter that you are currently using, and then look for the address. After you have found the address, change the active filter to one just checking the address of which the advertisement is coming from.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;NB: Remember to change from&amp;nbsp;BT_LE_SCAN_PASSIVE to&amp;nbsp;BT_LE_SCAN_ACTIVE in start_scan(). And in your device_found() callback, remove everything where it connects to the device.&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>