<?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>Issues with getting scan request peer address though BLE_GAP_EVT_SCAN_REQ_REPORT event</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58778/issues-with-getting-scan-request-peer-address-though-ble_gap_evt_scan_req_report-event</link><description>Hello all, 
 
 I am trying to get the address of the scanner sent a scan request to my nRF52840 running as a peripheral and advertising. I am using SDK 15.0 and I have tried SoftDevice S140 v6.0 and also v6.1. I am using the BLE_GAP_EVT_SCAN_REQ_REPORT</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Mar 2020 03:01:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58778/issues-with-getting-scan-request-peer-address-though-ble_gap_evt_scan_req_report-event" /><item><title>RE: Issues with getting scan request peer address though BLE_GAP_EVT_SCAN_REQ_REPORT event</title><link>https://devzone.nordicsemi.com/thread/238690?ContentTypeID=1</link><pubDate>Mon, 09 Mar 2020 03:01:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb4fe5ef-f4ac-420d-ab0d-aae2ebffdd07</guid><dc:creator>aeozyalcin</dc:creator><description>&lt;p&gt;That was it! For some reason, the MAC address reported by&amp;nbsp;scan_req_report.peer_addr was backwards. &lt;span&gt;peer_addr.addr[5]&amp;nbsp;ended up being 0xDC. Thank you for the idea!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with getting scan request peer address though BLE_GAP_EVT_SCAN_REQ_REPORT event</title><link>https://devzone.nordicsemi.com/thread/238517?ContentTypeID=1</link><pubDate>Fri, 06 Mar 2020 12:43:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af59ebf5-7490-483d-a972-841647b92d1b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;First of all, as you probably noticed, the dongle is not really ideal for development, as it doesn&amp;#39;t have any debug capabilities, nor logging backend support. I can really recommend you to get hold of an nRF52840 DK for development, and then you can flash the application to the dongle once it is working.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;That being said, back to your question. How do you know that the Bluetooth address of the RPi is DC:A6:... ?&lt;/p&gt;
&lt;p&gt;I have noticed that some devices report their addresses in different order (LSB/MSB). Try to check if (peer_addr.addr[5] = 0xDC)&lt;/p&gt;
&lt;p&gt;(you can use &amp;quot;0x20&amp;quot; instead of 220.&lt;/p&gt;
&lt;p&gt;As you say, since the LED is turned on if you move it outside the if-check, the event apparently occurs, so if you&amp;#39;d had a debugger, you could either have logged the addresses of the devices or set a breakpoint and checked the address.&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>