<?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>How to get device details of BLE devices seen by NRF52?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19996/how-to-get-device-details-of-ble-devices-seen-by-nrf52</link><description>My setup is a Android phone, Nordic NRF52, and random BLE devices in the area.
What I want is, the Android NRF-UART app connects to the NRF52 and the NRF52 sends information about the BLE devices it sees around the area.
How do I get this information</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Oct 2018 06:56:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19996/how-to-get-device-details-of-ble-devices-seen-by-nrf52" /><item><title>RE: How to get device details of BLE devices seen by NRF52?</title><link>https://devzone.nordicsemi.com/thread/152787?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2018 06:56:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a55ea80-7ac4-4711-ae7b-8674677c5063</guid><dc:creator>Gaurav</dc:creator><description>&lt;p&gt;Where to use this structure and what should be the initializing value of gsp_ble_evt.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get device details of BLE devices seen by NRF52?</title><link>https://devzone.nordicsemi.com/thread/77809?ContentTypeID=1</link><pubDate>Sun, 26 Feb 2017 09:14:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:496d9a8e-8e33-4341-be15-0d7bebc1f02d</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Hi QDI,&lt;/p&gt;
&lt;p&gt;As Roger pointed out, the &amp;quot;proper&amp;quot; way would be to scan and log (or report over wired interface if you have it) all broadcasters. Usual way is to distinguish BLE devices by MAC address (aka Adv. address) which is 6-byte filed you mentioned. But some of them might not be static so it&amp;#39;s question how useful this information will be. You can support it by logging whole content of ADV_xxx (and SCAN_RSP) data but these can also change any time so if some device wants to be immune to your tracking it can achieve it (of course;).&lt;/p&gt;
&lt;p&gt;Here is example of how to extract Adv. address from received packet in GAP Scanner/Central role (on &lt;code&gt;BLE_GAP_EVT_ADV_REPORT&lt;/code&gt; event received):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Local variables.
ble_evt_t *gsp_ble_evt;

// ...

// Extract Adv. address from the event structure.
uint8_t * adv_address = (uint8_t *)gsp_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr;
uint8_t adv_address_type = (uint8_t)gsp_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr_type;
LOG_DEBUG(&amp;quot;Adv. Address = 0x%02X:%02X:%02X:%02X:%02X:%02X.&amp;quot;, adv_address[0],
                                                             adv_address[1],
                                                             adv_address[2],
                                                             adv_address[3],
                                                             adv_address[4],
                                                             adv_address[5]);

// ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cheers Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get device details of BLE devices seen by NRF52?</title><link>https://devzone.nordicsemi.com/thread/77808?ContentTypeID=1</link><pubDate>Sat, 25 Feb 2017 20:45:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:549ee6b6-c267-4e9d-9c89-13ec6a3e3900</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;You can get the full advertising packet from the scan response callback.&lt;/p&gt;
&lt;p&gt;Just parse the whole packet and extract whatever data you want to collect&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>