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.

CC2540: iOS disconnection : TI Employee could you please reproduce ?

Part Number: CC2540

Dear all
I'm facing difficulties to connect my BLE central to an iPhone acting as a peripheral.
The connection is established then after 5 to 10sec the connection is terminated with the reason code 0x13 (GAP_LINK_TERMINATED_EVENT)
The problem does not seem to come from my hardware or firmware as I observe the same behavior when using btool.

I already tried different connection interval, supervision timeout etc, with no luck so far.
I'm using BLE lib 1.4.1

TI employees, could you please reproduce this issue and let me know what could cause this disconnection ?

- Please use CC2540 TI dongle running host test release app.

- Use the following app store application : midimttr (itunes.apple.com/.../id925495245
(this app turns the iPhone into an advertising MIDI BLE device)

- Run btool and connect to the iPhone while advertising.

You will observe the following logs from btool:

--------------------------------------------------------------------

Device Connected
Handle = 0x0000
Addr Type = 0x03 (PrivateResolve)
BDAddr = 60:7D:85:F9:7B:D6

--------------------------------------------------------------------

[4] : <Rx> - 11:24:22.201
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (Event)
-Data Length    : 0x14 (20) bytes(s)
Event          : 0x0605 (1541) (GAP_EstablishLink)
Status         : 0x00 (0) (Success)
DevAddrType    : 0x03 (3) (PrivateResolve)
DevAddr        : 60:7D:85:F9:7B:D6
ConnHandle     : 0x0000 (0)
ConnRole       : 0x08 (8) (Central)
ConnInterval   : 0x0018 (24)
ConnLatency    : 0x0004 (4)
ConnTimeout    : 0x0258 (600)
ClockAccuracy  : 0x00 (0)

Dump(Rx):

0000:04 FF 14 05 06 00 03 D6 7B F9 85 7D 60 00 00 08 ........{..}`...

0010:18 00 04 00 58 02 00                            ....X..

--------------------------------------------------------------------

[5] : <Warning> - 11:24:22.264
The Last 1 Bytes In The Following Message Were Not Decoded
(Message Has More Than The Expected Number Of Data Bytes)

--------------------------------------------------------------------

[6] : <Rx> - 11:24:22.264
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (Event)
-Data Length    : 0x0A (10) bytes(s)
Event          : 0x0580 (1408) (GATT_ClientCharCfgUpdated)
Status         : 0x00 (0) (Success)
ConnHandle     : 0x0000 (0)
PduLen         : 0x04 (4)
AttrHandle     : 0x000F (15)
Value          : 0x02 (2)

Dump(Rx):

0000:04 FF 0A 80 05 00 00 00 04 0F 00 02 00          .............

--------------------------------------------------------------------

[7] : <Info> - 11:24:27.786

Device Disconnected
Handle = 0x0000
Addr Type = 0x03 (PrivateResolve)
BDAddr = 60:7D:85:F9:7B:D6

--------------------------------------------------------------------

[8] : <Rx> - 11:24:27.786
-Type           : 0x04 (Event)
-EventCode      : 0x00FF (Event)
-Data Length    : 0x06 (6) bytes(s)
Event          : 0x0606 (1542) (GAP_TerminateLink)
Status         : 0x00 (0) (Success)
ConnHandle     : 0x0000 (0)
Reason         : 0x13 (19) (Peer Requested)

Dump(Rx):

0000:04 FF 06 06 06 00 00 00 13                      .........

--------------------------------------------------------------------

I highlighted in orange a Warning from btool, don't know if this is the cause of the issue.
There is now a long time I'm trying to figure out what is the problem, with no luck.

Any help would be greatly appreciated.
Regards
Jerome


  • Hello Jerome,

    The connection is dropping because the iOS device elects to do so. In my experience, if you don't perform any GATT operations the iOS device will terminate the connection within a few seconds.

    Best wishes
  • Thanks for your answer.

    Does this mean the central should periodically perform GATT operation to maintain the connection active ?
    If so, could you please detail what kind of GATT operation should be performed ?

    Regarding the warning message I highlighted in the btool logs, any comment ?

    Thanks
    Jerome
  • I would perform GATT Characteristic discovery. One option is to take a sniffer trace of two iPhones communicating with LightBlue, then use that as a baseline.

    Best wishes
  • Hi

    I've implemented a periodic GATT service discovery (each sec) to try solving this issue. Unfortunately it does not help, the connection still drops after few seconds.

    TI employees, could you please reproduce this issue and let me know what could cause this disconnection ?

    I described on the original post how to reproduce this issue, there is a long time I'm stuck on this, reproducing my problem would be greatly appreciated.

    Thank you

    Jerome

  • My issue is really easy to reproduce, TI employees, It would be really nice to read an answer... thanks
  • Hi Jerome,

    Please see my reply from May 30. I suggest that you contact the app developer via their support link / email to inquiry as to why they are terminating the connection. Perhaps they can provide you with an interface guide for interacting with their app.

    Best wishes