<?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 RSSI asynchronously &amp;amp; independent of any connection or events.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64458/how-to-get-rssi-asynchronously-independent-of-any-connection-or-events</link><description>Hello, 
 I have an application in which I need to get RSSI before, during and after any BLE connection has been made. The RSSI measurements are being used to quantify the co-channel interference generated by a WIFI radio. I need to make this measurement</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Aug 2020 09:17:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64458/how-to-get-rssi-asynchronously-independent-of-any-connection-or-events" /><item><title>RE: How to get RSSI asynchronously &amp; independent of any connection or events.</title><link>https://devzone.nordicsemi.com/thread/263153?ContentTypeID=1</link><pubDate>Wed, 05 Aug 2020 09:17:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe331179-94b4-45d4-bf52-a75bec5efdac</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello Christian,&lt;br /&gt;&lt;br /&gt;Between what you are saying in this comment, and you reply to Turbos comment, I am not exactly sure what you are looking for.&lt;br /&gt;By using radio timeslots you will indeed take control over the radio peripheral for some time, which I understand is not your intention.&lt;/p&gt;
[quote user="christianhahn"]What I meant by instantaneous was: irrespective of if a packet is being received or not, what is the value of the filtered RSSI measurement right now.[/quote]
&lt;p&gt;The RSSI value is tied to a connection event - you may not sample the RSSI value independently of receiving packets. The sd_ble_gap_rssi_get function returns the RSSI value for the latest connection event.&lt;/p&gt;
[quote user="christianhahn"]I am not interested in taking over the entire radio or interfereing with the BLE operation.&amp;nbsp; Nor am I interested in changed the receive frequency.&amp;nbsp; I really just want to know the RSSI sampled by the receiver&amp;nbsp;right now.[/quote]
&lt;p&gt;If you would not like to control the radio directly, or have anything to do with the BLE operation, I would again recommend that you first call &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.0.1%2Fgroup___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=gac369253b7f5ce0fc0093a6133faa791f"&gt;sd_ble_gap_rssi_start&lt;/a&gt;, and then use the previously mentioned &lt;em&gt;sd_ble_gap_rssi_get&amp;nbsp;&lt;/em&gt;function to report the RSSI value for the latest connection event. Alternatively, you could use the&amp;nbsp;&lt;em&gt;BLE_GAP_EVT_RSSI_CHANGED&amp;nbsp;&lt;/em&gt;event if you are only interested in the RSSI value when it changes significantly.&lt;/p&gt;
[quote user="christianhahn"]How can I initiate the&amp;nbsp;&lt;span&gt;RSSISTART task on demand?&lt;/span&gt;[/quote]
&lt;p&gt;If you would like the SoftDevice to stop reporting RSSI at any time, you can use the sd_ble_gap_rssi_stop function to do this.&lt;br /&gt;&lt;br /&gt;Please let me know if anything still should be unclear.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get RSSI asynchronously &amp; independent of any connection or events.</title><link>https://devzone.nordicsemi.com/thread/263085?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2020 23:04:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ef32f83-2743-4371-8a31-983e8538674e</guid><dc:creator>christianhahn</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
&lt;p&gt;What I meant by instantaneous was: irrespective of if a packet is being received or not, what is the value of the filtered RSSI measurement right now.&lt;/p&gt;
&lt;p&gt;The nRF52840 product specification says:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;Sampling of the received signal strength is started by using the RSSISTART task. The sample can be read from the RSSISAMPLE register.&amp;quot;&lt;/p&gt;
&lt;p&gt;How can I initiate the&amp;nbsp;&lt;span&gt;RSSISTART task on demand?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am not interested in taking over the entire radio or interfereing with the BLE operation.&amp;nbsp; Nor am I interested in changed the receive frequency.&amp;nbsp; I really just want to know the RSSI sampled by the receiver&amp;nbsp;right now.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Christian&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get RSSI asynchronously &amp; independent of any connection or events.</title><link>https://devzone.nordicsemi.com/thread/263084?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2020 22:19:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dfc6f71-c0da-4690-8a70-ad8c44fb4b25</guid><dc:creator>christianhahn</dc:creator><description>&lt;p&gt;Thank you Turbo.&amp;nbsp; I had a suspicion that something like this was happening.&amp;nbsp; I will look into the timeslot API.&amp;nbsp; It would seem that there are few examples on how to use it with an S140 SoftDevice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get RSSI asynchronously &amp; independent of any connection or events.</title><link>https://devzone.nordicsemi.com/thread/262974?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2020 11:34:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4194b231-2beb-482f-8fa2-01a82898bd3f</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;What Turbo is saying is correct, you may not access the SoftDevice&amp;#39;s registers directly.&lt;br /&gt;However, you may use the SoftDevice&amp;#39;s API to get the RSSI value, please see the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.0.1%2Fgroup___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html&amp;amp;anchor=ga63b6ec4b1af260085b8dfe5c7b02b724"&gt;sd_ble_gap_rssi_get&lt;/a&gt;&amp;nbsp;function from the S140 v7.0.1 API reference.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user=""]instantaneous[/quote]
&lt;p&gt;Could you elaborate what you mean by instantaneous here? The SoftDevice will not prioritize the rssi_get function call from the application over internal function calls.&lt;br /&gt;So, depending on what the SoftDevice is doing at the time of the rssi_get call, it might not return &amp;quot;instantaneous&amp;quot; per say.&lt;br /&gt;&lt;br /&gt;Please do not hesitate to let me know if this was not what you were asking about.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get RSSI asynchronously &amp; independent of any connection or events.</title><link>https://devzone.nordicsemi.com/thread/262783?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2020 12:16:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a54a1d20-f1f0-4b25-b597-94a2db80c6f8</guid><dc:creator>Turbo J</dc:creator><description>[quote userid="92407" url="~/f/nordic-q-a/64458/how-to-get-rssi-asynchronously-independent-of-any-connection-or-events"]Can I use the RSSI registers directly while using a SoftDevice?[/quote]
&lt;p&gt;Nope. The radio peripherial is blocked - except during timeslot events. Look into using radio timeslot API.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>