This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CC2652R: Connceted device automatic disconnection after 40 sec

Part Number: CC2652R

Tool/software: Code Composer Studio

While testing ProjectZero and SimplePeripheral projects I experienced, that the connection to the devices broken exactly after 40 sec period of time, like a timer.
After time passing by, a GAP_LINK_TERMINATED_EVENT message arrives, for an unknown reason.
I assume it should be some Gap settings, but I have no idea where to look for this.
The connection broke even, while different data reading, writting, enabled notify through the different services.
Is there any way to avoid this 40 sec connection „timer break” withe either in GAP settings or with any way reading and writing?

Many thanks for your help,

Laszlo

  • Hey Laszlo,

    What version SDK are you using? Have you made any software modifications? What device are you using?

    I did not see any periodic link terminations with the out of the box examples for simple peripheral or project zero with SDK version 2_30_00_34. I tested this using Btool as the central device.

    Can you walk me through your setup, so that I may reproduce the results?
  • Hi Ammar,

    Thank you for your reply.

    The SDK version is CC26X2 SDK 2.20.00.36.

    I'm using the original Poject Zero project (uploaded without modification) and LauchXL CC2651R1 development tool. I was connected to the Launchpad with an Android device. I've tried two applications below nRF Connect and BLE Scanner, when both applications are used, the connection is automatic disconnected.

    Terminal log:

    #000020 [ 0.067 ] INFO: (project_zero.c:1185) GAP is started. Our address: F0:F8:F2:D2:B6:47
    #000021 [ 0.067 ] INFO: (project_zero.c:1203) Name in advertData array: ProjectZero
    #000022 [ 0.079 ] INFO: (project_zero.c:1406) Adv Set 0 Enabled
    #000023 [ 8.924 ] INFO: (project_zero.c:1411) Adv Set 0 Disabled
    #000024 [ 8.924 ] INFO: (project_zero.c:1431) Adv Set 0 disabled after conn 0
    #000025 [ 8.924 ] INFO: (project_zero.c:1240) Link establish event, status 0x00. Num Conns: 1
    #000026 [ 8.924 ] INFO: (project_zero.c:1253) Connected. Peer address: 05:D0:2C:90:82:8D <---- CONNECTED PEER
    #000027 [ 8.939 ] INFO: (project_zero.c:1406) Adv Set 0 Enabled

    ... Read button states, write LED-s... etc.

    #000073 [ 24.964 ] INFO: (button_service.c:484) ReadAttrCB : BUTTON1 connHandle: 0 offset: 0 method: 0xff
    #000074 [ 34.490 ] INFO: (led_service.c:495) WriteAttrCB : LED0 connHandle(0) len(1) offset(0) method(0x12)
    #000075 [ 34.490 ] INFO: (project_zero.c:2389) (CB) LED Svc Characteristic value change: paramID(0). Sending msg to app.
    #000076 [ 34.490 ] INFO: (project_zero.c:2060) Value Change msg: LED Service LED0: 01
    #000077 [ 34.490 ] INFO: (project_zero.c:2068) Turning LED0 on
    #000078 [ 44.202 ] INFO: (led_service.c:510) WriteAttrCB : LED1 connHandle(0) len(1) offset(0) method(0x12)
    #000079 [ 44.202 ] INFO: (project_zero.c:2389) (CB) LED Svc Characteristic value change: paramID(1). Sending msg to app.
    #000080 [ 44.203 ] INFO: (project_zero.c:2075) Value Change msg: LED Service LED1: 01
    #000081 [ 44.203 ] INFO: (project_zero.c:2083) Turning LED1 on  <----- TIMEOUT???... (Android app disconnected)  AND WAITING FOR SOMETHING...
    #000082 [ 61.776 ] INFO: (project_zero.c:1281) Device Disconnected!  <----- AFTER A FEW SECONDS GAP_LINK_TERMINATED_EVENT
    #000083 [ 61.776 ] INFO: (project_zero.c:1282) Num Conns: 0

  • Hey Laszlo,

    I was unable to reproduce the issue on my end. What phone are you using, with what version of Android? Can you test with another device (perhaps a different phone)?

    Some versions of Android have issues with certain features, so try removing the DLE feature as outlined here. There's more information about that in the following e2e post: https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/630009.

    If that doesn't work, can you provide sniffer logs? This way I can investigate the root cause further. It may also be useful to know what op code is returned. You can access it via the pPkt struct within the GAP_LINK_TERMINATED_EVENT case statement.

  • Hello,

    I haven’t heard from you for a few days, so I’m assuming you were able to resolve your issue. If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information.

    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.
  • Hello Ammar,

    Sorry for my late answer, but it took time until i could test it on Apple device through BLE4 and BLE 5. The error only appears on Android device. (Android version 5.1) I'd like to try out newer Android version. I'll write soon.

    Regards,

    Laszlo
  • Thanks for the update. Unfortunately some Android devices have trouble connecting due to the way they handle pairing and security.

    I will look forward to your response.
  • Hello,

    I haven’t heard from you for a while, so I’m assuming you were able to resolve your issue. If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information.

    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.