<?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>Duplicate Log data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56234/duplicate-log-data</link><description>I collecting Heart Rate data using nRF52 and Max30102 
 I saw data in hyperterminal, it is normal and not show duplicated data, 
 but, I connected with my phone and nrf52 DK and look nRF Logger application 
 I realized they show duplicated data. 
 
 I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Jan 2020 04:15:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56234/duplicate-log-data" /><item><title>RE: Duplicate Log data</title><link>https://devzone.nordicsemi.com/thread/227787?ContentTypeID=1</link><pubDate>Tue, 07 Jan 2020 04:15:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bac0cfd-f2a4-4d2a-95b9-167fd127cc28</guid><dc:creator>silverzero</dc:creator><description>&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1578370112020v1.png" alt=" " /&gt;&lt;br /&gt;I just check data hyper terminal using NRF_LOG_INFO() function.&lt;/p&gt;
&lt;p&gt;here&amp;#39;s my Logged data. As you can see, the data was seen from hyper terminal is no duplicate but saved data from application is show duplicate. I don&amp;#39;t know whyㅠ&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
#define MIN_CONN_INTERVAL               MSEC_TO_UNITS(500, UNIT_1_25_MS)            /**&amp;lt; Minimum acceptable connection interval (0.5 seconds). */
#define MAX_CONN_INTERVAL               MSEC_TO_UNITS(1000, UNIT_1_25_MS)           /**&amp;lt; Maximum acceptable connection interval (1 second). */
#define SLAVE_LATENCY                   0                                           /**&amp;lt; Slave latency. */
#define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(4000, UNIT_10_MS)             /**&amp;lt; Connection supervisory timeout (4 seconds). */
#define FIRST_CONN_PARAMS_UPDATE_DELAY  APP_TIMER_TICKS(5000)                       /**&amp;lt; Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (5 seconds). */
#define NEXT_CONN_PARAMS_UPDATE_DELAY   APP_TIMER_TICKS(30000)                      /**&amp;lt; Time between each call to sd_ble_gap_conn_param_update after the first call (30 seconds). */
#define MAX_CONN_PARAMS_UPDATE_COUNT    3        





int main(void)
{
    bool erase_bonds;
    APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
    //NRF_LOG_DEFAULT_BACKENDS_INIT();
    NRF_LOG_FLUSH();

    // Initialize.
    log_init();
    twi_init();
    MPU2950_set_mode();
    max30102_set_mode();
    timers_init();
    buttons_leds_init(&amp;amp;erase_bonds);
    power_management_init();
    ble_stack_init();
    gap_params_init();
    gatt_init();
    advertising_init();
    services_init();
    sensor_simulator_init();
    conn_params_init();
    peer_manager_init();
    
    // Start execution.
    NRF_LOG_INFO(&amp;quot;Cycling Speed and Cadence example started.&amp;quot;);
    
    application_timers_start();
    advertising_start(erase_bonds);
  
    int sample_number = 0;

    // Enter main loop.
    while (1)
    {
        idle_state_handle();
        read_sensor_data(); 
        nrf_delay_ms(70);

  
        NRF_LOG_FLUSH(); 
      
   
      }
      
     }
      &lt;/pre&gt;Here&amp;#39;s my code&amp;nbsp; connection parameters interval and main function.&lt;/p&gt;
&lt;p&gt;Where should I change? ㅠㅠ&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also this is log data checked from nRF logger application served from Nordic Semiconductor&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1578370509992v3.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Duplicate Log data</title><link>https://devzone.nordicsemi.com/thread/227694?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2020 13:45:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c71a547-594d-4549-8b1e-63c8045b56ab</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;What data is duplicated? Is it possible that you are receiving data over BLE data is also written to NRF_LOG()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>