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

(NRF52810) Subscribe to characteristics fail and issues disconnect to board.

Hello

We are using custom board which has two chip configuration for BLE stack.
Main MCU runs the Zephyr Host only BT stack in peripheral mode.This is supposed to be GATT server.
Laired connectivity BL651 chip which has nRF52810 MCU, which runs zephyr with HCI ( hci_uart) controller stack.
zephyr version is 1.13.99.

On central side we use Bluegiga BLE module with Python scripts on Windows host.
Python Script is able to connect to the board BLE.
After connection it tries to subscribe one of the characteristics.

As the subscription starts, python script tries to fetch the characteristics for connection 0 by sending attclient_find_information.
packet and then immediately after that disconnect (reason :disconnect EVT from the board.)

Python script also gets error message as "pygatt.backends.bgapi.bgapi:Received a EventPacketType.connection_disconnected"

Any help would be appreciated.

Thanks!

Parents
  • From the packet sniffers, what we understood is ble_evt_connection_version_ind event is not getting generated from the board. No communication happens for a while and then suddenly "ble_evt_connection_disconnected connection: 0 (0x00) reason:0x0208 ['Link supervision timeout has expired.']" is received by the central.

    Most of the people in the support groups have mentioned that upgrading the zephyr code has resolved the issue. Do you think the same could be with our case? If yes then which tag and version should we be using of zephyr?

Reply
  • From the packet sniffers, what we understood is ble_evt_connection_version_ind event is not getting generated from the board. No communication happens for a while and then suddenly "ble_evt_connection_disconnected connection: 0 (0x00) reason:0x0208 ['Link supervision timeout has expired.']" is received by the central.

    Most of the people in the support groups have mentioned that upgrading the zephyr code has resolved the issue. Do you think the same could be with our case? If yes then which tag and version should we be using of zephyr?

Children
  • Hi,

    Could you attach the packet sniffer logs here ? What sniffer are you using ? nRF sniffer ?

    If you connect to the BLE peripheral using a smartphone, e.g. with nRF Connect for mobile, do you see the same issue?

    Most of the people in the support groups have mentioned that upgrading the zephyr code has resolved the issue. Do you think the same could be with our case? If yes then which tag and version should we be using of zephyr?

    You could maybe ask in the support group where you find this information about what zephyr version they upgraded to. You could maybe try the latest release(v1.13.0), or latest release candidate(v1.14.0-rc1).

  • We don't have nRF sniffer. We are using Bluegiga Interface tool. 

    Our board acts as a Peripheral and BLED112 as the BLE dongle for the windows machine.

    Logs when I click connect button on the interface tool --

    2019.03.14 00:59:49.687 ble_cmd_gap_connect_direct address: bb d1 4f 9c 91 c3 addr_type: 1 (0x01) conn_interval_min: 60 (0x003c) conn_interval_max: 76 (0x004c) timeout: 100 (0x0064) latency: 0 (0x0000)
    2019.03.14 00:59:49.693 TX: 000f0603bbd14f9c91c3013c004c0064000000

    2019.03.14 00:59:49.698 ble_rsp_gap_connect_direct result:0x0000 ['No Error'] connection_handle: 0 (0x00)
    2019.03.14 00:59:49.699 RX: 00030603000000

    2019.03.14 00:59:49.742 ble_evt_connection_status connection: 0 (0x00) flags: 5 (0x05) address:c3:91:9c:4f:d1:bb address_type: 1 (0x01) conn_interval: 60 (0x003c) timeout: 100 (0x0064) latency: 0 (0x0000) bonding: 255 (0xff)
    2019.03.14 00:59:49.746 RX: 801003000005bbd14f9c91c3013c0064000000ff

    2019.03.14 00:59:50.848 ble_evt_connection_disconnected connection: 0 (0x00) reason:0x0208 ['Link supervision timeout has expired.']
    2019.03.14 00:59:50.863 RX: 80030304000802

    Clearly the last packet is the disconnect event received. I believe it should have been version_ind_event.

    When we configured the board to act as CENTRAL and the mobile app as peripheral, the board kept connected-disconnected. It didn't stay connected even for a second.  Reason for disconnection printed was 62.

    POINT TO NOTE - our board doesn't have external oscillator instead is using the in-built RC oscillator. And the two configs of setting RC and its value to 250PPM in zephyr is set properly. 

  • What is the link supervision timeout set to ? Could you increase it to 4 sec?

    Do you have any logs(either over UART or Segger RTT) from the peripheral side?

Related