Part Number: CC2640
Hello TI,
I'm upgrading cc2640 to BLE 4.2 stack and have an issue with pairing the device. When it starts pairing the peripheral's SMP response has no LTK request, and when the authentication successfully finished pDevSecInfo is 0, as result the device LTK is not saved in SNV. The connection is established and secured, I can read/write from/to the device.
If I disconnect and try to connect again the central (Mac and iOS) drops the connection with 'Peer removed pairing information' reason.
Here is some PacketLogger trace:
Sep 16 20:06:45.204 SMP Send 0x0042 60:77:71:4E:BD:87 SMP Pairing Request Command
SMP Pairing Request Command
IO Capability: 0x04 - Keyboard Display
OOB Data: 0x00 - Oob Authentication Data Not Present
Auth Req: 0x0D - Bonding Enabled - MITM Enabled - SC Enabled - Keypress Disabled - CT2 Disabled
Max Enc Key Size: 0x10 (16)
Initiator Key Distribution: 0x03 - LTK IRK Requested - the central asked for both LTK and IRK from the peripheral
Responder Key Distribution: 0x03 - LTK IRK Requested
Sep 16 20:06:45.204 L2CAP Send 0x0042 60:77:71:4E:BD:87 Channel ID: 0x0006 Length: 0x0007 (07) [ 01 04 00 0D 10 03 03 ]
Sep 16 20:06:45.218 HCI Event 0x0042 60:77:71:4E:BD:87 Number Of Completed Packets - Handle: 0x0042 - Packets: 0x0001
Sep 16 20:06:45.218 Kernel Debug 0x0000 **** [IOBluetoothHostController][DecrementOutstandingACLPackets] - decremented - Classic-LE L|M|H - Delta: 0|0|0-1|0|0 - Device: 0|0|0-1|0|0 - ACL Pkt: In Q: 0|0|0-0|0|0 - Outstanding: 0|0|0-0|0|0 ****
Sep 16 20:06:45.233 SMP Receive 0x0042 60:77:71:4E:BD:87 SMP Pairing Response Command
SMP Pairing Response Command
IO Capability: 0x03 - No Input No Output
OOB Data: 0x00 - Oob Authentication Data Not Present
Auth Req: 0x09 - Bonding Enabled - MITM Disabled - SC Enabled - Keypress Disabled - CT2 Disabled
Max Enc Key Size: 0x10 (16)
Initiator Key Distribution: 0x02 - IRK Requested - the peripheral asked only for IRK
Responder Key Distribution: 0x02 - IRK Requested
The flags for authentication request are set as following:
static uint8_t gapBond_KeyDistList =
(
GAPBOND_KEYDIST_SENCKEY // sEncKey enabled, to send the encryption key
| GAPBOND_KEYDIST_SIDKEY // sIdKey enabled, to send the IRK, and BD_ADDR
| GAPBOND_KEYDIST_SSIGN // sSign enabled, to send the CSRK
| GAPBOND_KEYDIST_MENCKEY // mEncKey enabled, to get the master's encryption key
| GAPBOND_KEYDIST_MIDKEY // mIdKey enabled, to get the master's IRK and BD_ADDR
| GAPBOND_KEYDIST_MSIGN // mSign enabled, to get the master's CSRK
);
I tried to change the flags, but it makes no difference, the value in the SMP response is always 0x02 as it's highlighted in the log above.
I can provide more code and traces if needed, please help to pinpoint the problem, thanks!

