7 Replies Latest reply on Mar 8, 2019 12:50 AM by AnjanaM_61

    20719 pairing fails

    JeHu_3414236

      I am using a custom board and I am seeing pairing failure on one board.  I tried on 5 other boards and they all pass using the exact same firmware pairing to the same device.  Can someone explain why this would happen?  Can some hardware problem cause this or is it a defective chip?  This is the debug print of a good board:

       

      13:23:10.535 SMP RECV Command. Name: SMP Pairing Request (0x01) len: 7

      13:23:10.535                            IO Capability : KeyboardDisplay (0x04)

      13:23:10.535                            OOB Data Flag : Not Present (0x00)

      13:23:10.535                       Authentication Req : Bonding | MITM Required (0x0d)

      13:23:10.535                         Max Enc Key Size : 16 (0x10)

      13:23:10.535                            Initiator Key : Enc Key | Identity Key | Connection Signing Key |

      13:23:10.535                            Responder Key : Enc Key | Identity Key | Connection Signing Key |

      13:23:10.537 1 Security Request

      13:23:10.541 1 BLE Pairing IO Capabilities Request

      13:23:10.542 SMP SEND Command. Name: SMP Pairing Response (0x02) len: 7

      13:23:10.542                            IO Capability : NoInputNoOutput (0x03)

      13:23:10.542                            OOB Data Flag : Not Present (0x00)

      13:23:10.542                       Authentication Req : Bonding | MITM Not Required (0x01)

      13:23:10.542                         Max Enc Key Size : 16 (0x10)

      13:23:10.542                            Initiator Key : Enc Key | Identity Key |

      13:23:10.542                            Responder Key : Enc Key | Identity Key |

      13:23:10.543 SENT [1] Command to HCI.  Name: HCI_LE_Rand   (Hex Code: 0x2018  Param Len: 0)

      13:23:10.545 RCVD [1] Event from HCI.  Name: HCI_Command_Complete   (Hex Code: 0x0e  Param Len: 12)

      13:23:10.545                      Num HCI Cmd Packets : 1 (0x01)

      13:23:10.545                                 Cmd Code : 0x2018  (HCI_LE_Rand)

      13:23:10.545                                   Status : Success (0x00)

      13:23:10.545                            Random Number : f2 73 c7 db 5b 87 6f 31

      13:23:10.547 SENT [1] Command to HCI.  Name: HCI_LE_Rand   (Hex Code: 0x2018  Param Len: 0)

      13:23:10.547 RCVD [1] Event from HCI.  Name: HCI_Command_Complete   (Hex Code: 0x0e  Param Len: 12)

      13:23:10.547                      Num HCI Cmd Packets : 1 (0x01)

      13:23:10.547                                 Cmd Code : 0x2018  (HCI_LE_Rand)

      13:23:10.547                                   Status : Success (0x00)

      13:23:10.547                            Random Number : 45 ad 4a 3a 03 6e 13 d9

      13:23:10.633 SMP RECV Command. Name: SMP Pairing Confirm (0x03) len: 17

      13:23:10.633                            Confirm value : b2 1f 96 4f 83 e6 93 9b 33 47 ba df e5 70 f5 da

      13:23:10.636 SMP SEND Command. Name: SMP Pairing Confirm (0x03) len: 17

      13:23:10.636                            Confirm value : ac 7f c9 f2 23 dd 61 ea ae fc 68 c5 f5 bd 54 36

      13:23:10.732 SMP RECV Command. Name: SMP Pairing Random (0x04) len: 17

      13:23:10.732                             Random Value : e0 1f 58 67 fc 25 75 8d 8f ad cb f5 bf 66 23 5e

      13:23:10.734 SMP SEND Command. Name: SMP Pairing Random (0x04) len: 17

      13:23:10.734                             Random Value : f2 73 c7 db 5b 87 6f 31 45 ad 4a 3a 03 6e 13 d9

      13:23:10.829 RCVD [1] Event from HCI.  Name: HCI_BLE_Event   (Hex Code: 0x3e  Param Len: 13)

      13:23:10.829                HCI_BLE_LTK_Request_Event : 5 (0x05)

      13:23:10.829                        Connection Handle : 64 (0x0040)

      13:23:10.829                            Random Number : 00 00 00 00 00 00 00 00

      13:23:10.829                                     EDIV : 0 (0x0000)

      13:23:10.830 SENT [1] Command to HCI.  Name: HCI_LE_Long_Term_Key_Request_Reply   (Hex Code: 0x201a  Param Len: 18)

      13:23:10.830                        Connection Handle : 64 (0x0040)

      13:23:10.830                                      LTK : 9d aa 88 c8 00 03 fb d6 47 46 f0 a2 54 d8 3d 87

      13:23:10.832 RCVD [1] Event from HCI.  Name: HCI_Command_Complete   (Hex Code: 0x0e  Param Len: 6)

      13:23:10.832                      Num HCI Cmd Packets : 1 (0x01)

      13:23:10.832                                 Cmd Code : 0x201a  (HCI_LE_Long_Term_Key_Request_Reply)

      13:23:10.832                                   Status : Success (0x00)

      13:23:10.832                                   Handle : 64 (0x0040)

      13:23:11.022 RCVD [1] Event from HCI.  Name: HCI_Encryption_Change   (Hex Code: 0x08  Param Len: 4)

      13:23:11.022                                   Status : Success (0x00)

      13:23:11.022                        Connection Handle : 64 (0x0040)

      13:23:11.022                        Encryption Enable : 1 (0x01)

       

      This is the bad board:

      13:16:41.073 SMP RECV Command. Name: SMP Pairing Request (0x01) len: 7

      13:16:41.073                            IO Capability : KeyboardDisplay (0x04)

      13:16:41.073                            OOB Data Flag : Not Present (0x00)

      13:16:41.073                       Authentication Req : Bonding | MITM Required (0x0d)

      13:16:41.073                         Max Enc Key Size : 16 (0x10)

      13:16:41.073                            Initiator Key : Enc Key | Identity Key | Connection Signing Key |

      13:16:41.073                            Responder Key : Enc Key | Identity Key | Connection Signing Key |

      13:16:41.074 2 Security Request

      13:16:41.078 2 BLE Pairing IO Capabilities Request

      13:16:41.079 SMP SEND Command. Name: SMP Pairing Response (0x02) len: 7

      13:16:41.079                            IO Capability : NoInputNoOutput (0x03)

      13:16:41.079                            OOB Data Flag : Not Present (0x00)

      13:16:41.079                       Authentication Req : Bonding | MITM Not Required (0x01)

      13:16:41.079                         Max Enc Key Size : 16 (0x10)

      13:16:41.079                            Initiator Key : Enc Key | Identity Key |

      13:16:41.079                            Responder Key : Enc Key | Identity Key |

      13:16:41.080 SENT [2] Command to HCI.  Name: HCI_LE_Rand   (Hex Code: 0x2018  Param Len: 0)

      13:16:41.082 RCVD [2] Event from HCI.  Name: HCI_Command_Complete   (Hex Code: 0x0e  Param Len: 12)

      13:16:41.082                      Num HCI Cmd Packets : 1 (0x01)

      13:16:41.082                                 Cmd Code : 0x2018  (HCI_LE_Rand)

      13:16:41.082                                   Status : Success (0x00)

      13:16:41.082                            Random Number : 54 bc 98 18 ab 2f 85 2a

      13:16:41.083 SENT [2] Command to HCI.  Name: HCI_LE_Rand   (Hex Code: 0x2018  Param Len: 0)

      13:16:41.084 RCVD [2] Event from HCI.  Name: HCI_Command_Complete   (Hex Code: 0x0e  Param Len: 12)

      13:16:41.084                      Num HCI Cmd Packets : 1 (0x01)

      13:16:41.084                                 Cmd Code : 0x2018  (HCI_LE_Rand)

      13:16:41.084                                   Status : Success (0x00)

      13:16:41.084                            Random Number : 67 6f 87 45 5f 78 2f 44

      13:16:41.171 SMP RECV Command. Name: SMP Pairing Confirm (0x03) len: 17

      13:16:41.172                            Confirm value : 6a ae 6d 04 11 84 08 af 6d f4 c5 a3 59 52 06 e0

      13:16:41.173 SMP SEND Command. Name: SMP Pairing Confirm (0x03) len: 17

      13:16:41.173                            Confirm value : 5c 45 d5 dd 31 43 10 7e b6 27 26 d7 e5 e5 6e 0c

      13:16:41.269 SMP RECV Command. Name: SMP Pairing Random (0x04) len: 17

      13:16:41.269                             Random Value : af e8 d2 da 0d e9 75 51 a9 13 fb 0a ad 5c 82 f6

      13:16:41.270 SMP SEND Command. Name: SMP Pairing Fail (0x05) len: 2

      13:16:41.270                                   Reason : Unknown (0x04)

      13:16:44.275 SENT [2] Command to HCI.  Name: HCI_Disconnect   (Hex Code: 0x0406  Param Len: 3)

      13:16:44.276                        Connection Handle : 64 (0x0040)

      13:16:44.276                                   Reason : 19 (0x13)

      13:16:44.276 RCVD [2] Event from HCI.  Name: HCI_Command_Status   (Hex Code: 0x0f  Param Len: 4)

      13:16:44.276                                   Status : Success (0x00)

      13:16:44.276                      Num HCI Cmd Packets : 1 (0x01)

      13:16:44.276                                 Cmd Code : 0x0406  (HCI_Disconnect)

       

      What does the [1] and [2] mean after the SENT/RCVD?  The bad board uses [2] but I have good boards that use [2] also.

        • 1. Re: 20719 pairing fails
          AnjanaM_61

          Hello,

           

          Not sure what is the exact issue. Could be RF side issue or may be flash issue.

           

          1: Can you try disabling Bonding and see if it still exists?

          2: Can you test RF signals if you have RF test setup?

           

          Q) What does the [1] and [2] mean after the SENT/RCVD?  The bad board uses [2] but I have good boards that use [2] also.

              That is not an issue. I think It's just to identify the host connected.

           

          Thanks,
          Anjana

          • 2. Re: 20719 pairing fails
            JeHu_3414236

            It only happens during bonding.  The error happens every time at SMP SEND Command. Name: SMP Pairing Fail (0x05) len: 2

            I don't have a RF test setup.  If it was a RF problem shouldn't there be random errors all the time?  I don't see any errors except this.  What problems with flash can cause this?  I loaded the firmware without problems using WICED Studio.  It's supposed to do a CRC check after loading.

            • 3. Re: 20719 pairing fails
              AnjanaM_61

              Hi,

               

              Yes, since it was failing during bonding only I suspected the flash side.

               

              Could you please replace the working board with the non working chip and the non working board with a chip from working board.

              Just want to confirm if its a defective chip or any other board issue.

               

              Could you please try and let us know?

               

              Thanks,

              Anjana

              • 4. Re: 20719 pairing fails
                JeHu_3414236

                I cannot replace the chip.  It will destroy the board.

                • 5. Re: 20719 pairing fails
                  AnjanaM_61

                  Ok. Mostly it may be a defective chip.

                   

                  Can you try running any demo project available in WICED studio like hello sensor on this defective board and check if still the security part is failing?

                  1 of 1 people found this helpful
                  • 6. Re: 20719 pairing fails
                    JeHu_3414236

                    I think some part of flash is defective.  Bonding works on hello sensor project.  In my own project, if I reduce the code size by removing some functions then bonding will work.  I also see sometimes the advertising address will show up as anonymous if I change the code size.  How can I detect flash problems for production?  It seems totally random and there is no error when programming the firmware.

                    • 7. Re: 20719 pairing fails
                      AnjanaM_61

                      Hi,

                       

                      Q) How can I detect flash problems for production?

                      A) Each chip will go through several tests before releasing to market. So ideally customers should not get a faulty chip. Still some corner case can happen. In that case, you can give us the chip for failure analysis to find out the issue.

                       

                      - Let us know if this is happening in multiple boards and then it could be an application firmware issue. If then, for debugging , we need your project and steps to reproduce.

                       

                      Thanks,
                      Anjana