This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC1352P: GAP Bond Manager auto sync Host Test

Part Number: LAUNCHXL-CC1352P

Hello,

SDK: CC13x2 26x2 SDK - 5.20.00.52
Example: Stack_Wrapper

My Question is about the auto sync feature of the GAPBondmgr fot the Host_Test example. In the Stack_Wrapper example there is the "static void gapBondMgr_SyncWhiteList(void)" (in gapbondmgr.c) which provides this feature. 

Is there a reason why the LE add device to whitelist function "VOID MAP_HCI_LE_AddWhiteListCmd(HCI_PUBLIC_DEVICE_ADDRESS, bonds[i].addr);" uses public address typ only?

The structure of the NV data "gapBondRec_t" could provide the address typ. So I could use "VOID MAP_HCI_LE_AddWhiteListCmd(bonds[i].addrType, bonds[i].addr);" instead.

static void gapBondMgr_SyncWhiteList(void)
{
  uint8_t i;

  //erase the White List
  VOID MAP_HCI_LE_ClearWhiteListCmd();

  // Write bond addresses into the White List
  for(i = 0; i < gapBond_maxBonds; i++)
  {
    // Make sure empty addresses are not added to the White List
    if(osal_isbufset(bonds[i].addr, 0xFF, B_ADDR_LEN) == FALSE)
    {
      VOID MAP_HCI_LE_AddWhiteListCmd(HCI_PUBLIC_DEVICE_ADDRESS, bonds[i].addr);
    }
  }
}

Best regards,
Samuel

  • Hi Samuel,

    You can use the GAPBondMgr_SetParameter() API to set this:

     GAPBondMgr_SetParameter(GAPBOND_AUTO_SYNC_WL, sizeof(uint8_t), &autoSyncWL);
    Cheers,
    Marie H
        
  • Hi Marie H,

    I use the vendor specific HCI commands to configure the BTLE module over UART. I use the command GAPBondMgr_SetParameter with auto sync WL enabled.

    We use two devices which both will have a random static address. When the host test now wants to sync the bonding table with the whitelist it will call the shown function. The problem is that the function is hard coded to only save public addresses. When I now try to use the whitelist with HCI commands like GAPInit_connectWl the BTLE module cant find the peripheral even though the BT mac address is the same. Thats because the address type in the whitelist is public but the peripheral has random. 

    I have changed the Host Test code to save random address types in the whitelist which works fine without problems. 

    I just wanted to ask why only explicitly public address types are saved in the auto sync wl api. When random address types can also be contained in the bonding table.

    Best regards,
    Samuel

  • Hi Samuel,

    We need to differentiate between resolvable and non-resolvable private addresses. Which one are you using?

    When making an accept list (WL), the stored value will always be the Identity address. As you say, the IA is equal to the public address if you use public address mode. This is because a lot of devices that use random addresses, change the address with some frequency. It would thus not make sense to store the random address.

    Cheers,

    Marie H

  • Hi Marie H,

    Ok, yes that makes sense.

    Since we don't need the privacy mode of BLE. We use non-resolvable private address on our devices (BTool picture below). 

    What I want to achive is a auto connect feature with no input from the user. So when I don't change the code in host-test, like I showed before, I can not use the GAPInit_connectWl HCI command because the GAP BondMgr auto sync function saves the non-resolvable private address wrongly as an public address.

     

    regards,
    Samuel

  • Hi Samuel,

    I see.

    Thank you for posting your code snippet.

    Cheers,

    Marie H