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

Unwanted disconnection after notification

Hi,

I am trying to write a program which send data through notification. All is working, excepted that once the notifications are done, the device automatically disconnects after a few seconds. And there is no possibility to write nor read the other characteristics between the end of the notifications and the disconnection. Once the device is disconnected, I am able to connect to it again and perform read and write, but the same problem still happens when I want to receive notification.

My target is a nRF51822-QFACA1, I use sdk v11 and softdevice s130 v2.0.0

Edit 01/03/2017 : Here is the information I catched with a sniffer, about the message which has been sent at the same moment than the disconnection event :

www.hostingpics.net/viewer.php

Could you help me to solve this problem ?

Best regards,

Guillaume

Parents
  • Hi Guillaume,

    From the trace I can see that it's not disconnect right after you send notification. What you capture in your image in the question is the LL_TERMINATE_IND packet which mean it's the termination packet from the Master/central to disconnect.

    The disconnection happen 30 second after a write request (packet 637) it's a timeout for the write request because there is no write response for it.

    Usually this happens when you set a characteristic with authorization and in the application you don't response to the BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event. Please have a look here.

    The write request is for attribute at handle ID 0x0f, you may want to check. Same write response to handle 0x10 (packet 302)had no issue.

Reply
  • Hi Guillaume,

    From the trace I can see that it's not disconnect right after you send notification. What you capture in your image in the question is the LL_TERMINATE_IND packet which mean it's the termination packet from the Master/central to disconnect.

    The disconnection happen 30 second after a write request (packet 637) it's a timeout for the write request because there is no write response for it.

    Usually this happens when you set a characteristic with authorization and in the application you don't response to the BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event. Please have a look here.

    The write request is for attribute at handle ID 0x0f, you may want to check. Same write response to handle 0x10 (packet 302)had no issue.

Children
Related