⚠️ 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.
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.
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.
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:" ?
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.
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.
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
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
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
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
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
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.
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