4 Replies Latest reply on Jan 17, 2020 6:01 PM by hinu_4327176

    About saving bonding information

    hinu_4327176

      Hello

      After performing (pairing and bonding), if the power is turned from OFF to ON, the key exchange will be performed at the time of connection as if the bonded information was lost.

      The following pairing process is implemented.

        ・ Base application: ble_hello_sensor

        ・GATT connection event (GATT_CONNECTION_STATUS_EVT): At connection
                 wiced_bt_dev_sec_bond() : Pairing start

        ・Device link key update event (BTM_PAIRED_DEVICE_LINK_KEYS_UPDATE_EVT)
                 Save link key (wiced_bt_management_evt_data_t paired_device_link_keys_update) to DCT

        ・Device link key request event(BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT)

                 Output : saved link key

        ・Power OFF→ON  event(BTM_ENABLED_EVT)
                 Set the held link key with wiced_bt_dev_add_device_to_address_resolution_db()

        ・I am using a user passkey when pairing.

        ・Operating environment CYW43438 & WICED-Studio-6.4

       

      If you connect to the central device again after turning the power off and on, the inquiry and key exchange of the user passkey will operate.
      I want to connect to the central device once bonded without re-entering the user passkey.

       

      In Windows10 and iOS terminals, user passkey inquiry and key exchange work.

      On Android devices, user passkey query and key exchange do not work.

       

      Please tell me how to solve the problem.

        • 1. Re: About saving bonding information
          AnjanaM_61

          Hi Hiroaki nunome San,

           

          Can you please clarify the query ?

          Do you mean for Windows 10 and iOS there device is connecting and pairing is successful without re-entering passkey (after power off & On)

          And only for Android , it always asking for passkey entry ?

          If that is the case , can you please make sure the device is bonded properly on Android side? Which android app you are using?

           

          Regards,
          Anjana

          • 2. Re: About saving bonding information
            hinu_4327176

            Hello

             

            I'm sorry I don't understand the BT specifications and ask unknown questions.

             

            In the case of Android (using a communication test application as a central), the following operations are performed.
               Connection & pairing start
                  ↓
               Passkey request
                  ↓
               Pairing completed
                  ↓
               Confirm the completion of pairing and bonding with the communication test application
                  ↓
               Power off and on CYW43438 (peripheral)
                  ↓
               Connection
                  ↓
               Connection successful

               "Device link key update event (BTM_PAIRED_DEVICE_LINK_KEYS_UPDATE_EVT)" is not issued for connection after power off & on.

             

            In the case of Windows 10 and iOS (using a communication test application as a central), the following operation is performed.
               Connection & pairing start
                  ↓
               Passkey request
                  ↓
               Pairing completed
                  ↓
               Confirm the completion of pairing and bonding with the communication test application
                  ↓
               Power off and on CYW43438 (peripheral)
                  ↓
               Connection
                  ↓
               Passkey request
                  ↓
               Pairing completed

             

               After the power is turned off and on, a "Device link key update event (BTM_PAIRED_DEVICE_LINK_KEYS_UPDATE_EVT)" is issued.

               On iOS, the device link key update stops halfway and the pairing fails.

               Since pairing and bonding are completed, passkey request & device link key update event will not occur in connection after power off & on?

             

            The following parameters are set for pairing.
                .oob_data = BTM_OOB_NONE
                .auth_req = BTM_LE_AUTH_REQ_SC_MITM_BOND
                .max_key_size = 0x10
                .init_keys = BTM_LE_KEY_PENC | BTM_LE_KEY_PID
                .resp_keys = BTM_LE_KEY_PENC | BTM_LE_KEY_PID

            • 3. Re: About saving bonding information
              AnjanaM_61

              Hi,

               

              Can you please provide the project which you are testing and steps to reproduce the issue? So that we can figure out the issue.

               

              Regards,
              Anjana

              1 of 1 people found this helpful
              • 4. Re: About saving bonding information
                hinu_4327176

                Hello

                 

                It is difficult to provide everything because of the project during product development.
                Provide an excerpted project.

                 

                Please wait a little.