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

DIsconnects after sometime || ble_app_multirole_lesc

Hi,

I am working on nrf52840 and using below SDK and softdevice.

SDK - 16.0

Softdevice - S140

IDE - embedded segger studio.

currently using nRF52840-DK.

I am using example  "ble_app_multirole_lesc_s132_pca10056" as my base code.

I am running an advertisement and scanning both simultaneously, and connecting my mobile phone with the device(mobile is as central).

my current configurations are as bellow.

/*** Scanning parameters ***/

#define NRF_BLE_SCAN_SCAN_INTERVAL (160 * 3U)

#define NRF_BLE_SCAN_SCAN_DURATION 0


#define NRF_BLE_SCAN_SCAN_WINDOW (160 * 2U)


#define NRF_BLE_SCAN_MIN_CONNECTION_INTERVAL 7.5


#define NRF_BLE_SCAN_MAX_CONNECTION_INTERVAL 30


#define NRF_BLE_SCAN_SLAVE_LATENCY 0

#define NRF_BLE_SCAN_SUPERVISION_TIMEOUT 500

/*** Advertisement configurations ***/

#define ADV_INTERVAL (160 * 10)

/*** Connection parameter ***/

#define FIRST_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(30000) 
#define NEXT_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(30000)

define MAX_CONN_PARAMS_UPDATE_COUNT 3 

I have not changed any clock accuracy related parameter.using default setting of example code.

I have the below queries.

1) once I connect with mobile phone some times devices get disconnect with error codes 0x08 and 0x28 it never stays connected for longer than 30 seconds.

-> How can I avoid this?

2) can you give some idea to choose advertisement and scanning parameters for minimum packet loss.

Parents
  • Hi Jared,

    Thanks for the response.

    please find my response below.

    • Are you using a custom board?

              -> Currently not using custom board, but yes my final application will be based on custom board. currently using nRF52840-DK

    • 0x08 is a TIMEOUT, and will occur if for example the connection isn't maintained by both sides. How is the test environment? Is it noisy?

                -> No test environment is not noisy, does it matters?

    • You mentioned that you didn't change any of the connection parameters, but did you change anything else? Or is the example completely unmodified? See this for a suggested connection parameters. 

              -> Yes I changed example for my custom services, removed HRS.

    • What phone are you using?

              -> MI A3( Xiaomi) and vivo, but the problem is with some other phones also

Reply
  • Hi Jared,

    Thanks for the response.

    please find my response below.

    • Are you using a custom board?

              -> Currently not using custom board, but yes my final application will be based on custom board. currently using nRF52840-DK

    • 0x08 is a TIMEOUT, and will occur if for example the connection isn't maintained by both sides. How is the test environment? Is it noisy?

                -> No test environment is not noisy, does it matters?

    • You mentioned that you didn't change any of the connection parameters, but did you change anything else? Or is the example completely unmodified? See this for a suggested connection parameters. 

              -> Yes I changed example for my custom services, removed HRS.

    • What phone are you using?

              -> MI A3( Xiaomi) and vivo, but the problem is with some other phones also

Children
No Data
Related