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.

CC2640R2F: Severe Notify Failure error code 14 with Android

Part Number: CC2640R2F
Other Parts Discussed in Thread: BLE-STACK

Hi,

We are using HostTest project based peripheral role to connect with Android and iOS simultaneously. Pairing scheme is not used.
Data exchange between Android/iOS is over Notify method only.

Connection parameters are as follows:

  • Connection interval min/max : 30ms/100ms
  • Slave Latency : 0
  • Supervision Timeout : 3sec


Even with Android only connection ; while sending data of size 10KB for long duration; Notify Failure error is being received from HostTest firmware with error code 14.
From the Android point of view; it is getting disconnected from BLE Controller. But cc2640R2F's HostTest firmware is not detecting this disconnection.

Mostly the connection becomes us-usable/stalled.

Please let us know what could be the reason and how can we resolve it.
Thanks in advance.

  • Hi Arun,

    What version of the BLE-Stack are you using?

    0x14 is the return status when you send the GATT_Notification command? This error code is bleNotConnected, so it sounds like your connection was already lost when this happened.

    Can you post a sniffer log of this happening?
  • Hi ,

    Thanks for assisting.
    BLE SDK version is 1.40.00.45.

    With iOS Application; we are able to receive the Link Terminated error code (Either Peer Requested or Supervision Timeout) from firmware but with Android; we are not seeing such Link Terminated events.

    Will share you the sniffer capture asap.
  • Hi Arun,

    Ok, I look forward to see the sniffer capture. Can you also check the device ICall heap when this happens? (Link: dev.ti.com/.../ble-index.html )
  • Hi Marie H (4757099)

    Sorry for the delay...

    Please see the sniffer capture.
    The connection is with only one iPhone this time.
    NotifyFail14Sniffer.psd

    NotifyFail14Sniffer.psd

  • Hi Arun,

    In the sniffer log, the master device (iPhone) terminates the connection with reason 0x13 Remote User Terminated Connection.

    Am I understanding the situation correct:
    - The slave is sending GATT_Notifications
    - At a certain point the return status for GATT_Notifications command is 0x14 and the slave stops sending the notifications. (at this point the connection i still alive)
    - Both devices keep sending empty data packets for a while
    - You terminate the connection from the master side.
    - Host test does not get any GAP link terminated event.
  • Yes Marie, you are right.

    HostTest is throwing Norify failure 14. But the link terminate opcode or event is not being sent by HostTest.

    Any suggestion to get the link terminate event at all cases?

  • Hi Arun,

    From your sniffer log, it does not look like the BLE Connection is terminated when the CC2640R2F stops sending gatt notifications.

    Can you provide me with steps to reproduce this issue?
  • Hi Marie H (4757099)

    Attaching the HostTest configuration sequence till a connection forms enabling Notification on 2 Char UUIDs.

    After that Notifications are sent.

    Please let me know if you face any difficulty.

    HCI Reset
    01 03 0c 00
    GAP Initialization
    01 00 fe 26 04 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00
    Parameter/Timing Setting
    01 01 fc 01 0c
    01 30 fe 03 06 20 00
    01 30 fe 03 07 20 00
    01 30 fe 03 08 20 00
    01 30 fe 03 09 20 00
    01 30 fe 03 0a 20 00
    01 30 fe 03 0b 20 00
    01 30 fe 03 1a 00 00
    01 30 fe 03 19 2c 01
    01 30 fe 03 1f 06 00
    01 30 fe 03 15 18 00
    01 30 fe 03 16 50 00
    01 0d fc 02 c8 00
    01 21 fc 08 1b 00 48 01 1b 00 48 01
    01 06 fc 08 00 00 00 00 00 00 00 00
    04 ff 05 01 04 00 01 fc
    04 ff 06 7f 06 00 30 fe 00
    04 ff 06 7f 06 00 30 fe 00
    04 ff 06 7f 06 00 30 fe 00
    04 ff 06 7f 06 00 30 fe 00
    04 ff 06 7f 06 00 30 fe 00
    04 ff 06 7f 06 00 30 fe 00
    04 ff 06 7f 06 00 30 fe 00
    04 ff 06 7f 06 00 30 fe 00
    04 ff 06 7f 06 00 30 fe 00
    04 ff 06 7f 06 00 30 fe 00
    04 ff 06 7f 06 00 30 fe 00
    04 ff 05 0d 04 00 0d fc
    04 ff 05 21 04 00 21 fc
    04 ff 05 06 04 00 06 fc
    01 fc fd 05 00 28 09 00 10
    // GATT Service/Char Configuration : GATT_DB_OFF_CHIP
    01 fe fd 03 03 28 03
    01 fe fd 11 38 e4 c0 00 9d 8c 29 64 70 b3 2c fd 9e 63 77 4a 03
    01 fe fd 03 00 29 03
    01 fe fd 03 02 29 03
    01 fe fd 03 03 28 03
    01 fe fd 11 18 59 1f 7e db 16 46 7e 87 58 72 f6 fa eb 03 d8 03
    01 fe fd 03 00 29 03
    01 fe fd 03 02 29 03
    01 07 fe 18 01 16 02 01 1a 03 03 da cb 0e 08 42 30 30 30 30 30 31 46 2d 37 32 63 30
    01 1e fc 01 01
    01 08 fe 00
    04 ff 06 7f 06 00 fc fd 00
    04 ff 06 7f 06 00 fe fd 00
    04 ff 06 7f 06 00 fe fd 00
    04 ff 06 7f 06 00 fe fd 00
    04 ff 06 7f 06 00 fe fd 00
    04 ff 06 7f 06 00 fe fd 00
    04 ff 06 7f 06 00 fe fd 00
    04 ff 06 7f 06 00 fe fd 00
    04 ff 0a 7f 06 00 fe fd 04 01 00 09 00
    04 ff 06 7f 06 00 07 fe 00
    04 ff 06 7f 06 12 08 fe 00
    04 ff 04 02 06 00 01
    04 ff 05 1e 04 0c 1e fc
    // Make Discoverable/End discoverable wil 6sec interval
    01 06 fe 0a 00 00 00 00 00 00 00 00 07 00
    04 ff 06 7f 06 00 06 fe 00
    04 ff 03 03 06 00
    // Peer Connection Establishment sequence
    04 ff 14 05 06 00 01 ef 75 96 ff 31 45 00 00 04 18 00 00 00 48 00 01
    01 08 fe 00
    04 ff 06 7f 06 12 08 fe 00
    04 ff 08 02 05 00 00 00 02 b9 00
    01 03 fd 04 00 00 17 00
    04 ff 06 7f 06 00 03 fd 00
    04 ff 0c 12 05 00 00 00 06 00 00 05 00 01 00
    01 13 fd 02 00 00
    04 ff 06 7f 06 00 13 fd 00
    04 ff 0c 12 05 00 00 00 06 00 00 09 00 01 00
    01 13 fd 02 00 00
    04 ff 06 7f 06 00 13 fd 00
    04 ff 0c 12 05 00 00 00 06 00 00 09 00 01 00
    

  • Hi Arun,

    Did you make any changes to the Host test project? (e.g. add a service or profile?)

    Can you post the commands in human readable form so that I can use BTool to test?

  • Hi Marie H (4757099) ,

    Sorry for the delay as I was in a business trip.

    Here is our HostTest Stack configuration:

    USE_ICALL
    GATT_DB_OFF_CHIP
    MAX_NUM_BLE_CONNS=5
    MAX_PDU_SIZE=162
    xMAX_NUM_PDU=10
    FLASH_ROM_BUILD
    xPOWER_SAVING
    INCLUDE_AES_DECRYPT
    xTESTMODES
    OSAL_CBTIMER_NUM_TASKS=1
    xDEBUG
    HALNODEBUG
    xDEBUG_GPIO
    xDEBUG_ENC
    xDEBUG_SW_TRACE
    NEAR_FUNC=
    DATA=
    CC26XXWARE
    CC26XX
    ccs
    xDEBUG

    and that of the Application is:

    USE_ICALL
    xPOWER_SAVING
    GATT_DB_OFF_CHIP
    MAX_PDU_SIZE=162
    xMAX_NUM_PDU=10
    MAX_NUM_BLE_CONNS=5
    HEAPMGR_SIZE=0
    xTI_DRIVERS_LCD_INCLUDED
    CC2650_HOSTTESTAPP
    xdc_runtime_Assert_DISABLE_ALL
    xdc_runtime_Log_DISABLE_ALL
    CC26XXWARE
    NPI_USE_UART
    CC26XX
    ICALL_MAX_NUM_ENTITIES=6
    ICALL_MAX_NUM_TASKS=3
    ccs
    xDEBUG

    Will share the HCI Commands used as a separate post.



  • Hi

    Please find the command sequence in readable form:

    1. Hardware RESET  followed by HCI_Reset()
    2. GAP_Initialization() { Gap Role Peripheral, IRK(0), CSRK(0), SignCounter(1)}
    3. HCI_SetTxPower(5_DBM)
    4. SetParam(OPCODE_TGAP_LIM_DISC_ADV_INT_MIN, 32)
    5. SetParam(OPCODE_TGAP_LIM_DISC_ADV_INT_MAX, 32)
    6. SetParam(OPCODE_TGAP_GEN_DISC_ADV_INT_MIN, 32)
    7. SetParam(OPCODE_TGAP_GEN_DISC_ADV_INT_MAX, 32)
    8. SetParam(OPCODE_TGAP_CONN_ADV_INT_MIN, 32)
    9. SetParam(OPCODE_TGAP_CONN_ADV_INT_MAX, 32)
    10. SetParam(OPCODE_TGAP_CONN_ADV_INT_MIN, 32)
    11. SetParam(OPCODE_TGAP_CONN_ADV_INT_MIN, 32)
    12. SetParam(OPCODE_TGAP_CONN_EST_LATENCY, 0);
    13. SetParam(OPCODE_TGAP_CONN_EST_SUPERV_TIMEOUT, 300);
    14. SetParam(OPCODE_TGAP_CONN_PAUSE_PERIPHERAL, 6);
    15. SetParam(OPCODE_TGAP_CONN_EST_INT_MIN, 24); /* 30ms */
    16. SetParam(OPCODE_TGAP_CONN_EST_INT_MAX, 80); /* 100ms */
    17. HCIExt_SetSCA(200); // Sleep Clock Accuracy
    18. HCIExt_SetMaxDataLength(27, 328, 27, 328); /* Tx&Rx PDU Size : 27, Tx & Rx Time : 328 */
    19. HCIExt_SetlocalSupportedFeatures(8); /* Disabled LE Data Length Extension Feature */
    20. Gatt_AddService(2800, 5); /* Primary Service UUID, Number of Attributes */
    21. Gatt_AddAttribute(2803, 2);
    22. Gatt_AddAttribute(ServiceUUID1, 16);
    23. Gatt_AddAttribute(2900, 2);
    24. Gatt_AddAttribute(2902, 2);
    25. Gatt_AddAttribute(2803, 2);
    26. Gatt_AddAttribute(ServiceUUID2, 16);
    27. Gatt_AddAttribute(2900, 2);
    28. Gatt_AddAttribute(2902, 2);
    29. Gap_UpdateAdvertisingData() /* Shortened Local Name, LE General Discoverable, LE & BR/EDR Capable (Controller and Host), Complete List of 16bit Service UUID */
    30. HCI_EXT_OverlappedProcessing(Enable);
    31. Gap_MakeDiscoverable(); sleep(6sec); Gap_EndDiscoverable(); sleep(6); /* Repeat */
    32. wait for events from Central device and process them accordingly...

    Let me know if you need further details.

  • Hi Arun,

    Using your configuration and commands I am not able to make the device advertise.
  • Hi ,

    What kind of error you are getting for the following:
    1. Gap_UpdateAdvertisingData()
    2. Gap_MakeDiscoverable()/Gap_EndDiscoverable()

    Which Simple Link SDK you are using ?
    Ours is 1.40.00.48.
  • Hi Arun,

    When I send the Gap_MakeDiscoverable command, advertising ends immediately.

    Did you make any other changes to the Host test project? (e.g. add a service or profile?) Also, the list of predefined symbols seems not to be comprehensive.
  • Hi,

    Sorry for the delay,
    No; we didn't make any changes in Host Test project apart from the Project settings MACRO changes.
  • Hi Arun,

    I have not been able to make the device advertise using your configuration and command sequence. One thing I noticed is that the list of predefined symbols does not seem to be complete. 

    Can you give me step-by-step instructions to reproduce the issue?