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/CC2640: Why my android app pairing with cc2640 failed ?

Part Number: CC2640

Tool/software: Code Composer Studio

tittle: Why my android app pairing with cc2640 failed ?

content:
I need to conrtol the vehicle with an android app.The cc2640 device is in the T-BOX,which is communicates with vehicle through can
frames.The T-BOX has no display capability. When my android app connect and pair with the T-BOX , there is no need to input pair
code .The process of pairing is automatic.

My android app is configured to the mode of "pairing with cc2640 automatically ,there is no need to input the pairing pass
code".Beside this ,my cc2640 is configured to the mode of "just work".However, my android app cann not pair with my CC2640.The log
of ble packet overair is in the attachments[1] "20190612-1106-justwork-connectSuccess-pairFail.psd". My code of cc2640 is based on
the simple_peripheral project . My pairing code configuration of cc2640 is shown below:

uint8_t pairMode = GAPBOND_PAIRING_MODE_INITIATE;
uint8_t mitm = FALSE;
GAPBondMgr_SetParameter( GAPBOND_PAIRING_MODE, sizeof (uint8_t), &pairMode);
GAPBondMgr_SetParameter( GAPBOND_MITM_PROTECTION, sizeof (uint8_t), &mitm);

In the log of "20190612-1106-justwork-connectSuccess-pairFail.psd", the packet of my android app sending pair request is shown in
picture 1 .The packet of my cc2640 sending pair response is shown in picture 2 . The reason why pairing failed is shown in picture 3.

picture 1

picture 2

picture 3


For the purpose of comparing ,my android app paired with another BLE device successfully , The log of ble packet overair is in the
attachments[2]"20190612-1443-all-success.psd".

In the log of "20190612-1443-all-success.psd", the packet of my android app sending pair request is shown in picture 4 .The
packet of another ble device sending pair response is shown in picture 5.

picture 4

picture 2

Why my android app pairing with cc2640 failed ? How to change the code of pairing configuration of cc2640 ?

Attachments:

1、20190612-1106-justwork-connectSuccess-pairFail.psd

20190612-1106-justwork-connectSuccess-pairFail.psd

2、20190612-1443-all-success.psd

20190612-1443-all-success.psd

3、the positon of simple_peripheral project in my computer is as followed:
C:\ti\simplelink_cc2640r2_sdk_1_40_00_45\examples\rtos\CC2640R2_LAUNCHXL\ble5stack\simple_peripheral

4、you can download the simplelink_cc2640r2_sdk_1_40_00_45 from the following website:
dev.ti.com/.../

5、you can download the Core_v4.2.pdf from the following website:
www.bluetooth.com/.../bluetooth-core-specification

6,my CC2640R2 launchpad is bought from here::
www.ti.com/.../launchxl-cc2640r2

My develop environment:
CCS:Code Composer Studio 7.2.0
SDK:simplelink_cc2640r2_sdk_1_40_00_45
hardware:CC26640R2 launchpad develop kit