This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Changed in BLE parameters and getting Fatal error

Hello,

 

I am using nRF52840, SDK_16.0.0, S140 SoftDevice and Segger 4.16 for flashing the image. I am using ‘ble_app_blinky’.

  

My queries are:

1) In code I just changed BLE parameters as below and I am getting Fatal error as 7 in gap_params_init() under “err_code = sd_ble_gap_ppcp_set(&gap_conn_params);”. What does error code 7 mean and why is it occurring.

2) After couple of debugging and going through Bluetooth SIG specification, I came across below statement.

              “The connSupervisionTimeout shall be a multiple of 10 ms in the range of 100 ms to 32.0 s and it shall be larger than (1 + connSlaveLatency) * connInterval * 2.”

         a) In this formula which one should I select for connInterval. Whether it is MIN_CONN_INTERVAL or MAX_CONN_INTERVAL

b) After changing to 13 ( > (1 + 5) * 1s * 2 = 12) its working fine. Do we need to adher to this settings. Because of this are we getting fattor error.

 

#define APP_ADV_INTERVAL                1600                                    /**< The advertising interval (in units of 0.625 ms; this value corresponds to 1000 ms). */

#define APP_ADV_DURATION                BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED   /**< The advertising time-out (in units of seconds). When set to 0, we will never time out. */

 

#define MIN_CONN_INTERVAL               MSEC_TO_UNITS(500, UNIT_1_25_MS)        /**< Minimum acceptable connection interval (0.5 seconds). */

#define MAX_CONN_INTERVAL               MSEC_TO_UNITS(1000, UNIT_1_25_MS)        /**< Maximum acceptable connection interval (1 second). */

#define SLAVE_LATENCY                           5 // 0                                  /**< Slave latency. */

#define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(4000, UNIT_10_MS)         /**< Connection supervisory time-out (4 seconds). */

  

Thanks & Regards

Vishnu Beema

Related