7 Replies Latest reply on Jun 18, 2015 4:59 PM by kwang

    smp_bond_result 04

    maruc_2163026

      Hi!

       

      I'm trying to connect a TAG-Board (BCM920737TAG) with our own module (BCM20736S).

      But on the module I get the message "smp_bond_result 04" but it should be 03 (BONDED).

      The software on the TAG board was created with the WICED-Assistent and most parts from hello-client.

      Also lesmpkeys_numOfBondedDevice() returns 0 so the module is not bonded.

       

      How can I bond the module to the TAG-Board?

       

      Writing to the module works without problems.

      I attached the traces of both.

       

      I created the apps with WICED-Smart-SDK 2.2.0 and updated now to WICED-Smart-SDK 2.2.1

        • 1. Re: smp_bond_result 04
          maruc_2163026

          I did further investigations:

           

          I installed the hello-client-application on the TAG-Board and tried to connect to the module, but the result is the same: smp_bond_result 04

          Next I tried to connect to the module with the WICED Smart Explorer. This is working with smp_bond_result 03.

           

          I can't find the problem. Is it on the module, or the TAG-Board with the hello-client-application?

           

          I have added the log-files with the trace-output:

          module.log The trace-output of the module (connecting to hello-client)

          TAG-Board.log The trace-output of the hello-client (connecting to the module)

          module_Android.log The trace-output connecting to WICED Smart Explorer

           

          davida_06

          • 2. Re: smp_bond_result 04
            BoonT_56

            I had two tag3s and I configured one to be the sensor and the other the client. I followed the below instructions from the hello_client.c and was able to connect successfully and executed (7).

             

            3. Connect from some client application (LightBlue on iOS)

            4. From the client application register for notifications

            5. Make sure that your slave device (hello_sensor) is up and advertising

            6. Push a button on the tag board for 6 seconds.  That will start connection process.

            7. Push a button on the hello_sensor to deliver notification through hello_client device up to the client.

             

            Can you try running hello_client (in its un-edited form) on your tag and hello_sensor (in its un-edited form) on your module? And try to connect them?

            • 3. Re: smp_bond_result 04
              maruc_2163026

              Hello boont,

               

              If I install hello-client and hello-sensor, they can connect to each other. So hardware should be working.

              But if I install hello-client on the one side and my own application created with the WICED Smart Wizard on the other side, I get "smp-bond-result 04".

              I have attached the logs one Post above. But I can't find anything about code 0x04 for result in bonding. Or how I could fix it.

              • 4. Re: smp_bond_result 04
                BoonT_56

                I can't exactly pinpoint what you have created with the Smart Designer. Some folks here have reported that it is easier to start off editing from a known good source e.g. hello_sensor.c.

                • 5. Re: smp_bond_result 04
                  maruc_2163026

                  Hi boont,

                   

                  This is not so simple.

                  The Application is about 90% finished.

                  The bonding with the smartphone is working.

                   

                  I compared both applications but can't find enormous differences. The differences are only in code created by the wizard.

                   

                  In the trace-output I can see some differences between smartphone and hello-client connection:

                  emconninfo_getPeerAddrType returns 1 if it is a smartphone, 0 if it is hello-client

                  encryption_changed is called before smb_bond_result if a smartphone connectes

                  lesmp_pinfo->lesmpkeys_bondedInfo.adrType is 1 if a smartphone connectes, 0 if it is hello-client

                   

                  Perhaps the result in smp_bond_result is 4 which is not in the enum of LESMP_PARING_RESULT is an indicator for the problem?

                   

                  After some more playing with hello_client and hello_sensor I think I found the problem:

                  Is it possible to connect to hello_sensor if only passkey is enabled?

                  The passkey for the client and the sensor are the same, but if I enable passkey-pairing I always get the result of 4 of smp_bond.

                  • 6. Re: smp_bond_result 04
                    jota_1939431

                    Hello Matthias,

                     

                    We are working on a pass-key resolution and will update you shortly.

                     

                    Thanks

                    JT

                    • 7. Re: smp_bond_result 04
                      kwang

                      Hi Matthias,

                       

                      Does you module have a display or an option to feed in the passkey? If not, the scenario is not supported. 

                       

                      As you were saying about enabling passkey pairing with hello_client and hello_sensor, even though you have the same passkey for both coded in, you will get smp_bond 04 because it is not a supported scenario and is not how it is supposed to work.  For passkey pairing, one of the two needs to have a display or an option to feed in the passkey, therefore two tag boards do not support his scenario.  So you are absolutely correct, wen you enable passkey-pairing you will always get smp_bond 04 if you are testing on, for example, two tag boards. 

                       

                      Please check out this link (LE Security | Bluetooth Development Portal) for the different scenarios.

                       

                      Thanks,

                      Kevin