resolvable private address

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
8 posts / 0 new
Last post
nigelyang
Offline
Last seen:2 months 6 days ago
加入:2018-03-20 08:24
resolvable private address

Hi Dialog,

Does 14681 SDK support "resolvable private address"? If yes, how do I enable the function of "resolvable private address" in SDK ?
I do not find any Document about this.

Thanks

Device:
MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi nigelyang,

Hi nigelyang,

You will need to use the ble_gap_address_set() function. The function will take as parameters an own_address_t var in which you will have to define the type of address your device would like to advertise in your case PRIVATE_RANDOM_RESOLVABLE_ADDRESS. The.addr member of the struct will be neglected since you will use a random resolvable address. Also you will have to fill in the renew_dur parameter of the function which will update the address in that specific time. You will be able to find a few guidelines about this in the Tutorial section of the 68x family in the Setting the Bluetooth Address and Device Name.

Thanks MT_dialog

nigelyang
Offline
Last seen:2 months 6 days ago
加入:2018-03-20 08:24
Hi Dialog,

Hi Dialog,
I set as the below

static const own_address_t user_bd_address = {
.addr_type = PRIVATE_RANDOM_RESOLVABLE_ADDRESS,
.addr = {0x0A,0x0B,0x0C,0x0D,0x0E,0x0F} };

ble_gap_address_set(&user_bd_address , 10000); // change every 10 000 ms

I tried to monitor the BD address by mobile phone application, but found it did not change every 10sec.

Is there any thing I miss or misunderstand in this case?

thanks

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi nigelyang,

Hi nigelyang,

Please check the comments in ble_gap.h header for the ble_gap_address_set() function, minimum value is 150 seconds and steps of 10 ms.

Thanks MT_dialog

nigelyang
Offline
Last seen:2 months 6 days ago
加入:2018-03-20 08:24
Hi Dialog,

Hi Dialog,

I got another problem after inputting correct passkey, pairing failed (evt->status=BLE_ERROR_FAILED) if using PRIVATE_RANDOM_RESOLVABLE_ADDRESS. The code will run to " case BLE_EVT_GAP_PAIR_COMPLETED: " and print "pairing failed" . However, got successful if using PRIVATE_STATIC_ADDRESS. Is there any setting I miss ? And what condition will reach "case BLE_EVT_GAP_ADDRESS_RESOLVED:" ?

thanks

nigelyang
Offline
Last seen:2 months 6 days ago
加入:2018-03-20 08:24
hi Dialog,

hi Dialog,

I tried 3 android phones with same application, Android version 7.0 and 8.0 can be pair ok but version 6.0 got failed. what is the possible reason ?

thanks

nigelyang
Offline
Last seen:2 months 6 days ago
加入:2018-03-20 08:24
sorry to bother you again,

sorry to bother you again, I found that in case of using Android version 6.0 , the code will not reach "case BLE_EVT_GAP_ADDRESS_RESOLVED:" and " case BLE_EVT_GAP_SEC_LEVEL_CHANGED: "。 it reached "case BLE_EVT_GAP_PAIR_COMPLETED:" directly. I cannot figure out why SDK skip the two case. thanks for your answer.

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi nigelyang,

Hi nigelyang,

Well tried with android version 6.0, and with random resolvable address, didn't notice any issues. If you dont see the BLE_EVT_GAP_SEC_LEVEL_CHANGED to occur then something went sideways during the bonding procedure, a sniffer log would allow you to see what is going on over the air.

Thanks MT_dialog