3 Replies Latest reply on Oct 31, 2019 11:53 AM by StN._1917156

    How to get Identity Address from Resolvable Private Address?

    StN._1917156

      What function(s) from WICED SDK could use to convert Resolvable Private Address to Identity Address?

      Let say I’m trying to compare last saved in the NVRAM  RPA with the current connection’s peer address.

      Or any other easy way to find am I connected to the same device as last time bonded one or not, because addresses printed from

      hello_sensor_load_keys_for_address_resolution (for example 6f 11 a1 82 33 df)

      and hello_sensor_conn_up (for example 58 b2 0f cf 0e 1d)

      might be different, but the actual peer device paired last time and currently connected one may be the same?

      The chip is CYW20719, but I guess the question is valid for all BT chips supported with WICED.

      Thanks

        • 1. Re: How to get Identity Address from Resolvable Private Address?
          AnjanaM_61

          Hi,

           

          You can get device address in BTM_PAIRED_DEVICE_LINK_KEYS_REQUEST_EVT as paired_device_link_keys_request.key_data.static_addr

          wiced_bt_dev_add_device_to_address_resolution_db API has the parameter wiced_bt_device_link_keys_t which contains static_addr which will be same for resolvable address of same device.

          Please refer to thread Re: How to resolve random ble address

          Are you facing any issues with RPA device connection?

           

          Regards,

          Anjana

           

          1 of 1 people found this helpful
          • 2. Re: How to get Identity Address from Resolvable Private Address?
            StN._1917156

            Hi Anjana,

            Unfortunately I'm facing some weird random issues and still cant figure the reason that cause them:

            I'm using wiced_bt_get_identity_address() after establishing new connection and sometimes it gives correct identity address, sometimes fails and returns either 00 00 00 00 00 00 or some number that is neither the random, public etc. addresses.

             

            Also if I try to call wiced_bt_get_identity_address  after boot/reset and after loading bonded address from NVRAM to address resolution database, and never got so far correct return even if try not immediately, but after some delay - I think the max delay I tried so far was 10 s.

            Thanks

            • 3. Re: How to get Identity Address from Resolvable Private Address?
              StN._1917156

              Hi Anjana,

              Could you, please, explain how wiced_bt_get_identity_address   (or wiced_bt_dev_get_identity_address)  work – what structures need to be filled before this function could return meaningful result?

               

              I was thinking that is enough only to load the last bonded info from NVRAM  in address resolution database,

              but unfortunately, this function works only in the power cycle when I bond to the CYW.

              As soon as I power off/on or even only press the Reset button and wiced_bt_get_identity_address start returning false and in the identity_address parameter sets ‘00 00 00 00 00 00’.

               

              So what else beside address resolution database  wiced_bt_dev_add_device_to_address_resolution_db ( &link_keys ) need to be set before wiced_bt_get_identity_address   can work?

              Thanks