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

S110 peripheral disconnects in middle of activity

I am running into some symptoms here that I'm not understanding.

My peripheral is an nRF51822 using the S110 softdevice. It implements a service which sends out notifications at regular intervals (I've tried from 1 second to 10 seconds). Connection parameters are as follows, basically taken from an example service:

#define MIN_CONN_INTERVAL MSEC_TO_UNITS(500, UNIT_1_25_MS)
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS)
#define SLAVE_LATENCY 0
#define CONN_SUP_TIMEOUT MSEC_TO_UNITS(8000, UNIT_10_MS)

I've tested this with an S120 central, with LightBlue on an iPhone, and with gatttool from BlueZ on Linux. In all cases I have similar symptoms: The peripheral will be sending out notifications, the central will be receiving them properly, and then suddenly the peripheral will receive BLE_GAP_EVT_DISCONNECTED with a reason of 0x16 (local user termination). The disconnect happens somewhere around 30-60 seconds of the connection being established.

I observed the same behavior with indications when I used gatttool to enable them. The peripheral would be properly receiving confirmations, and then randomly I would get NRF_ERROR_BUSY when trying to send the next indication.

I also tried repeatedly reading the characteristic from LightBlue, leaving notifications disabled, and still encountered this problem.

It looks to me like 0x16 is something in the peripheral terminating the connection, but what can I do to figure out why it is doing so?

Parents Reply Children
No Data
Related