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.

CC2642R: [simple_peripheral example] cannot enable L2CAP Connection Oriented Channels and PTM at the same time

Part Number: CC2642R

Tool/software:

Hi,

There is a compile error when I enable both PTM and L2cap CoC for simple_peripheral example. (sdk version: sdk_7_10_01_24)

Could you help with this issue? Thank you!

C:/ti/simplelink_cc13xx_cc26xx_sdk_7_10_01_24/source/ti/ble5stack/icall/app/icall_hci_tl.c:9010:12: warning: call to undeclared function 'buildHCIExtHeader'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
msgLen = buildHCIExtHeader(out_msg, (HCI_EXT_L2CAP_EVENT | L2CAP_CONNECT_IND),
^
C:/ti/simplelink_cc13xx_cc26xx_sdk_7_10_01_24/source/ti/ble5stack/icall/app/icall_hci_tl.c:9010:30: error: use of undeclared identifier 'out_msg'
msgLen = buildHCIExtHeader(out_msg, (HCI_EXT_L2CAP_EVENT | L2CAP_CONNECT_IND),
^
C:/ti/simplelink_cc13xx_cc26xx_sdk_7_10_01_24/source/ti/ble5stack/icall/app/icall_hci_tl.c:9013:3: error: use of undeclared identifier 'out_msg'
out_msg[msgLen++] = id;
^
C:/ti/simplelink_cc13xx_cc26xx_sdk_7_10_01_24/source/ti/ble5stack/icall/app/icall_hci_tl.c:9014:36: error: use of undeclared identifier 'out_msg'
msgLen += L2CAP_BuildConnectReq(&out_msg[msgLen], (uint8_t *)pReq);
^
C:/ti/simplelink_cc13xx_cc26xx_sdk_7_10_01_24/source/ti/ble5stack/icall/app/icall_hci_tl.c:9017:61: error: use of undeclared identifier 'out_msg'
HCI_SendControllerToHostEvent(HCI_VE_EVENT_CODE, msgLen, out_msg);

  • Hi,

    Thank you for reaching out. Can you share how you are enabling PTM and L2CAP on your project?

    Best Regards,

    Jan

  • Hi Jan,

    The steps to reproduce this issue are as follows:

    1. import ccs project C:\ti\simplelink_cc13xx_cc26xx_sdk_7_10_01_24\examples\rtos\CC26X2R1_LAUNCHXL\ble5stack\simple_peripheral

    2. enable "BLE->BLE Features-> L2CAP Connection Oriented Channels" and "BLE->Advanced Settings->PTM" in simple_peripheral.syscfg

    3. rebuild

  • Hi,

    Got it. i was able to reproduce the issue. It seems the behavior only occurs if both PTM and L2CAP are enabled. I believe the problematic line is line 714 in icall_hci_tl.c

    Can you try moving line 714 outside of the #ifdef? You can do this without modifying your SDK installation, by deleting the linked file for icall_hci_tl.c found in iCallBLE and replacing it with a local copy (by dragging and dropping the SDK copy to the iCallBLE folder in CCS and clicking on copy).

    Best Regards,

    Jan

  • Hi Jan,

    It works. Thank you!