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.

CC2340R5: Issue with L2CAP/COS/CED/BI-05-C PTS Test Failure (Subset DN Q344718)

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

Hello TI Support Team,

I am using simplelink_lowpower_f3_sdk_8_40_00_61 on a CC23xx device.

I am currently working on Bluetooth PTS qualification and need the stack to PASS the following test case:

 I have imported and tested with the qualification record Q344718 (Subset DN) for SimpleLinkTm CC2340R5x.(Qualification Workspace - Qualified Product Details)
I have made one modification in the default (certified) ICS:
TSPX_secure_connection was changed to TRUE. All other ICS settings remain as provided by TI.

Test Case:
GATT/SR/GAR/BI-05-C
(Read Characteristic Value – Insufficient Encryption Key Size)

Summary of the test:
This test requires the IUT (implementation under test) to accept a connection even if the encryption key size is smaller than required, and to respond to a GATT/ATT Read request with ATT Error 0x0C (Insufficient Encryption Key Size).

Expected behavior:
The IUT should permit establishing a BLE connection and allow a weak (smaller than required) encryption key size, but, when an attribute is accessed with insufficient key size, it should reply with ATT Error 0x0C as specified by the Bluetooth PTS test case.

Current Situation / Problem:
With SDK v8.40.00.61, the stack currently rejects connections (including L2CAP Credit Based Channels) at the connection or pairing stage when the encryption key size does not meet the required minimum, instead of allowing the connection and returning an ATT 0x0C error in response to a GATT/ATT request.
After reviewing the SDK (including gapbondmgr.c, app_l2cap_coc.c), it appears that minimum encryption key size requirements are enforced before a connection can be established, and I could not find a way to temporarily relax this check for certification purposes.

Request:

  • Is there any official method, configuration option, or workaround to temporarily allow a BLE connection with a smaller-than-required encryption key size so that the stack will return ATT Error 0x0C at the attribute access stage?
  • Are there any SDK updates, patches, or known workarounds that address the key size validation for PTS conformance in v8.40.00.61?

Thank you very much for your support. I would appreciate any guidance or information you can provide to help me resolve this BLE qualification issue.

Best regards,
Tsuchiya.

  • Correction: The correct title for this thread should be:
    "Inquiry about BLE-Stack Security Behavior and PTS Test GATT/SR/GAR/BI-05-C"

    I apologize for the confusion caused by the incorrect original title.

  • Hi Tsuchiya,

    Thank you for reaching out. I believe you are correct in that there is no easy way to change the key size validation, you would have to modify the source files to enable the behavior you are looking for. I would still recommend moving to the latest 9.14 due to the improvements that are included. The new SDK will not provide an easy way to enable this functionality, but it will grant fixes, improvements, and feature additions. 

    The gapbondmgr.c, app_l2cap_coc.c files may be modified by the developer if desired, so if this feature is necessary then it may be added there.

    Best Regards,

    Jan

  • Hello Jan,

    Thank you very much for your response and information.

    Our project requires that we pass PTS testing, and key size validation is critical for this.
    To enable key size validation and ensure compliance, would it be possible to provide either:

    • Sample code demonstrating how to correctly add or adjust key size validation (for example, in gapbondmgr.c and app_l2cap_coc.c),
      or
    • Detailed guidance (including specific code sections and the content to be changed) regarding how and where to make the necessary modifications for key size validation?

    I would appreciate any additional information, example code, or step-by-step instructions to help us implement this functionality and successfully pass the PTS test case.

    Thank you in advance for your support.

    Best regards,
    Tsuchiya

  • Hi Tsuchiya,

    I would be happy to help provide guidance. I believe the following section of the gapbondmgr.c file would be the best place to add modificatiosn to enable the functionality you are looking for.

    Can you try modifying the if statement to allow a smaller key size?

    Best Regards,

    Jan