<?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>RSSI Change Event &amp;amp; Log not showing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36536/rssi-change-event-log-not-showing</link><description>Hi, 
 I&amp;#39;m developing a simple software that records RSSI values from both the Central and Peripheral device, using nRF5 SDK 15, adapting from two of the provided examples: 
 ble_app_multipheral for the server/peripheral &amp;amp; ble_app_blinky_c for the client</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Jul 2018 07:37:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36536/rssi-change-event-log-not-showing" /><item><title>RE: RSSI Change Event &amp; Log not showing</title><link>https://devzone.nordicsemi.com/thread/141833?ContentTypeID=1</link><pubDate>Mon, 30 Jul 2018 07:37:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b96f42a2-2c4a-4699-baaf-511ac86576cb</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;I&amp;#39;m glad to hear that!&lt;/p&gt;
&lt;p&gt;Be sure to let us know if you have any other issues.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RSSI Change Event &amp; Log not showing</title><link>https://devzone.nordicsemi.com/thread/141767?ContentTypeID=1</link><pubDate>Sat, 28 Jul 2018 04:55:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3f6047f-5589-487f-9514-c3f731cdab8d</guid><dc:creator>M. Corrente</dc:creator><description>&lt;p&gt;Hi, thanks fort the reply.&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t notice there were various kinds of logs (Debug / Info), changing the log level to 4 solved it, from there it was easy to notice that RSSI variable type was not signed int as should be, hence not showing neg. values.&lt;/p&gt;
&lt;p&gt;It works perfectly now, thank you!&lt;/p&gt;
&lt;p&gt;Marco.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RSSI Change Event &amp; Log not showing</title><link>https://devzone.nordicsemi.com/thread/141690?ContentTypeID=1</link><pubDate>Fri, 27 Jul 2018 12:58:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f861e65-a9da-451c-8841-20cbaa0f97aa</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not quite sure why you aren&amp;#39;t seeing the output from NRF_LOG_DEBUG().&lt;br /&gt;I can&amp;#39;t see any other debug outputs in the screenshots you uploaded either.&lt;br /&gt;Are you sure that you have the NRF_LOG_DEFAULT_LEVEL set to debug (level 4) in your sdk_config.h file?&lt;br /&gt;&lt;br /&gt;Also double check that you are receiving the BLE_GAP_EVT_RSSI_CHANGED event?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As for what you want to acheive here;&lt;br /&gt;I tried to implement it myself, in the ble_app_multiperipheral/ble_app_blinky_c.&lt;br /&gt;I didn&amp;#39;t do it the exact same way you did, but I had no issue printing the RSSI values on the debug terminal in SES. &lt;br /&gt;&lt;br /&gt;My code; &lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for handling BLE events.
 *
 * @param[in]   p_ble_evt   Bluetooth stack event.
 * @param[in]   p_context   Unused.
 */
static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
{
    ret_code_t err_code;
    int8_t rssi;
    uint8_t channel;

    switch (p_ble_evt-&amp;gt;header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
            on_connected(&amp;amp;p_ble_evt-&amp;gt;evt.gap_evt);
            break;

        case BLE_GAP_EVT_DISCONNECTED:
            on_disconnected(&amp;amp;p_ble_evt-&amp;gt;evt.gap_evt);
            break;

        case BLE_GAP_EVT_RSSI_CHANGED:

            err_code = sd_ble_gap_rssi_get (p_ble_evt-&amp;gt;evt.gap_evt.conn_handle, &amp;amp;rssi, &amp;amp;channel);
            
            NRF_LOG_DEBUG(&amp;quot;RSSI is; %d&amp;quot;, rssi); 
            break;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for handling the Connected event.
 *
 * @param[in] p_gap_evt GAP event received from the BLE stack.
 */
static void on_connected(const ble_gap_evt_t * const p_gap_evt)
{
    ret_code_t  err_code;
    uint32_t    periph_link_cnt = ble_conn_state_peripheral_conn_count(); // Number of peripheral links.

    NRF_LOG_INFO(&amp;quot;Connection with link 0x%x established.&amp;quot;, p_gap_evt-&amp;gt;conn_handle);

    // Assign connection handle to available instance of QWR module.
    for (uint32_t i = 0; i &amp;lt; NRF_SDH_BLE_PERIPHERAL_LINK_COUNT; i++)
    {
        if (m_qwr[i].conn_handle == BLE_CONN_HANDLE_INVALID)
        {
            err_code = nrf_ble_qwr_conn_handle_assign(&amp;amp;m_qwr[i], p_gap_evt-&amp;gt;conn_handle);
            APP_ERROR_CHECK(err_code);
            break;
        }
    }

    err_code = app_button_enable();
    APP_ERROR_CHECK(err_code);

    sd_ble_gap_rssi_start(p_gap_evt-&amp;gt;conn_handle, 5, 0);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br /&gt;Joakim.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>