<?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>Finding rssi for one device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/50477/finding-rssi-for-one-device</link><description>Hello there, 
 I have used the nRF52840 DK to find the rssi values of all peripheral devices using the interactive example. I would like to create a command to find the rssi value of a single device. I have found the BLE address of the device that I want</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Aug 2019 07:03:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/50477/finding-rssi-for-one-device" /><item><title>RE: Finding rssi for one device</title><link>https://devzone.nordicsemi.com/thread/202032?ContentTypeID=1</link><pubDate>Fri, 02 Aug 2019 07:03:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60ba8d89-749f-448e-840c-431ddc9931bc</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok. What are you missing to do that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Finding rssi for one device</title><link>https://devzone.nordicsemi.com/thread/201956?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2019 15:29:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0851f3d-44cb-4f91-8b14-fed2f4f350f2</guid><dc:creator>ella482</dc:creator><description>&lt;p&gt;Thank you, Edvin!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would like to print the rssi value as a level 0 command on the cli for the devices that come in when the scan is on (without having to connect to the device). I am using SDK version 15.3.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Finding rssi for one device</title><link>https://devzone.nordicsemi.com/thread/201889?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2019 12:48:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17bb43dd-0c45-499b-ab0a-37ef2d42d722</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What is it that you want to print the RSSI value on? The advertisement packets that you scan?&lt;/p&gt;
&lt;p&gt;If that is the case, What SDK version are you using? The reason I ask is that the advertisement reports are located different places in different SDKs. Either way, look for an event called&amp;nbsp;BLE_GAP_EVT_ADV_REPORT. This event typically has an input parameter, p_ble_evt.&lt;/p&gt;
&lt;p&gt;You can find the RSSI of an advertisement packet the following way:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;case BLE_GAP_EVT_ADV_REPORT:
    int8_t rssi = p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.rssi;
    
    
    NRF_LOG_INFO(&amp;quot;received an advertisement with RSSI %d&amp;quot;, rssi);
    NRF_LOG_INFO(&amp;quot;from address: %02x, %02x, %02x, %02x, %02x, %02x&amp;quot;, p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[0],
                                                                     p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[1],
                                                                     p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[2],
                                                                     p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[3],
                                                                     p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[4],
                                                                     p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.peer_addr.addr[5]);
    break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You can use CLI instead of NRF_LOG_INFO(), but it was easier to just show using the logger module.&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>