Topics

#nrf52840 #ble unstable connection #ble #nrf52840


Randy Chou <rchou3@...>
 

Hi community,
I'm using nrf52840 on our own development board, I met one problem about abnormal disconnect.

  • environment:
[Central] use BLE nRF connect run on nRF52840_PCA10056 (Windows)
[Peripheral 1] Zephyr peripheral_hids sample application runs on nRF52840_PCA10056
[Peripheral 2] Zephyr peripheral_hids sample application runs on our EVB (nRF52840)
  • result:
[per 1] the connection keeps.
[per 2] abnormal disconnect while I move the central a bit far away from peripheral (< 1m).

  • experiment
  1.  move the central device close next to peripheral 2. it can keeps connection.
  2. change the connection interval from 30ms to 7.5ms/10ms/15ms, it can keeps connection
  3. use our own FW which uses SoftDevice as Bluetooth stack. The distance won't affect the connection.
I'm wondering is this issue related to frequency drift.
As my understanding, in SoftDevice, it will do the clock calibration automatically.
I only find one related configuration (CONFIG_CLOCK_CONTROL_NRF5_K32SRC_250PPM).
Does it also have same feature in Zephyr? 
or do you have other comment about this issue?

Thanks,
Randy


Chettimada, Vinayak Kariappa
 

Hi Randy,

Could you please let us know the LF clock src used in your EVB?

If you are using 32KHz external crystal as source (CONFIG_CLOCK_CONTROL_NRF5_K32SRC_XTAL=y),
and the accuracy is not the default 20 ppm (CONFIG_CLOCK_CONTROL_NRF5_K32SRC_20PPM=y),
please select the correct one, i.e. if 250 ppm then CONFIG_CLOCK_CONTROL_NRF5_K32SRC_250PPM=y.

If you are using built-in 32KHz RC oscillator as source (CONFIG_CLOCK_CONTROL_NRF5_K32SRC_RC=y),
then please use CONFIG_CLOCK_CONTROL_NRF5_K32SRC_500PPM=y.

Do send us your application generated .config file, in case you want me to check what is configured in comparison to the source and actual accuracy of the clock source in your EVB.

Regards,
Vinayak

-----Original Message-----
From: <devel@...> on behalf of Randy Chou <rchou3@...>
Date: Thursday, 1 November 2018 at 4:03 AM
To: "devel@..." <devel@...>
Subject: [Zephyr-devel] #nrf52840 #ble unstable connection




Hi community,
I'm using nrf52840 on our own development board, I met one problem about abnormal disconnect.


* environment:

[Central] use BLE nRF connect run on nRF52840_PCA10056 (Windows)
[Peripheral 1] Zephyr peripheral_hids sample application runs on nRF52840_PCA10056
[Peripheral 2] Zephyr peripheral_hids sample application runs on our EVB (nRF52840)

* result:

[per 1] the connection keeps.
[per 2] abnormal disconnect while I move the central a bit far away from peripheral (< 1m).


* experiment


1. move the central device close next to peripheral 2. it can keeps connection.

2. change the connection interval from 30ms to 7.5ms/10ms/15ms, it can keeps connection

3. use our own FW which uses SoftDevice as Bluetooth stack. The distance won't affect the connection.


I'm wondering is this issue related to frequency drift.
As my understanding, in SoftDevice, it will do the clock calibration automatically.
I only find one related configuration (CONFIG_CLOCK_CONTROL_NRF5_K32SRC_250PPM).
Does it also have same feature in Zephyr?
or do you have other comment about this issue?

Thanks,
Randy


Randy Chou <rchou3@...>
 

Hi Vinayak,
I enable HCI_CORE_DEBUG to got some logs in the link
1. UART log. 
2. air log.

Thanks,
Randy


Randy Chou <rchou3@...>
 

Hi Vinayak,
I did some test today by using the latest master, there is no connection parameter update that means the CI keeps in 7.5ms, the connection keeps alive.
I try to update the CI to 30ms manually the connection can keep around 6.5 mins.
attachment is my .config file.

Thanks,
Randy


Chettimada, Vinayak Kariappa
 

Your config file looks ok.

I will check if errata 201 will solve your issues. I will try to send you a patch by this weekend.
As I will need to reproduce the issue, you will need to help me if it is the root cause. (with my DK, I did not see issues for hours before I had to be away from my desk).

- Vinayak

-----Original Message-----
From: <devel@...> on behalf of Randy Chou <rchou3@...>
Date: Wednesday, 7 November 2018 at 11:12 AM
To: "devel@..." <devel@...>
Subject: Re: [Zephyr-devel] #nrf52840 #ble unstable connection




Hi Vinayak,
I did some test today by using the latest master, there is no connection parameter update that means the CI keeps in 7.5ms, the connection keeps alive.
I try to update the CI to 30ms manually the connection can keep around 6.5 mins.
attachment is my .config file.

Thanks,
Randy


Randy Chou <rchou3@...>
 

Hi Vinayak,
Thanks for your reply. If you have any idea about this issue I can do the tests from my site.

Regards,
Randy

Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...> 於 2018年11月8日 週四 下午6:17寫道:

Your config file looks ok.

I will check if errata 201 will solve your issues. I will try to send you a patch by this weekend.
As I will need to reproduce the issue, you will need to help me if it is the root cause. (with my DK, I did not see issues for hours before I had to be away from my desk).

- Vinayak

-----Original Message-----
From: <devel@...> on behalf of Randy Chou <rchou3@...>
Date: Wednesday, 7 November 2018 at 11:12 AM
To: "devel@..." <devel@...>
Subject: Re: [Zephyr-devel] #nrf52840 #ble unstable connection




    Hi Vinayak,
    I did some test today by using the latest master, there is no connection parameter update that means the CI keeps in 7.5ms, the connection keeps alive.
    I try to update the CI to 30ms manually the connection can keep around 6.5 mins.
    attachment is my .config file.

    Thanks,
    Randy


Chettimada, Vinayak Kariappa
 

https://github.com/zephyrproject-rtos/zephyr/pull/11231

Could you please test the PR on your board and let me know if its better.

Find attach the patch file as alternative to the diff in PR. Use "git am <patch file>" to apply the changes on latest zephyr master branch.

-Vinayak

-----Original Message-----
From: Randy Chou <rchou3@...>
Date: Friday, 9 November 2018 at 9:22 AM
To: Vinayak Chettimada <vinayak.kariappa.chettimada@...>
Cc: "devel@..." <devel@...>, Nestor Lopez Casado <nlopezcasad@...>
Subject: Re: [Zephyr-devel] #nrf52840 #ble unstable connection

Hi Vinayak,
Thanks for your reply. If you have any idea about this issue I can do the tests from my site.


Regards,
Randy


Chettimada, Vinayak Kariappa <vinayak.kariappa.chettimada@...> 於 2018年11月8日 週四 下午6:17寫道:


Your config file looks ok.

I will check if errata 201 will solve your issues. I will try to send you a patch by this weekend.
As I will need to reproduce the issue, you will need to help me if it is the root cause. (with my DK, I did not see issues for hours before I had to be away from my desk).

- Vinayak

-----Original Message-----
From: <devel@...> on behalf of Randy Chou <rchou3@...>
Date: Wednesday, 7 November 2018 at 11:12 AM
To: "devel@..." <devel@...>
Subject: Re: [Zephyr-devel] #nrf52840 #ble unstable connection




Hi Vinayak,
I did some test today by using the latest master, there is no connection parameter update that means the CI keeps in 7.5ms, the connection keeps alive.
I try to update the CI to 30ms manually the connection can keep around 6.5 mins.
attachment is my .config file.

Thanks,
Randy


Randy Chou <rchou3@...>
 

Hi Vinayak,
I merge the patch, host (nRF Connect) get update connection parameter request. After CI change to 30ms, it can keep connection a bit longer but it still disconnect after few minutes (distance is ~2m).
If I move host close to device then the connection can keep more than one hour.
I also try to change the CI back to 7.5ms and move host far away from device (~2m), the connection is also stable.

Do you have any suggestion that I can help to debug this issue?
Thanks,
Randy