<?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>getting RSSI by serial communication using nrf51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9164/getting-rssi-by-serial-communication-using-nrf51822</link><description>Hello, 
 I am using nrf51822 and I want to get RSSI values as much quick as possible(around 20 samples per second) . 
 Previousely I used MCP and decreased the scan interval to do that and then extracted the RSSI from the log file that MCP generates</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Sep 2015 06:50:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9164/getting-rssi-by-serial-communication-using-nrf51822" /><item><title>RE: getting RSSI by serial communication using nrf51822</title><link>https://devzone.nordicsemi.com/thread/33777?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2015 06:50:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbc531f8-9661-494e-bd08-783c955e5aee</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;Many of our examples use the UART, for example the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk51.v9.0.0/ble_sdk_app_hrc.html?cp=4_1_0_4_2_0"&gt;heart rate collector&lt;/a&gt; project.
You can also check out the pure &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk51.v9.0.0/uart_example.html?cp=4_1_0_4_6_25"&gt;uart example&lt;/a&gt;. Check also out &lt;a href="https://devzone.nordicsemi.com/tutorials/4/testing-and-using-a-simple-ble-application/"&gt;this basic tutorial&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: getting RSSI by serial communication using nrf51822</title><link>https://devzone.nordicsemi.com/thread/33776?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2015 15:47:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65631be7-cad9-4bc5-bf96-137722f1ac3d</guid><dc:creator>Ramin</dc:creator><description>&lt;p&gt;Thanks again. I read almost all of tutorial about three weeks ago, but I didnt find scanning code there. but  the code snippets will be useful. What about the serial connection? how can I pass p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.rssi by UART?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: getting RSSI by serial communication using nrf51822</title><link>https://devzone.nordicsemi.com/thread/33775?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2015 14:11:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:329356b2-b87c-452c-b666-3da58804e0f1</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;You can still use the same method i described. I updated my answer with more information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: getting RSSI by serial communication using nrf51822</title><link>https://devzone.nordicsemi.com/thread/33774?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2015 13:28:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18dd62b8-467d-4e30-b716-64742c5c3660</guid><dc:creator>Ramin</dc:creator><description>&lt;p&gt;Thank You for ur answer. I think you didn&amp;#39;t get exactly my question (or I didnt get ur answer correctly).
Assume that I have two nrf51822 dongle and I want to read RSSI values of one peripheral device(which send the advertising packets). I am not very expert in programming dongle. Is there any code doing exactly what I want or at least a same example code?
I used the program that MCP can upload on dongle (I think it is using s110 soft device).
For serial communication how can I use UART?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: getting RSSI by serial communication using nrf51822</title><link>https://devzone.nordicsemi.com/thread/33773?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2015 12:48:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ebc210d-8dd5-4784-bf3c-b334d90be34e</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;Hey.&lt;/p&gt;
&lt;p&gt;If you flash your nrf51 with softdevice S120 or S130, you can act as a BLE central device. You can base your code on one of our example projects, for example &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk51.v9.0.0/ble_sdk_app_multilink.html?cp=4_1_0_4_2_1"&gt;this&lt;/a&gt; one.&lt;/p&gt;
&lt;p&gt;From there you have two options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Advertise with your two sensors periodically, and scan them with the S120. Then extract the RSSI from the advertising packets.&lt;/li&gt;
&lt;li&gt;Connect to both sensors, and read their RSSI from the data packets received.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first options is easiest to implement, but the last option is more power efficient. In addition, option 2 will allow for encryption of the data.&lt;/p&gt;
&lt;p&gt;When the BLE part of your application is sorted, you simply communicate with your PC using UART.&lt;/p&gt;
&lt;p&gt;EDIT1:
Briefly how to use the S120/S130 for scanning after RSSI values&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start scanning&lt;/li&gt;
&lt;li&gt;Handle the &amp;quot;BLE_GAP_EVT_ADV_REPORT&amp;quot;-event in the on_ble_evt() function. This is where the advertisement packets from the scanner is coming in. Find your devices in the advertisement report using either the name, UUID or address. Use the adv_report_parse() function to extract various data from the advertisement packet.&lt;/li&gt;
&lt;li&gt;Read out the rssi from the p_ble_evt-&amp;gt;evt.gap_evt.params.adv_report.rssi value.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Take a look at &lt;a href="https://devzone.nordicsemi.com/question/41759/how-can-we-make-a-master-to-connect-with-a-slave-comparing-the-device-name-instead-of-slave-address-in-s130/"&gt;this&lt;/a&gt; devzone case for some code snippets.&lt;/p&gt;
&lt;p&gt;If you are just starting out with programming of the nRF chip, this might be a small hurdle to get over. I advice you to read the tutorials here on devzone, as well as search here for any problems you encounter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>