This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

connection terminated under android 6 after 10 seconds

Hello,

I have modified the Android-nRF-Blinky Application to use it with the Datathroughput Demo on the nRF52 DK.

The android application runs on a Nexus 9 with android 6.0.1. I can establish a conneciton and i also can recieve notifications, but after about 10 seconds the connection is lost.

with the mastercontrolpanel i have the same behavioron the tablet..

if i run the application on my sony xperia z3 compact with android 5.1.1 it works fine and also with the mastercontrol panel i have no problems.

here is the log from the android studio..

BluetoothGatt: connect() - device: C5:7F:B0:8E:AA:91, auto: false
BluetoothGatt: registerApp()
BluetoothGatt: registerApp() - UUID=3a9c080d-ae20-47ea-b34c-7ea7798204cc
BluetoothGatt: onClientRegistered() - status=0 clientIf=5
BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=C5:7F:B0:8E:AA:91
BluetoothGatt: discoverServices() - device: C5:7F:B0:8E:AA:91
BluetoothGatt: onSearchComplete() = Device=C5:7F:B0:8E:AA:91 Status=0
BluetoothGatt: setCharacteristicNotification() - uuid: 00002a05-0000-1000-8000-00805f9b34fb enable: true
BluetoothGatt: setCharacteristicNotification() - uuid: 00001625-1212-efde-1523-785feabcd123 enable: true
BluetoothGatt: cancelOpen() - device: C5:7F:B0:8E:AA:91
BluetoothGatt: onClientConnectionState() - status=59 clientIf=5 device=C5:7F:B0:8E:AA:91
BluetoothGatt: close()
BluetoothGatt: unregisterApp() - mClientIf=5

It seems that the return of status=59 of onClientConnectionState() closes the connection.. I havent found any information what status=59 mean.

Has somebody already tested the mastercontrolpanel on a device with android 6?

And where i get information about the meaning of "status=59" of onClientConnectionState() .. i couldnt find a reference so far.

  • FormerMember
    0 FormerMember

    Do you have a nRF51-DK or a nRF51-Dongle? If so, could you use the sniffer to track what is being transferred over the air? The sniffer should be used with Wireshark, and it works best with version 1.10, not one of the newer versions, this answer links to older version of wireshark.

  • yes i have a dongle and i have captured the packets..

    the connection is terminated with the control pdu "LL_TERMINATE_IND" Error Code 0x3b --> "Unnaccaptable Connection Parameters"

  • I think I have found the reason, why the connection parameters are rejected..

    regarding this post on stackoverflow

    android 6 does not accept a connection interval < 11.25 ms. I will test this and share my results.

  • FormerMember
    0 FormerMember

    Which device transfer the LL_TERMINATE_IND packet?

    What are the connection parameters (set in the code) for the peripheral and central, respectively?

    Could you upload the sniffer trace here?

  • here are the connection parameter for the peripheral:

        #define MIN_CONN_INTERVAL               MSEC_TO_UNITS(7.5, UNIT_1_25_MS)
    #define MAX_CONN_INTERVAL               MSEC_TO_UNITS(7.5, UNIT_1_25_MS)
    #define SLAVE_LATENCY                   10                              
    #define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(3000, UNIT_10_MS) 
    

    the connection parameter update of the peripheral is rejected by the central and LL_TERMINATE_IND is sent by the central..

    I think I have found the reason.. see my answer below. I have to test it, if the connection parameters are accepted, when i change the connection parameters. I will post my results then.

Related