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!

  • Our further analysis -
    At the central side, When the python script starts fetching the Characteristics it sends the Request as attclient_find_information to which the response is successful. This command is followed by Bluetooth attclient_procedure_completed to which the response is [128, 3, 3, 4, 0, 8, 2] which means disconnect.
    Hence, it means that controller issued a response to disconnect instead of the version_ind_packet

    Going through the version_ind_send code in blue tooth, it sends an empty packet and I think waits for the next connection interval to send the actual data. The central has predefined expectation of data and hence is not ack-ing? to which the peripheral sends the disconnect event.

    Is this the right direction we are in ??

    Really looking forward to a reply on it. Thank you so much !

  • Another update -
    Checked with other centrals also and tried to sniff the packet. What we understood is that moment after connect happens, in a while disconnect event with error 0x0208 is sent.

    Also observed one thing, addr_type set in our board is Random. ( this thing we noticed while we were comparing with other logs).

  • 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?

  • 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).

Related