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

Android app GATT CONN TIMEOUT

Hi,

I am using nRF51422 with SDK 9.0 and SoftDevice130 with nus service. I have a custom android app running on BLE uart service. Data communication and connection handling is proper with the app. When I switch off the nRf51422 peripheral device, the app will come to know disconnection event only when (0x08) GATT CONN TIMEOUT event occur. I just want to know there is any other way to identify the disconnection event ? If not, is it possible to reduce the GATT CONN TIMEOUT interval ?

Thanks.

  • Thanks for your replay Akshat. My customized app is an android app. I set the nRF51822_xxAA device connection supervisory timeout to 3s. When I manually disconnect the power of the device, it takes about 8s for the app to identify the unavailability of the device side. Below is the android log info:

    06-21 23:55:09.890 29331-29343/com.madsglobal.android.smarthw I/ShsService: updateAinPinStatus

    06-21 23:55:09.990 29331-29342/com.madsglobal.android.smarthw D/BluetoothGatt: onNotify() - Device=F2:6C:48:43:B8:4B UUID=48530002-5a4e-6c61-626f-6c475344414d

    06-21 23:55:09.990 29331-29342/com.madsglobal.android.smarthw I/ShsService: MSB: 1, LSB: 113

    06-21 23:55:09.990 29331-29342/com.madsglobal.android.smarthw I/ShsService: updateAinPinStatus

    06-21 23:55:17.030 29331-29343/com.madsglobal.android.smarthw D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=F2:6C:48:43:B8:4B

    06-21 23:55:17.040 29331-29343/com.madsglobal.android.smarthw I/ShsService: Disconnected from GATT server

    06-21 23:55:17.040 29331-29686/com.madsglobal.android.smarthw I/ShsService: Exit SHS

    06-21 23:55:17.040 29331-29686/com.madsglobal.android.smarthw D/BluetoothGatt: refresh() - device: F2:6C:48:43:B8:4B

    06-21 23:55:17.050 29331-29686/com.madsglobal.android.smarthw I/ShsService: Refreshing result: true

    06-21 23:55:17.060 29331-29686/com.madsglobal.android.smarthw I/ShsService: Cleaning up...

    06-21 23:55:17.060 29331-29686/com.madsglobal.android.smarthw D/BluetoothGatt: close()

    06-21 23:55:17.060 29331-29686/com.madsglobal.android.smarthw D/BluetoothGatt: unregisterApp() - mClientIf=5

  • Hello Lisa,

    The delay you have mentioned is also there in the Nordic's Master Control panel app. I can suggest you to read the rssi of connected device at a particular interval, by this you can get some idea of the device connection state. But I don't know this thing works for u or not.

Related