DA14683: Phone device fails BLE reconnect after initial pair/bond when ble_gap_address_set() is used.

DA14683, Custom Board, Custom Software Project, SDK1.0.14


I am using ble_gap_address_set() function to configure a PRIVATE_STATIC_ADDRESS type at run time.  This code is being run from the BLE_task()

Here is a code snippit:

uint8_t bleMAC[6] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06};

static own_address_t user_bd_address = {
memcpy(user_bd_address.addr, bleMAC, 6);

//Then later after the ble_gap_name_set() call I call....

ble_gap_address_set(&user_bd_address, 0x00FF);

This appears to be successfully assigning the correct address.  I am able to see the correct BLE address using the phone device (both android and iOS), and I am able to pair/bond with passkey authentication to that address successfully.


After disconnecting from that initial pair/bonding connection with the phone devices, I am unable to reconnect to the DA14683.  Neither android or iOS can reconnect successfully while they have the pair/bond information for the DA14683 saved.  If I "forget" the DA14683 at the OS level then I am able to initiate a new pair/bond connection successfully, but again, once I disconnect I am unable to reconnect until I "forget" the device at the OS level.

More data:

If instead of using the PRIVATE_STATIC_ADDRESS from the ble_gap_address_set() function as described above, and I use the default PUBLIC_STATIC_ADDRESS as set in the custom_config_qspi.h:

#define defaultBLE_STATIC_ADDRESS            { 0x07, 0x00, 0x80, 0xCA, 0xEA, 0x80 }

Then both android and iOS can connect/pair/bond and reconnect successfully.


1) Do you see any issues with the way I am assigning the BLE Address in the code snippit above?  

2) When using PRIVATE_STATIC_ADDRESS from the ble_gap_address_set() function as described above, Why would the phone devices (both android and iOS) be able to connect/pair/bond initially, but fail subsequent connection attempts while the pair/bond information is stored in the OS?